diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-10 11:43:48 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-04-10 11:43:48 +0000 |
commit | 9c3dec377eb6eb822b85fa107ade2a62c9e1cfd1 (patch) | |
tree | 528bc639688200b05ae27df46046c3544399d121 /src/target/armv7m.h | |
parent | 1ade331ba925c506ed4254f31dba5e6f9cf782b4 (diff) |
- single core context used, removed debug context as thought unnecessary.
- DCRDR now used to access special core registers - info is currently omitted from the cortex_m3 TRM ARM have told me this is the preferred access method and the docs will be updated soon.
- now checks for User Thread Mode and Thread mode when halted.
- removed repeated function declarations from command.c
- cortex_m3_prepare_reset_halt removed, updated cortex_m3_assert_reset to suit
git-svn-id: svn://svn.berlios.de/openocd/trunk@558 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/armv7m.h')
-rw-r--r-- | src/target/armv7m.h | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/src/target/armv7m.h b/src/target/armv7m.h index a29593da..8199c23a 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -29,19 +29,14 @@ enum armv7m_mode { - ARMV7M_MODE_HANDLER = 0, - ARMV7M_MODE_THREAD = 1, + ARMV7M_MODE_THREAD = 0, + ARMV7M_MODE_USER_THREAD = 1, + ARMV7M_MODE_HANDLER = 2, ARMV7M_MODE_ANY = -1 }; extern char* armv7m_mode_strings[]; -enum armv7m_state -{ - ARMV7M_STATE_THUMB, - ARMV7M_STATE_DEBUG, -}; - enum armv7m_regtype { ARMV7M_REGISTER_CORE_GP, @@ -49,13 +44,6 @@ enum armv7m_regtype ARMV7M_REGISTER_MEMMAP }; -enum armv7m_runcontext -{ - ARMV7M_PROCESS_CONTEXT, - ARMV7M_DEBUG_CONTEXT -}; - -extern char* armv7m_state_strings[]; extern char* armv7m_exception_strings[]; extern char *armv7m_exception_string(int number); @@ -80,11 +68,8 @@ typedef struct armv7m_common_s { int common_magic; reg_cache_t *core_cache; - reg_cache_t *process_context; - reg_cache_t *debug_context; enum armv7m_mode core_mode; - enum armv7m_state core_state; - int exception_number; + int exception_number; /* Direct processor core register read and writes */ int (*load_core_reg_u32)(struct target_s *target, enum armv7m_regtype type, u32 num, u32 *value); @@ -108,9 +93,8 @@ typedef struct armv7m_common_s typedef struct armv7m_algorithm_s { int common_magic; - + enum armv7m_mode core_mode; - enum armv7m_state core_state; } armv7m_algorithm_t; typedef struct armv7m_core_reg_s @@ -137,9 +121,6 @@ extern int armv7m_run_algorithm(struct target_s *target, int num_mem_params, mem extern int armv7m_invalidate_core_regs(target_t *target); -extern enum armv7m_runcontext armv7m_get_context(target_t *target); -extern int armv7m_use_context(target_t *target, enum armv7m_runcontext new_ctx); -extern enum armv7m_runcontext armv7m_get_context(target_t *target); extern int armv7m_restore_context(target_t *target); extern int armv7m_checksum_memory(struct target_s *target, u32 address, u32 count, u32* checksum); |