when i build my project using printf or sprintf function i get the
errors shown below. I have included stdio.h file in my project using
#include <stdio.h>.
It seems I cant access functions in the stdio library.
The project builds successfully when sprintf or printf is removed
***** output window *************
Compiling: Empty.c arm-elf-gcc -c -mcpu=arm7tdmi -I. -gdwarf-2
-DROM_RUN -Os -Wall -Wstrict-prototypes -Wcast-align -Wcast-qual
-Wimplicit -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow
-Wstrict-prototypes -Wunused -Wa,-adhlns=Empty.lst -std=gnu99 -MD -MP
-MF .dep/Empty.o.d Empty.c -o Empty.o
Empty.c: In function 'main':
Empty.c:121: warning: unused variable 'i'
Empty.c:121: warning: unused variable 'count'
Linking: Empty.elf
arm-elf-gcc -mcpu=arm7tdmi -I. -gdwarf-2 -DROM_RUN -Os -Wall
-Wstrict-prototypes -Wcast-align -Wcast-qual -Wimplicit
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wswitch -Wredundant-decls -Wreturn-type -Wshadow
-Wstrict-prototypes -Wunused -Wa,-adhlns=Empty.o -std=gnu99 -MD -MP -MF
.dep/Empty.elf.d Empty.o Interrupts.o build/crt0.o --output Empty.elf
-nostartfiles -Wl,-Map=Empty.map,--cref -lc -lm -lc -lgcc
-Tbuild/LPC2106-ROM.ld
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(fr
eer.o):
In function `_malloc_trim_r':
mallocr.c:(.text+0x48): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x70): undefined reference to `_sbrk_r'
mallocr.c:(.text+0xb4): undefined reference to `_sbrk_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(ma
kebuf.o):
In function `__smakebuf':
makebuf.c:(.text+0x44): undefined reference to `_fstat_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(ma
llocr.o):
In function `_malloc_r':
mallocr.c:(.text+0x36c): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x5cc): undefined reference to `_sbrk_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(st
dio.o):
In function `__sread':
stdio.c:(.text+0x1c): undefined reference to `_read_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(st
dio.o):
In function `__swrite':
stdio.c:(.text+0x78): undefined reference to `_lseek_r'
stdio.c:(.text+0x9c): undefined reference to `_write_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(st
dio.o):
In function `__sseek':
stdio.c:(.text+0xc0): undefined reference to `_lseek_r'
c:/winarm/bin/../lib/gcc/arm-elf/4.0.0/../../../../arm-elf/lib\libc.a(st
dio.o):
In function `__sclose':
stdio.c:(.text+0xf8): undefined reference to `_close_r'
make.exe: *** [Empty.elf] Error 1
> Process Exit Code: 2
*********end of output window*************************