EmbDev.net

Forum: ARM programming with GCC/GNU tools Port uIP-LPC2129 from (expensive)CrossWorks to (free)WinARM


von fjrg76 (Guest)


Rate this post
useful
not useful
Hi

uIP has been ported to the LPC2124/29 NXP ARM mcu. However that was done
using CrossWorks (CW) as compiler/debugger (and it works out of the
box!!). I'm trying to adapt the CW project to WinARM (or for any other
free tool-chain), but this is not as easy as I thought ('cause the
makefile). If someone has heard a project like this for the WinARM
already or knows how to make the makefile, please share with us. I guess
it would be great to port the uIP to WinARM =)

Thanks

von fjrg76 (Guest)


Rate this post
useful
not useful
I almost achieve to port the uIP to WinARM, however when linking some
errors show up. I found a solution in the thread

http://en.mikrocontroller.net/topic/58281

so I used the crt0.s and LPC2129-RAM/ROM.ld that are included in WinARM
dist, but errors still appear. The thread says that I should edit
syscals.c by hand, but that file is in folders for the SAM mcu, not in
LPC folders. I guess I might copy it to my work folder and edit it to
see what happens. If my makefile is needed plese tell me to copy into
the post

Thanks


C:\fjrg76\WinARM\arm-elf\lib\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:\fjrg76\WinARM\arm-elf\lib\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:\fjrg76\WinARM\arm-elf\lib\libg.a(mallocr.o): In function `_malloc_r':
mallocr.c:(.text+0x424): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x4cc): undefined reference to `_sbrk_r'
C:\fjrg76\WinARM\arm-elf\lib\libg.a(stdio.o): In function `__sclose':
stdio.c:(.text+0xc): undefined reference to `_close_r'
C:\fjrg76\WinARM\arm-elf\lib\libg.a(stdio.o): In function `__sseek':
stdio.c:(.text+0x30): undefined reference to `_lseek_r'
C:\fjrg76\WinARM\arm-elf\lib\libg.a(stdio.o): In function `__swrite':
stdio.c:(.text+0x84): undefined reference to `_lseek_r'
stdio.c:(.text+0xac): undefined reference to `_write_r'
C:\fjrg76\WinARM\arm-elf\lib\libg.a(stdio.o): In function `__sread':
stdio.c:(.text+0xd0): undefined reference to `_read_r'
collect2: ld returned 1 exit status
C:\fjrg76\WinARM\utils\bin\make: *** [uip] Error 1

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
fjrg76 wrote:
> I almost achieve to port the uIP to WinARM, however when linking some
> errors show up. I found a solution in the thread
>
> http://en.mikrocontroller.net/topic/58281

and a lot (lot) of other threads and this an other forums/mailing-lists.

> so I used the crt0.s and LPC2129-RAM/ROM.ld that are included in WinARM
> dist, but errors still appear. The thread says that I should edit
> syscals.c by hand, but that file is in folders for the SAM mcu, not in
> LPC folders. I guess I might copy it to my work folder and edit it to
> see what happens.

Yes, sbrk is rather generic so it can be re-used, adapt read/write to
the use the available output (UART, LCD or whatever).

> If my makefile is needed plese tell me to copy into
> the post

Just provide the syscall implemenations (the functions) and make sure
the object-file(s) which implement them get compiled and linked with the
rest of the project-files.

Also take a look at newlib-lpc from Aeolus which is a library that
provides the newlib-syscalls for LPC (LPC uart for stdio). The
WinARM-pacakge includes a copy of the newlib-lpc source, a precompiled
newlib-lpc-library and one or two examples how it can be used.

Martin Thomas

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.