2018-05-21 05:34 AM
Hey Folks, i got the following problem: I made a project with STM32CubeMX and imported it into ST4STM32/OpenSTM32. There i converted it via right-click to a c++ project. I specified the model in stm32l4xx.h, changed _Error_Handler(
FILE
,LINE
); to _Error_Handler((char *)FILE
,LINE
); in main.c and renamed it to main.cpp to get rid of the few errors. When i build debug for the project everythings fine and i get no errors but when i try to build the release i get the following error: (my board is the Nucleo L432KC)And thanks for your help!
Building target: robot_firmware.elf
Invoking: MCU G++ Linkerarm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -T'../STM32L432KCUx_FLASH.ld' -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -specs=nosys.specs -specs=nano.specs -o 'robot_firmware.elf' @'objects.list' -lmarm-none-eabi-g++: fatal error: c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/nosys.specs: attempt to rename spec 'link_gcc_c_sequence' to already defined spec 'nosys_link_gcc_c_sequence'compilation terminated.makefile:50: recipe for target 'robot_firmware.elf' failedmake: *** [robot_firmware.elf] Error 1make: Target 'all' not remade because of errors.#build-error #nucleo #eclipse #nucleo-l432kc2018-05-21 08:45 AM
Alright I found a solution.
If you experience the same error then try this:
Right click on project folder -> Properties -> C/C++ Build - Settings -> on the right: MCU G++ Linker - Miscellaneous -> remove -specs=nosys.specs -specs=nano.specs from the Linker flags
now everything works fine, no errors and program runs.