EmbDev.net

Forum: ARM programming with GCC/GNU tools SAM7A3 development/compile troubles


Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
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

Author: Stefan (Guest)
Posted on:

Rate this post
0 useful
not useful

Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
Stefan wrote:
> It's a FAQ see http://en.mikrocontroller.net/topic/67145

Ahh cool, thanks for pointing me in the right direction :)

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.