SAM7A3 development/compile troubles

OP #1171334
Rate this post
• ▲ 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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.