diff options
Diffstat (limited to 'src/target/cortex_m3.h')
-rw-r--r-- | src/target/cortex_m3.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/target/cortex_m3.h b/src/target/cortex_m3.h index e6714d00..ba61b1cb 100644 --- a/src/target/cortex_m3.h +++ b/src/target/cortex_m3.h @@ -117,6 +117,21 @@ extern char* cortex_m3_state_strings[]; #define FPCR_REPLACE_BKPT_HIGH (2 << 30) #define FPCR_REPLACE_BKPT_BOTH (3 << 30) +/* Use MRS/MSR to read/write any of these special registers. Some of + * them (xPSR, MSP, PSP) are always available using DCRxR. Starting in + * Cortex-M3 r2p0, some (CONTROL, BASEPRI, and *MASK) are also available + * through DCRxR. + * NOTE: this listing omits xPSR components and other mixtures. + */ +#define SR_XPSR 3 +#define SR_MSP 8 +#define SR_PSP 9 +#define SR_PRIMASK 16 +#define SR_BASEPRI 17 +#define SR_BASEPRI_MAX 18 +#define SR_FAULTMASK 19 +#define SR_CONTROL 20 + typedef struct cortex_m3_fp_comparator_s { int used; |