target: move regmaps to armv7m.c
authorSpencer Oliver <spen@spen-soft.co.uk>
Fri, 13 Jan 2012 10:45:36 +0000 (10:45 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 18 Jan 2012 21:45:42 +0000 (21:45 +0000)
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>
src/target/armv7m.c
src/target/armv7m.h
src/target/cortex_m.c

index d8aed89ce04b56a164a9f615e8caab9e760f4d14..6c1732e92d5702faa02e92b7be46042ee3abc3c0 100644 (file)
@@ -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};
 
index ca921468fc15c4511bf9d5e8ebd8a1518b414a6c..aef6b767bdf100354bf003eb065544571025442e 100644 (file)
@@ -49,6 +49,8 @@ enum armv7m_mode
 };
 
 extern char *armv7m_mode_strings[];
+extern const int armv7m_psp_reg_map[];
+extern const int armv7m_msp_reg_map[];
 
 enum armv7m_regtype
 {
index f181060ab08a0ed42f165872fcaab92925171710..7bf6f79f56294559524a728a96c8ebedfd6a7684 100644 (file)
@@ -406,24 +406,6 @@ static int cortex_m3_examine_exception_reason(struct target *target)
        return retval;
 }
 
-/* PSP is used in some thread modes */
-static 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 */
-static 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,
-};
-
 static int cortex_m3_debug_entry(struct target *target)
 {
        int i;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)