Skip to main content
dcurran2
Associate III
March 8, 2018
Question

Keil v6 compiler and STM32F3xx MXCUbe code, FPUs

  • March 8, 2018
  • 1 reply
  • 1221 views
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
    This topic has been closed for replies.

    1 reply

    Pavel A.
    March 8, 2018
    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