Error: sorry, unimplemented: Thumb-1 hard-float VFP ABI - SOLVED
Hi. I’m new to STM32 in general, so perhaps there is an obvious solution to the problem, but I couldn’t find it.
I am using the STM32F302RET6 chip, and I have generated code from CubeMX. I have then imported the code to System Workbench, and now while compiling it I’m getting the error:
In file included from ../../../Drivers/CMSIS/Include/core_cm4.h:169:0,
from ../../../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xe.h:164,
from ../../../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h:136,
from ../../../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h:48,
from ../../../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_rcc.h:47,
from ../../../Inc/stm32f3xx_hal_conf.h:178,
from ../../../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal.h:48,
from D:/Kazek/Projekty/Telefony_RTL20/soft_v3_stm/RTL20/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c:54:
../../../Drivers/CMSIS/Include/core_cmInstr.h: In function ‘__REV’:
../../../Drivers/CMSIS/Include/core_cmInstr.h:405:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
The compiler options are:
COLLECT_GCC_OPTIONS=’-mthumb’ ‘-mfloat-abi=hard’ ‘-mfpu=fpv4-sp-d16’ ‘-D’ ‘USE_HAL_DRIVER’ ‘-D’ ‘STM32F302xE’ ‘-I’ ‘../../../Inc’ ‘-I’ ‘../../../Drivers/STM32F3xx_HAL_Driver/Inc’ ‘-I’ ‘../../../Drivers/CMSIS/Include’ ‘-I’ ‘../../../Drivers/CMSIS/Device/ST/STM32F3xx/Include’ ‘-O1’ ‘-g3’ ‘-Wall’ ‘-fmessage-length=0’ ‘-v’ ‘-ffunction-sections’ ‘-c’ ‘-MMD’ ‘-MP’ ‘-MF’ ‘Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.d’ ‘-MT’ ‘Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.o’ ‘-o’ ‘Drivers/STM32F3xx_HAL_Driver/stm32f3xx_hal.o’
I have checked the MCU settings, and they are:
Floating point hardware: fpv4-sp-d16
Floating-point ABI: hard
Instruction Set: Thumb II
I have read elsewhere, that Thumb-1 does not support hardware floating point calculations. But There is Thumb II selected in the options. Why does the error say about Thumb-1?
EDIT - SOLVED:
The problem was that the target MCU was not set properly by Cube MX (In Workbench: Project Properties -> C/C++ Build -> Settings -> Target tab). It seems that the MCU is forgotten (not saved) if the target board is not set. I had to define a custom board, and then set the MCU, and it now compiles properly.