Topic : Error "selected processor does not support Thumb mode"

Forum : ARM

Original Post
Post Information Post
June 27, 2016 - 11:03am
Michael Bohle

Hello,
when i try to compile sourcecode for the "STM32F091CCT6", the compiler give the error "selected processor does not support Thumb mode". When i then use the flag "-marm", the error is "target CPU does not support ARM mode". What is the problem here, bt. how can i fix it?

The compilation of the same sourcecode for the processor "STM32F103CBT6" (e.g.) succeeds without an error. But thats not helpful for me.

Thank you for your support.

Best regards,
Michael Bohle

Replies
Post Information Post
+1
0
-1
June 29, 2016 - 3:29pm
Etienne Cassin

Hello,

Could you, please, send us an example project showing the problem.

Thanks

+1
0
-1
June 30, 2016 - 12:27pm
Michael Bohle

Hello,

i've solved the problem. With the gcc compileroptions "-mcpu=cortex-m3 -mthumb -mno-thumb-interwork -mfpu=vfp -msoft-float -mfix-cortex-m3-ldrd" THIS specific error disappears.

The next error was "registers may not be the same - strexb/h". To solve this i had to modify the codefile "core_cm3.c":
"__ASM volatile ("strexb %0, %2, [%1]" : "=r" (result)...." must be replaced with "__ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result)"

Up to now, i couldn't compile the project completely, but this because of differences in the library (old STM32F103 -> new STM32091)

Best regards,
Michael Bohle

+1
0
-1
July 1, 2016 - 8:59am
Etienne Cassin

please have a look of the FAQ http://support.raisonance.com/content/what-are-major-changes-rkit-arm-154-migrating-gcc-arm-46x-483

regards