OpenOCD
|
Go to the source code of this file.
Macros | |
#define | ARMV7M_SCS_DCRDR DCB_DCRDR |
#define | ARMV7M_SCS_DCRSR DCB_DCRSR |
#define | SAVED_DCRDR dbgbase /* FIXME: using target->dbgbase to preserve DCRDR */ |
Functions | |
static int | adapter_debug_entry (struct target *target) |
static int | adapter_examine_debug_reason (struct target *target) |
static int | adapter_halt (struct target *target) |
static int | adapter_init_arch_info (struct target *target, struct cortex_m_common *cortex_m, struct jtag_tap *tap) |
static int | adapter_init_target (struct command_context *cmd_ctx, struct target *target) |
static int | adapter_load_context (struct target *target) |
static int | adapter_load_core_reg_u32 (struct target *target, uint32_t regsel, uint32_t *value) |
static int | adapter_poll (struct target *target) |
static int | adapter_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | adapter_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
static int | adapter_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
static int | adapter_store_core_reg_u32 (struct target *target, uint32_t regsel, uint32_t value) |
static int | adapter_target_create (struct target *target, Jim_Interp *interp) |
static int | adapter_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | hl_assert_reset (struct target *target) |
static int | hl_dcc_read (struct hl_interface_s *hl_if, uint8_t *value, uint8_t *ctrl) |
static int | hl_deassert_reset (struct target *target) |
static int | hl_handle_target_request (void *priv) |
static int | hl_target_request_data (struct target *target, uint32_t size, uint8_t *buffer) |
static struct hl_interface_s * | target_to_adapter (struct target *target) |
Variables | |
static const struct command_registration | hla_command_handlers [] |
struct target_type | hla_target |
#define ARMV7M_SCS_DCRDR DCB_DCRDR |
Definition at line 37 of file hla_target.c.
#define ARMV7M_SCS_DCRSR DCB_DCRSR |
Definition at line 36 of file hla_target.c.
#define SAVED_DCRDR dbgbase /* FIXME: using target->dbgbase to preserve DCRDR */ |
Definition at line 34 of file hla_target.c.
|
static |
Definition at line 228 of file hla_target.c.
References adapter, adapter_load_context(), armv7m_common::arm, ARM_MODE_HANDLER, arm_mode_name(), ARM_MODE_THREAD, ARM_MODE_USER_THREAD, ARMV7M_CONTROL, armv7m_msp_reg_map, armv7m_psp_reg_map, buf_get_u32(), arm::core_cache, arm::core_mode, arm::cpsr, DCB_DCRDR, DCB_DEMCR, ERROR_OK, armv7m_common::examine_debug_reason, armv7m_common::exception_number, LOG_DEBUG, arm::map, arm::pc, reg_cache::reg_list, target_read_u32(), target_state_name(), target_to_adapter(), target_to_armv7m(), TRCENA, and reg::value.
Referenced by adapter_poll(), and adapter_step().
|
static |
Definition at line 58 of file hla_target.c.
References DBG_REASON_BREAKPOINT, DBG_REASON_DBGRQ, DBG_REASON_SINGLESTEP, target::debug_reason, and ERROR_OK.
Referenced by adapter_init_arch_info().
|
static |
Definition at line 412 of file hla_target.c.
References adapter, DBG_REASON_DBGRQ, target::debug_reason, ERROR_OK, LOG_DEBUG, LOG_WARNING, target::state, TARGET_HALTED, target_to_adapter(), and TARGET_UNKNOWN.
|
static |
Definition at line 157 of file hla_target.c.
References adapter_examine_debug_reason(), adapter_load_core_reg_u32(), adapter_store_core_reg_u32(), cortex_m_common::armv7m, armv7m_init_arch_info(), ERROR_OK, armv7m_common::examine_debug_reason, hl_handle_target_request(), armv7m_common::is_hla_target, armv7m_common::load_core_reg_u32, LOG_DEBUG, armv7m_common::store_core_reg_u32, target_register_timer_callback(), and TARGET_TIMER_TYPE_PERIODIC.
Referenced by adapter_target_create().
|
static |
Definition at line 180 of file hla_target.c.
References arm_semihosting_init(), armv7m_build_reg_cache(), ERROR_OK, and LOG_DEBUG.
|
static |
Definition at line 213 of file hla_target.c.
References armv7m_common::arm, ARM_MODE_ANY, arm::core_cache, ERROR_OK, reg::exist, reg_cache::num_regs, arm::read_core_reg, reg_cache::reg_list, target_to_armv7m(), and reg::valid.
Referenced by adapter_debug_entry().
|
static |
Definition at line 44 of file hla_target.c.
References adapter, and target_to_adapter().
Referenced by adapter_init_arch_info().
|
static |
Definition at line 286 of file hla_target.c.
References adapter, adapter_debug_entry(), armv7m_common::arm, arm_semihosting(), buf_get_u32(), ERROR_OK, ERROR_TARGET_FAILURE, LOG_DEBUG, LOG_ERROR, arm::pc, state, target::state, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RUNNING, target_to_adapter(), target_to_armv7m(), TARGET_UNKNOWN, and reg::value.
|
static |
Definition at line 592 of file hla_target.c.
References adapter, buffer, count, ERROR_COMMAND_SYNTAX_ERROR, LOG_DEBUG, size, TARGET_ADDR_FMT, and target_to_adapter().
|
static |
Definition at line 437 of file hla_target.c.
References adapter, breakpoint::address, armv7m_common::arm, armv7m_maybe_skip_bkpt_inst(), armv7m_restore_context(), breakpoint_find(), buf_get_u32(), buf_set_u32(), arm::core_cache, cortex_m_enable_breakpoints(), cortex_m_enable_watchpoints(), cortex_m_set_breakpoint(), cortex_m_unset_breakpoint(), DBG_REASON_NOTHALTED, DCB_DCRDR, DCB_DEMCR, target::debug_reason, armv7m_common::demcr, reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_WARNING, NULL, arm::pc, register_cache_invalidate(), target::state, TARGET_ADDR_FMT, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_RESUMED, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_RUNNING, target_to_adapter(), target_to_armv7m(), target_write_u32(), TRCENA, breakpoint::unique_id, reg::valid, and reg::value.
|
static |
Definition at line 528 of file hla_target.c.
References adapter, adapter_debug_entry(), armv7m_common::arm, armv7m_maybe_skip_bkpt_inst(), armv7m_restore_context(), breakpoint_find(), buf_get_u32(), buf_set_u32(), arm::core_cache, cortex_m_set_breakpoint(), cortex_m_unset_breakpoint(), DBG_REASON_SINGLESTEP, DCB_DCRDR, target::debug_reason, reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_INFO, LOG_WARNING, NULL, arm::pc, register_cache_invalidate(), target::state, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_EVENT_RESUMED, TARGET_HALTED, target_to_adapter(), target_to_armv7m(), target_write_u32(), reg::valid, and reg::value.
|
static |
Definition at line 51 of file hla_target.c.
References adapter, and target_to_adapter().
Referenced by adapter_init_arch_info().
|
static |
Definition at line 190 of file hla_target.c.
References adapter_init_arch_info(), adiv5_private_config::ap_num, cortex_m_common::common_magic, CORTEX_M_COMMON_MAGIC, DP_APSEL_INVALID, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, target::private_config, and target::tap.
|
static |
Definition at line 607 of file hla_target.c.
References adapter, buffer, count, ERROR_COMMAND_SYNTAX_ERROR, LOG_DEBUG, size, TARGET_ADDR_FMT, and target_to_adapter().
|
static |
Definition at line 329 of file hla_target.c.
References adapter, adapter_assert_reset(), AIRCR_SYSRESETREQ, AIRCR_VECTKEY, armv7m_common::arm, C_DEBUGEN, arm::core_cache, DBG_REASON_DBGRQ, DBGKEY, DCB_DEMCR, DCB_DHCSR, target::debug_reason, target::defer_examine, ERROR_COMMAND_NOTFOUND, ERROR_OK, jtag_get_reset_config(), jtag_reset_config, LOG_DEBUG, LOG_ERROR, LOG_TARGET_DEBUG, NVIC_AIRCR, register_cache_invalidate(), target::reset_halt, RESET_HAS_SRST, RESET_SRST_NO_GATING, srst_asserted, target::state, target_examine_one(), TARGET_HALTED, TARGET_RESET, target_to_adapter(), target_to_armv7m(), target_was_examined(), TRCENA, and VC_CORERESET.
|
static |
Definition at line 68 of file hla_target.c.
References hl_layout::api, ctrl, DCB_DCRDR, ERROR_OK, hl_interface_s::handle, hl_if, hl_interface_s::layout, LOG_DEBUG, hl_layout_api_s::read_mem, and hl_layout_api_s::write_mem.
Referenced by hl_handle_target_request(), and hl_target_request_data().
|
static |
Definition at line 398 of file hla_target.c.
References adapter_deassert_reset(), ERROR_OK, jtag_get_reset_config(), jtag_reset_config, LOG_DEBUG, target::reset_halt, RESET_HAS_SRST, and target_resume().
|
static |
Definition at line 109 of file hla_target.c.
References ctrl, target::dbg_msg_enabled, ERROR_OK, hl_dcc_read(), hl_if, priv, target::state, target_request(), TARGET_RUNNING, target_to_adapter(), and target_was_examined().
Referenced by adapter_init_arch_info().
|
static |
Definition at line 90 of file hla_target.c.
References buffer, ctrl, ERROR_OK, hl_dcc_read(), hl_if, size, and target_to_adapter().
|
inlinestatic |
Definition at line 39 of file hla_target.c.
References jtag_tap::priv, and target::tap.
Referenced by adapter_debug_entry(), adapter_halt(), adapter_load_core_reg_u32(), adapter_poll(), adapter_read_memory(), adapter_resume(), adapter_step(), adapter_store_core_reg_u32(), adapter_write_memory(), hl_assert_reset(), hl_handle_target_request(), and hl_target_request_data().
|
static |
Definition at line 607 of file hla_target.c.
struct target_type hla_target |
Definition at line 607 of file hla_target.c.