I am having a problem with _sbrk
. In a link phase of compilation i use below comand to link my objects and i get undefined reference to _sbrk
.
arm-none-eabi-ld -static -T linkerscript.ld -o exe timer_example.o /home/ziga/projects/cs_lite/arm-none-eabi/lib/libc.a /home/ziga/projects/cs_lite/lib/gcc/arm-none-eabi/4.5.1/libgcc.a
I am compiling for arm926ej-s and in ARM mode so i think i have chosen the right multilib (libc.a
and libgcc.a
) which is located in folder home/ziga/projects/cs_lite/arm-none-eabi/lib/
.
I have been searching internet for _sbrk
function and it is some sort of a memory managment call which isnt included in standard C libraries as it is dependant on microprocessor. So do I have to write _sbrk
function on my own? How do I do it? Do you have any example for arm926ej-s? After writing this function I intend to compile it into an object file and link it together with other objects, libraries.