2016-01-31 09:21 PM
Good afternoon.
I have problem control of disable and enable all interrupts in this processor.Compiller ''arm-none-eabi-gcc'' say me:''bridge.s:400: Error: selected processor does not support Thumb mode `mrs r2,primask'''.And it does not allow to apply the following instructions:__get_PRIMASK (), __set_PRIMASK(previous), __enable_irq(), __disable_irq().Actual algorithms require use this. What me to do? Thanks. #interrupts #interrupts #interrupts2016-02-01 01:15 AM
It is likely you are missing options switches when calling the compiler:
-mcpu=cortex-m4 -mthumb -- Laurent2016-02-01 03:22 AM
Thank you, Laurent.
Compiler options automatically generated by System Workbench for selected chip. Options -mcpu=cortex-m4 -mthumb also. These belongs to specific hardware and it is better not to change them. Result compilation, verbatim: bridge.s: Assembler messages:bridge.s:370: Error: selected processor does not support Thumb mode `cpsid i'.What is this?Unsuported __disable_irq() and similar.
Lack of such instructions in processors I meet for the first time.2016-02-01 03:58 AM
It is hard to help you with so few inputs.
Either your ''System Workbench'' is wrong propagating options to the compiler, or the source file has some invalid data inside. What is bridge.s ? a file of your own, or the intermediate result of C compiler ? Does your workbench display log with full compiler command lines ? ''cpsid i'' is perfectly usable on STM32, you simply need to fix your tools or sources.2016-02-01 04:25 AM
Please attach compilation log and what libraries you are using (download source will be good)
2016-02-01 04:33 AM
Very strange. Compilation options in local setting for project subdirectory do not inherit declaration -mcpu=cortex-m4 from main project settings. In System Workbench this field not editable. But I inserted -mcpu=cortex-m4 in ''Miscellaneous/Other flag'' field and all has been compilled succesfully. Problem solved partialy.
Thanks for the help.