cancel
Showing results for 
Search instead for 
Did you mean: 

Qestion about specific of STM32F3x core

Vyacheslav Azarov
Associate III
Posted on February 01, 2016 at 06:21

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 #interrupts
5 REPLIES 5
stm322399
Senior
Posted on February 01, 2016 at 10:15

It is likely you are missing options switches when calling the compiler:

-mcpu=cortex-m4 -mthumb

--

Laurent

Vyacheslav Azarov
Associate III
Posted on February 01, 2016 at 12:22

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.

stm322399
Senior
Posted on February 01, 2016 at 12:58

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.

Radosław
Senior II
Posted on February 01, 2016 at 13:25

Please attach compilation log and what libraries you are using (download source will be good)

Vyacheslav Azarov
Associate III
Posted on February 01, 2016 at 13:33

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.