Linking to _sbrk
Posted: Sun Dec 20, 2015 4:36 am
Hi,
I want to print out some data from my calculations, which I want to do with my STM32. But sbrkr.c is unable to link _sbrk.
I've checked, that CH_CFG_USE_MEMCORE is set TRUE (See http://stackoverflow.com/questions/3244 ... 6#32446906).
I've also checked, that $(CHIBIOS)/os/various is included. (See viewtopic.php?t=630&p=6424)
Regards
Sven
I want to print out some data from my calculations, which I want to do with my STM32. But sbrkr.c is unable to link _sbrk.
Code: Select all
double t = 0;
while(t < 90) {
sgp4(&m, tsince, &e, pos, vel);
char buff[30];
sprintf(buff, "%f %f %f %f\n", t, pos[0], pos[1], pos[2]);
uartStartSend(&UARTD2, sizeof(buff), buff);
t += 1;
}Code: Select all
/home/sven/gcc-arm-none-eabi-4_8-2014q2/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m/libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
collect2: error: ld returned 1 exit statusI've checked, that CH_CFG_USE_MEMCORE is set TRUE (See http://stackoverflow.com/questions/3244 ... 6#32446906).
I've also checked, that $(CHIBIOS)/os/various is included. (See viewtopic.php?t=630&p=6424)
Regards
Sven