cancel
Showing results for 
Search instead for 
Did you mean: 

Keil v6 compiler and STM32F3xx MXCUbe code, FPUs

dcurran2
Associate II
Posted on March 08, 2018 at 13:33

Folks again problem with the Keil V6 compiler and ST source code

So code from mxCube v4.24.0

the F3 lib is 1.9

using Keil 5.25 with the project settings modified to the V6.9 compiler and the FPU of the F3 micro is enabled

the Keil IDE produces the following warnings

Follow this thread for getting MxCube projects working with Keil V6 + compilers

https://community.st.com/0D50X00009Xka2aSAB

So then building the project

assembling startup_stm32f302x8.s...

../Src/dma.c(40): warning: In file included from...

../Inc\dma.h(48): warning: In file included from...

../Drivers/STM32F3xx_HAL_Driver/Inc\stm32f3xx_hal.h(48): warning: In file included from...

../Inc\stm32f3xx_hal_conf.h(196): warning: In file included from...

../Drivers/STM32F3xx_HAL_Driver/Inc\stm32f3xx_hal_rcc.h(47): warning: In file included from...

../Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h(48): warning: In file included from...

../Drivers/CMSIS/Device/ST/STM32F3xx/Include\stm32f3xx.h(145): warning: In file included from...

../Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302x8.h(152): warning: In file included from...

../Drivers/CMSIS/Include\core_cm4.h(189): warning: In file included from...

../Drivers/CMSIS/Include\core_cmFunc.h(629): error: unknown register name 'vfpcc' in asm

  __ASM volatile ('VMSR fpscr, %0' : : 'r' (fpscr) : 'vfpcc');

Work around

*************

go to project options -> target

change the floating point hardware to not used and the MxCube project will build

But in the future I would like to use the FPU so how do I get around this ?

attached is the mxCube project that generated the code 

null
1 REPLY 1
Pavel A.
Evangelist III
Posted on March 08, 2018 at 17:10

The incompatibility is in ARM-supplied headers (CMSIS stuff comes from ARM) - so should be fixed by ARM (Keil).

-- pa