When building an STM32F413 project with FPU enabled under latest ChibiStudio with GCC 7 the following link error occurs...
Code: Select all
c:/chibistudio/tools/gnu tools arm embedded/7.0 2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
1. This looks like a GCC library issue. Linking is OK by explicitly adding $(CHIBIOS)/os/various/syscalls.c to the source files in the build
2. This link error does not happen under GCC 6.3 so that seems to imply that GCC 6.3 is finding _sbrk OK in the GCC library
3. Shouldn't it be the case that the ChibiOS specific syscalls.c is always built and linked to projects?
So either $(CHIBIOS)/os/various/syscalls.c should be explicitly in the source list of make files
Should one of the .mk files for ChibiOS system have syscalls.c added to the source list?