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:
I'm a bit newbie and I don't understand what is the chHeapInit. My other question that before I used memset and memcpy, I can replace this with a for cycle to initialize or copy the data, I just wan to know that is there an other way to replace this commands? According this documentation the heap has the same limitation as the C-runtime, what else are the advantages of the heap? http://www.chibios.org/dokuwiki/doku.ph ... age_memory
/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 make: *** [build/ch.elf] Error 1
That is a problem with the C library, you have to provide the implementation of _sbrk(), see the newlib documentation for this. Searching this forum could give you several hits about this.
Under ./os/various there is a file syscall.c, it should provide the required implementations but I never tested it with the RPI port.
/opt/arm_gcc/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/bin/ld: error: no memory region specified for loadable section `.ARM.extab' collect2: error: ld returned 1 exit status
The linker script needs to be updated to allocate the missing sections, look at the standard linker scripts of your compiler, you should see those sections listed inside.
Hi, I'm really newbie, I just started to program embedded system a few days ago, I bought a Raspberry PI, and I don't know where can I find this section/file. Thanks, Robert
/* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, 2011,2012 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
ChibiOS/RT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */