14 #ifndef OPENOCD_TARGET_ARMV7M_H
15 #define OPENOCD_TARGET_ARMV7M_H
216 #define ARMV7M_NUM_CORE_REGS (ARMV7M_CORE_LAST_REG - ARMV7M_CORE_FIRST_REG + 1)
218 #define ARMV7M_COMMON_MAGIC 0x2A452A45U
314 int num_mem_params,
struct mem_param *mem_params,
315 int num_reg_params,
struct reg_param *reg_params,
317 int timeout_ms,
void *arch_info);
320 int num_mem_params,
struct mem_param *mem_params,
321 int num_reg_params,
struct reg_param *reg_params,
326 int num_mem_params,
struct mem_param *mem_params,
327 int num_reg_params,
struct reg_param *reg_params,
338 unsigned int *reg32_id, uint32_t *
offset);
Holds the interface to ARM cores.
static bool is_arm(struct arm *arm)
arm_mode
Represent state of an ARM core.
static struct arm * target_to_arm(struct target *target)
Convert target handle to generic ARM target state handle.
int armv7m_get_gdb_reg_list(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class)
Returns generic ARM userspace registers to GDB.
int armv7m_maybe_skip_bkpt_inst(struct target *target, bool *inst_found)
void armv7m_free_reg_cache(struct target *target)
static struct armv7m_common * target_to_armv7m_safe(struct target *target)
int armv7m_mode_to_number(enum armv7m_mode mode)
uint32_t armv7m_map_id_to_regsel(unsigned int arm_reg_id)
const int armv7m_msp_reg_map[]
struct reg_cache * armv7m_build_reg_cache(struct target *target)
Builds cache of architecturally defined registers.
@ ARMV8M_REGSEL_PMSK_BPRI_FLTMSK_CTRL_S
@ ARMV8M_REGSEL_PSPLIM_NS
@ ARMV7M_REGSEL_PMSK_BPRI_FLTMSK_CTRL
@ ARMV8M_REGSEL_MSPLIM_NS
@ ARMV8M_REGSEL_PMSK_BPRI_FLTMSK_CTRL_NS
@ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_NS
@ ARMV7M_PMSK_BPRI_FLTMSK_CTRL
@ ARMV8M_PMSK_BPRI_FLTMSK_CTRL_S
enum armv7m_mode armv7m_number_to_mode(int number)
int armv7m_wait_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t exit_point, int timeout_ms, void *arch_info)
Waits for an algorithm in the target.
int armv7m_checksum_memory(struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum)
Generates a CRC32 checksum of a memory region.
static struct armv7m_common * target_to_armv7m(struct target *target)
bool armv7m_map_reg_packing(unsigned int arm_reg_id, unsigned int *reg32_id, uint32_t *offset)
int armv7m_blank_check_memory(struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value)
Checks an array of memory regions whether they are erased.
int armv7m_arch_state(struct target *target)
Logs summary of ARMv7-M state for a halted target.
int armv7m_restore_context(struct target *target)
Restores target context using the cache of core registers set up by armv7m_build_reg_cache(),...
const char * armv7m_exception_string(int number)
Maps ISR number (from xPSR) to name.
#define ARMV7M_COMMON_MAGIC
int armv7m_start_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, void *arch_info)
Starts a Thumb algorithm in the target.
int armv7m_run_algorithm(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info)
Runs a Thumb algorithm in the target.
int armv7m_invalidate_core_regs(struct target *target)
static bool is_armv7m(const struct armv7m_common *armv7m)
const struct command_registration armv7m_command_handlers[]
int armv7m_init_arch_info(struct target *target, struct armv7m_common *armv7m)
Sets up target as a generic ARMv7-M core.
const int armv7m_psp_reg_map[]
Holds the interface to ITM and DWT configuration functions.
enum esirisc_reg_num number
This represents an ARM Debug Interface (v5) Access Port (AP).
Represents a generic ARM core, with standard application registers.
unsigned int common_magic
uint32_t context[ARMV7M_LAST_REG]
struct armv7m_trace_config trace_config
void(* pre_restore_context)(struct target *target)
unsigned int common_magic
int(* store_core_reg_u32)(struct target *target, uint32_t regsel, uint32_t value)
int(* load_core_reg_u32)(struct target *target, uint32_t regsel, uint32_t *value)
struct adiv5_ap * debug_ap
int(* examine_debug_reason)(struct target *target)
int(* post_debug_entry)(struct target *target)
#define container_of(ptr, type, member)
Cast a member of a structure out to the containing structure.