Code: Select all
Linking build/ch.elf
/opt/arm_gcc/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
collect2: error: ld returned 1 exit status
If I take out the memset than I can compile/linke the code. What can be the problem?
I also decided to use the ChibiOS/RT memory allocation, but I haven't found any example regarding this.
For example what is the equivalent code for this:
Code: Select all
double * t = (double *) malloc(2*2*sizeof(double))
memset((void *) t, 0, sizeof(double) * 4);
free(t);