Browse Source

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>
tags/v0.6.0-rc1
Spencer Oliver 12 years ago
parent
commit
3528457ba8
3 changed files with 20 additions and 18 deletions
  1. +18
    -0
      src/target/armv7m.c
  2. +2
    -0
      src/target/armv7m.h
  3. +0
    -18
      src/target/cortex_m.c

+ 18
- 0
src/target/armv7m.c View File

@@ -58,6 +58,24 @@ static char *armv7m_exception_strings[] =
"DebugMonitor", "RESERVED", "PendSV", "SysTick" "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 #ifdef ARMV7_GDB_HACKS
uint8_t armv7m_gdb_dummy_cpsr_value[] = {0, 0, 0, 0}; uint8_t armv7m_gdb_dummy_cpsr_value[] = {0, 0, 0, 0};




+ 2
- 0
src/target/armv7m.h View File

@@ -49,6 +49,8 @@ enum armv7m_mode
}; };


extern char *armv7m_mode_strings[]; extern char *armv7m_mode_strings[];
extern const int armv7m_psp_reg_map[];
extern const int armv7m_msp_reg_map[];


enum armv7m_regtype enum armv7m_regtype
{ {


+ 0
- 18
src/target/cortex_m.c View File

@@ -406,24 +406,6 @@ static int cortex_m3_examine_exception_reason(struct target *target)
return retval; 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) static int cortex_m3_debug_entry(struct target *target)
{ {
int i; int i;


Loading…
Cancel
Save