cancel
Showing results for 
Search instead for 
Did you mean: 

Error: selected processor does not support `dsb 0xF' in Thumb mode

Shreekant Tembhekar
Associate II

I have created sample code for STM32L010R8 using cubemx v5.0.1. When I try to compile the code, I am getting this error. What couldbe the reason.

Please help.

8 REPLIES 8
AvaTar
Lead

An incorrect library ?

The Cortex M0/M0+ supports only a subset of thumb instructions, so linking against M3/M4 libs will fail.

I don't use Cube, not sure what role it plays here in connection with your toolchain.

Rick Hamilton
Associate II

I have the same issue. Its the same every time you update the CUBE it makes working projects stop working. I wish they would test or leave things alone. If its not broke do not fix it.

Description Resource Path Location Type

make: *** [Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o] Error 1 AQU83 C/C++ Problem

selected processor does not support `dsb 0xF' in Thumb mode AQU83 line 292, external location: C:\Users\Ricky\AppData\Local\Temp\ccjy6QCz.s C/C++ Problem

selected processor does not support `dsb 0xF' in Thumb mode AQU83 line 345, external location: C:\Users\Ricky\AppData\Local\Temp\ccjy6QCz.s C/C++ Problem

selected processor does not support `dsb 0xF' in Thumb mode AQU83 line 367, external location: C:\Users\Ricky\AppData\Local\Temp\ccjy6QCz.s C/C++ Problem

selected processor does not support `isb 0xF' in Thumb mode AQU83 line 303, external location: C:\Users\Ricky\AppData\Local\Temp\ccjy6QCz.s C/C++ Problem

Still no solution posted ?

The DSB instruction requires ARMv7 (M3 and up), the M0/M0+ is ARMv6.

It seems CubeMX mostly increases in size and number of supported devices, but not much in quality and robustness.

Rick Hamilton
Associate II

I have re-installed 64 bit Java, reinstalled the whole SW4STM32.... Still the same issue.

All I want to do is change the function of 3 pins to GP Outputs.

Using the cube to generate the code just breaks it. Compiles OK before that (Old project).

The issue is compiling stm32f1xx_hal_cortex.c

If I comment out the HAL_CORTEX_MODULE_ENABLED these errors go away but I get a bunch of others. I do not think this update was tested.

I will just write to the registers to set the IO up and just forget about the CUBE. What a joke!

Ozone
Lead II

> The issue is compiling stm32f1xx_hal_cortex.c

This seems strange. The F1xx devices are Cortex M3, and do support DSB/ISB instructions.

I might mention I'm no Cube user, for certain unnamed reasons.

Piranha
Chief II

Guys, look carefully at the error - the instruction has an option "0xF". That is only supported in full ARM instruction set, but not in Thumb mode on Cortex-M3. The compiler is missing -mcpu=cortex-m3 parameter.

https://lmgtfy.com/?q=Error%3A+selected+processor+does+not+support+%60dsb+0xF%27+in+Thumb+mode

https://stackoverflow.com/a/39792354

hello Piranha , where to add  -mcpu=cortex-m3  parameter in Cube IDE ?

thanks

Hi, I had the same error, and found out you can add the "-mcpu=cortex-m4" flag in the "Miscellaneous" tab :0693W00000BZrtmQAD.png