I recently got my SAM7A3 Eval board and SAM-ICE Jtag unit to program/debug it. I grabbed various source files from a few different vendors to construct my linker and Assembly start up file (hopefully) correctly. I seem to be having an issue compiling it using WinARM though and I was wondering if anyone here could help. It compiles all the files, and after it links the .elf file I get: c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(exit .o): In function `exit':exit.c:(.text+0x1a): undefined reference to `_exit' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(mall ocr.o): In function `_malloc_r':mallocr.c:(.text+0x2e8): undefined reference to `_sbrk_r' :mallocr.c:(.text+0x388): undefined reference to `_sbrk_r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(stdi o.o): In function `__sclose':stdio.c:(.text+0xc): undefined reference to `_close _r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(stdi o.o): In function `__sseek':stdio.c:(.text+0x2a): undefined reference to `_lseek _r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(stdi o.o): In function `__swrite':stdio.c:(.text+0x6a): undefined reference to `_lsee k_r' :stdio.c:(.text+0x82): undefined reference to `_write_r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(stdi o.o): In function `__sread':stdio.c:(.text+0xa2): undefined reference to `_read_ r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(free r.o): In function `_malloc_trim_r':mallocr.c:(.text+0x2c): undefined reference t o `_sbrk_r' :mallocr.c:(.text+0x3c): undefined reference to `_sbrk_r' :mallocr.c:(.text+0x48): undefined reference to `_sbrk_r' c:/winarm/bin/../lib/gcc/arm-elf/4.1.0/../../../../arm-elf/lib/thumb\lib c.a(make buf.o): In function `__smakebuf':makebuf.c:(.text+0x1c): undefined reference to `_fstat_r' :makebuf.c:(.text+0xb2): undefined reference to `isatty' collect2: ld returned 1 exit status make: *** [.out/ARMUSB.elf] Error 1 The top of my makefile is: MCU = arm7tdmi SUBMDL = AT91SAM7A3 THUMB = -mthumb #THUMB_IW = -mthumb-interwork but I've tried it without -mthumb, and i've tried it with -mthumb-interwork, and I get the same errors. Anyone have any ideas? Just incase it matters, I am able to compile the examples for the 7S that came with WinARM. Thanks
Stefan wrote:
> It's a FAQ see http://en.mikrocontroller.net/topic/67145
Ahh cool, thanks for pointing me in the right direction :)
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
Log in with Google account
No account? Register here.