Hello, ALL!
I'm trying to build Rowley lwIP example which comes with FreeRTOS 4.0.4
using WinARM-20060606 (arm-elf-gcc 4.1.1) for AT91SAM7X-EK. It was told
that this demo can be (and I read this as should be) built by command
line gcc, so I just type 'make' and at last receive the following
output:
arm-elf-gcc -I. -I./EMAC -I../Common/include -I./USB
-I./lwip-1.1.0/src/include
-I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X -I../../Source/include
-I../../So
urce/portable/GCC/ARM7_AT91SAM7S -I./lwip-1.1.0/src/include/ipv4 -Wall
-Wextra -
Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wno-strict-alias
ing -D SAM7_GCC -D THUMB_INTERWORK -mthumb-interwork -mcpu=arm7tdmi
-Tatmel-rom.
ld -g -O0 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.o
EMAC/SAM7_EMAC_ISR.
o USB/USBIsr.o Cstartup_SAM7.o ../../Source/portable/MemMang/heap_2.o
ParTest/
ParTest.o main.o ../Common/Minimal/flash.o ../Common/Minimal/BlockQ.o
../Common/
Minimal/integer.o ../Common/Minimal/PollQ.o ../Common/Minimal/semtest.o
BasicWEB
.o USB/USB-CDC.o lwip-1.1.0/src/core/tcp_out.o
lwip-1.1.0/src/core/inet.o lwip-
1.1.0/src/core/mem.o lwip-1.1.0/src/core/memp.o
lwip-1.1.0/src/core/netif.o lwip
-1.1.0/src/core/pbuf.o lwip-1.1.0/src/core/raw.o
lwip-1.1.0/src/core/stats.o lwi
p-1.1.0/src/core/sys.o lwip-1.1.0/src/core/tcp.o
lwip-1.1.0/src/core/tcp_in.o lw
ip-1.1.0/src/core/ipv4/ip.o lwip-1.1.0/src/core/ipv4/ip_addr.o
lwip-1.1.0/src/co
re/ipv4/icmp.o lwip-1.1.0/src/api/tcpip.o lwip-1.1.0/src/api/api_msg.o
lwip-1.1.
0/src/api/err.o lwip-1.1.0/src/api/api_lib.o
lwip-1.1.0/src/netif/etharp.o lwip-
1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.o
lwip-1.1.0/src/netif/ethernetif
.o EMAC/SAM7_EMAC.o lwip-1.1.0/src/core/udp.o
lwip-1.1.0/src/core/ipv4/ip_frag.o
../../Source/tasks.o ../../Source/queue.o ../../Source/list.o
../../Source/port
able/GCC/ARM7_AT91SAM7S/port.o -nostartfiles boot.s -Xlinker
-ortosdemo.elf -Xli
nker -M -Xlinker -Map=rtosdemo.map
c:/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'
c:/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'
c:/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'
c:/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'
c:/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'
c:/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'
c:/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
It seems that newlib in this package of WinARM does not include
reentrance versions for thumb mode of sbrk(), close(), lseek() and so
on. I tried to find them out but without success.
Any suggestions?
Huge thanks in advance!