3 years, 5 months ago.

mbed-os basic example compile error

Hi everyone,

i got some compiling error. I'm just export the rtos basic example from mbed web IDE, the board is Nucleo-F446RE. Export Toolchain is SW4STEM32 System Workbench For STM32

The error is 11:23:37 Build of configuration Debug for project Nucleo_rtos_basic make all 'Building file: ../mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.S' 'Invoking: MCU GCC Compiler'

HAL_CM4.S: Assembler messages:

HAL_CM4.S:225: Error: selected processor does not support `vstmdbeq R12!,{S16-S31}' in Thumb mode HAL_CM4.S:230: Error: incorrect condition in IT block `movne R0,#0x00' HAL_CM4.S:231: Error: instruction not allowed in IT block `strb R0,[R1,#TCB_STACKF]' HAL_CM4.S:254: Error: selected processor does not support `vldmiane R12!,{S16-S31}' in Thumb mode HAL_CM4.S:256: Error: instruction not allowed in IT block `msr PSP,R12' HAL_CM4.S:328: Error: selected processor does not support `vstmdbeq R12!,{S16-S31}' in Thumb mode HAL_CM4.S:333: Error: incorrect condition in IT block `movne R0,#0x00' HAL_CM4.S:334: Error: instruction not allowed in IT block `strb R0,[R1,#TCB_STACKF]' HAL_CM4.S:356: Error: selected processor does not support `vldmiane R12!,{S16-S31}' in Thumb mode HAL_CM4.S:358: Error: instruction not allowed in IT block `msr PSP,R12' make: * [mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.o] Error 1

How to fix it?

2 Answers

3 years, 5 months ago.

Hello,

looks like the CPU is not set correctly. Target is set correctly here : https://github.com/ARMmbed/mbed-os/blob/master/hal/targets.json#L800, but might not be exported as it should. Please can you check the core and fpu settings in the project?

It might be worth creating an issue in https://github.com/ARMmbed/mbed-os. Please try using mbed-cli, to export and see if the problem persist (with the offline tools).

the mcu is set correctly; The more massge you can get from https://developer.mbed.org/questions/73409/Mbed-OS-5-linke-error-in-sw4stm32/

posted by li bao 11 Aug 2016

it's work when i use mbed-cli and GCC_ARM , i export sw4stm32 ide by mbed-cli, It's also not work

posted by li bao 12 Aug 2016
3 years, 5 months ago.

I am also trying to get the mbed-os 5 working offline in ST System Workbench. My board is the Nucloe F401RE. I encountered the same error. I am a rank amateur at this stuff, but it seems to be caused by an incorrect setting for the FPU in the project. Those lines are guarded by the preprocessor #ifdef statement using FPU_PRESENT. In the exported mbed os project FPU_PRESENT=1 so presumably these lines are meant to be included. In my project the FPU was set to none and floating point mode set to soft. By changing the following project settings I was able to resolve this compiler error:

properties->C/C++ Build->Settings->MCU Settings Flaoting point hardware: fpv4-sp-d16 Floating-point ABI: softfp Instruction Set: Thumb II