2012-12-06 08:09 AM
hello dear forum,
I am trying to compile a C program for STM32F4 microcontroller with yagarto I have run into following error--------------------------------------------c:/olimexods/yagarto/bin/../lib/gcc/arm-none-eabi/4.5.1/../../../../arm-none-eabi/lib\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
C:\msys\1.0\home\yagarto\newlib-build\arm-none-eabi\newlib\libc\reent/../../../../../newlib-1.18.0/newlib/libc/reent/sbrkr.c:60: undefined reference to `_sbrk'
I have been told to implement this sbrk by myself If only I knew anything about it! :(becouse of this I first decided to ask in the forum if somebodyfaced this error before ?now my questiondid anybody face this error before ?how did you solve it ?or could you solve it ?thanks #yagarto-newlib
2012-12-06 08:30 AM
Presumably because you're calling things like malloc()/free()?
Look at how tools like Atollic implement syscalls.c STM32F0xx_AN4065_FW_V1.0.0\Project\STM32F0xx_IAP\binary_template\TrueSTUDIO\STM320518_EVAL\syscalls.c Or a basic Google/Bing search, yieldinghttp://www.yagarto.de/download/yagarto/syscalls.c