Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Problems with compiling lwIP_Demo_Rowley_ARM7

Posted by Nobody/Anonymous on July 5, 2006
Hi,
I'm going to use FreeRTOS on AT91SAM7X256 ARM uC. I've downloaded FreeRTOS v4.0.4 and tried to compile Demo code with WinARM-2006.06.06 (on Windows XP machine) by simply entering the directory and typing "make". But my compilation fails (probably on linker stage?) with following errors:

f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
freer.o): In function `_malloc_trim_r':
mallocr.c:(.text+0x48): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x64): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x84): undefined reference to `_sbrk_r'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
makebuf.o): In function `__smakebuf':
makebuf.c:(.text+0x3c): undefined reference to `_fstat_r'
makebuf.c:(.text+0x110): undefined reference to `isatty'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
mallocr.o): In function `_malloc_r':
mallocr.c:(.text+0x40c): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x4b4): undefined reference to `_sbrk_r'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
stdio.o): In function `__sclose':
stdio.c:(.text+0x10): undefined reference to `_close_r'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
stdio.o): In function `__sseek':
stdio.c:(.text+0x3c): undefined reference to `_lseek_r'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
stdio.o): In function `__swrite':
stdio.c:(.text+0x94): undefined reference to `_lseek_r'
stdio.c:(.text+0xb8): undefined reference to `_write_r'
f:/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/lib/interwork\libg.a(
stdio.o): In function `__sread':
stdio.c:(.text+0xe4): undefined reference to `_read_r'
collect2: ld returned 1 exit status
make: *** [rtosdemo.elf] Error 1

Can anyone tell me what can I do to solve this problem? It looks like it this could be the problem of WinARM libraries, not the FreeRTOS code, but I'm not sure (earlier i've only written software in assembler and simple C programs for AVR).

RE: Problems with compiling lwIP_Demo_Rowley_ARM7

Posted by Nobody/Anonymous on July 6, 2006
A few people have mentioned problems with WinARM. I would suggest going to http://www.gnuarm.org and downloading the distribution from there. You will then find that the FreeRTOS code compiles straight off with no modifications.

RE: Problems with compiling lwIP_Demo_Rowley_

Posted by David Williams on July 14, 2006
These are references brought in by one of the libraries.

I have them stubbed out in my build with a file containing. Then all is well.


#include <reent.h>

void *_sbrk_r (struct _reent *r, ptrdiff_t t ) { return 0; }
int _open_r (struct _reent *r, const char *buf, int flags, int mode) { return -1; }
int isatty( int fd ) { return -1; }
_off_t _lseek_r ( struct _reent *ptr, int fd, _off_t offset, int whence ) { return -1; }
_ssize_t _write_r (struct _reent *r, int fd, const void *buf, size_t nbytes) { return -1; }
int _close_r (struct _reent *r, int fd) { return -1; }
_ssize_t _read_r (struct _reent *r, int fd, void *buf, size_t nbytes) { return -1; }
int _fstat_r (struct _reent *r, int fd, struct stat *buf) { return -1; }


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner