Hi all,
I have been working on driver development on bare metal arm processor of cortex 15 family.
I want to use printf for debugging purpose when the code is running on target.
For that to compile the code I am using code sourcery lite edition arm-gcc-none-eabi.
I know that I have to include libc file in order to use stdio library function. I have included the path in the makefile and did other settings but when I compile the code I get following errors :
libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c
.text+0x18): undefined reference to `_sbrk'
libc.a(lib_a-writer.o): In function `_write_r':
writer.c
.text+0x20): undefined reference to `_write'
libc.a(lib_a-closer.o): In function `_close_r':
closer.c
.text+0x18): undefined reference to `_close'
libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c
.text+0x1c): undefined reference to `_fstat'
libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c
.text+0x18): undefined reference to `_isatty'
libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c
.text+0x20): undefined reference to `_lseek'
I have doubt whether the code sourcery comes with newlib which includes the libc files or do I have to compile it?
Please help me solve the problem.
Thanks