diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2012-01-13 10:45:36 +0000 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-01-18 21:45:42 +0000 |
commit | 3528457ba8f8b41e2bb96ee925dec21eaab1644a (patch) | |
tree | 71f6c4bf2d193eb288176ae2853778dbc8e2ad24 /src/target/armv7m.c | |
parent | 0c2f8b6eb8f4b379aa0c78caba73ec1ebaae8414 (diff) | |
download | riscv-openocd-3528457ba8f8b41e2bb96ee925dec21eaab1644a.zip riscv-openocd-3528457ba8f8b41e2bb96ee925dec21eaab1644a.tar.gz riscv-openocd-3528457ba8f8b41e2bb96ee925dec21eaab1644a.tar.bz2 |
target: move regmaps to armv7m.c
This move will enable use to share with regmaps with the stlink target.
Change-Id: If8f41c7c53323d5074cb22ec3440530c1e402004
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/377
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/target/armv7m.c')
-rw-r--r-- | src/target/armv7m.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/target/armv7m.c b/src/target/armv7m.c index d8aed89..6c1732e 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -58,6 +58,24 @@ static char *armv7m_exception_strings[] = "DebugMonitor", "RESERVED", "PendSV", "SysTick" }; +/* PSP is used in some thread modes */ +const int armv7m_psp_reg_map[17] = { + ARMV7M_R0, ARMV7M_R1, ARMV7M_R2, ARMV7M_R3, + ARMV7M_R4, ARMV7M_R5, ARMV7M_R6, ARMV7M_R7, + ARMV7M_R8, ARMV7M_R9, ARMV7M_R10, ARMV7M_R11, + ARMV7M_R12, ARMV7M_PSP, ARMV7M_R14, ARMV7M_PC, + ARMV7M_xPSR, +}; + +/* MSP is used in handler and some thread modes */ +const int armv7m_msp_reg_map[17] = { + ARMV7M_R0, ARMV7M_R1, ARMV7M_R2, ARMV7M_R3, + ARMV7M_R4, ARMV7M_R5, ARMV7M_R6, ARMV7M_R7, + ARMV7M_R8, ARMV7M_R9, ARMV7M_R10, ARMV7M_R11, + ARMV7M_R12, ARMV7M_MSP, ARMV7M_R14, ARMV7M_PC, + ARMV7M_xPSR, +}; + #ifdef ARMV7_GDB_HACKS uint8_t armv7m_gdb_dummy_cpsr_value[] = {0, 0, 0, 0}; |