Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists