How can I acess the core register of the ARM?

Status
Not open for further replies.
Hello guys,

how can I acess or change the core registers of the ARM? Im trying to use the CMSIS fncions like __set_PRIMASK() but I always get "the was not declared in this scope" error.

Is it possible to acess the registers using this functions? What do I need to change to make it happen? Or is there a better way of changing the registers?

I'm kinda new at this.

Thank you,
Artur Zorzol
 
Thank you Paul, ill definitely check that. But I'm a little bit confused, why doesn't the cmsis functions, described on the ARM's website, work for the board? Shouldn't they work with any ARM processor?
 
The CMSIS functions work definitively on the Teensy, you can use them in ASM() as it is for example done in the dspinst.h file which is part of the audio library.

What does not work by default are these function macro wrapper which start on two underscores like __set_PRIMASK(). These aren't the functions themselves but just wrappers for easier use which the ARM/KEIL environment (which uses the IAR compiler) adds for the convenience of some developers.

Paul decided to include something similar in his kinetis.h file as he explained above. Thus both ways, the one in the Keil IDE, the other in the Teensyduino IDE, are equivalent, it's like two different dialects of the same language.
 
We I started Teensy 3.0 in 2012, CMSIS was very new and not very stable. Since then, ARM made numerous incompatible changes. Things seem to have settled down now, so perhaps at some point we'll add CMSIS support. But Teensy's main goal is API compatibility with Arduino. Most of my dev time time goes into Arduino libs & features. CMSIS just isn't a priority.
 
Status
Not open for further replies.
Back
Top