46 #define DHCSR_S_REGRDY_TIMEOUT (500)
96 .name =
"Cortex-M35P",
102 .name =
"Cortex-M55",
116 uint32_t num, uint32_t value);
147 uint32_t regsel, uint32_t *value)
152 uint32_t dcrdr, tmp_value;
211 for (
unsigned int reg_id = 0; reg_id < num_regs; reg_id++) {
227 uint32_t *reg_value, uint32_t *dhcsr)
263 uint32_t r_vals[n_r32];
264 uint32_t dhcsr[n_r32];
268 for (reg_id = 0; reg_id < num_regs; reg_id++) {
286 assert(r->
size == 32 || r->
size == 64);
313 bool not_ready =
false;
314 for (
unsigned int i = 0; i < wi; i++) {
331 for (reg_id = 0; reg_id < num_regs; reg_id++) {
338 unsigned int reg32_id;
351 assert(r->
size == 32 || r->
size == 64);
368 uint32_t regsel, uint32_t
value)
418 uint32_t mask_on, uint32_t mask_off)
424 cortex_m->
dcb_dhcsr &= ~((0xFFFFul << 16) | mask_off);
641 for (
unsigned int i = 0; i < cortex_m->
dwt_num_comp; i++) {
651 dwt_list[i].
function);
702 uint32_t shcsr = 0, except_sr = 0, cfsr = -1, except_ar = -1;
717 if (except_sr & 0x40000000) {
770 ", CFSR 0x%" PRIx32
", AR 0x%" PRIx32,
772 shcsr, except_sr, cfsr, except_ar);
802 bool secure_state =
false;
859 ", cpu in %s state, target->state: %s",
862 secure_state ?
"Secure" :
"Non-Secure",
980 retval = detected_failure;
1076 "DHCSR 0x%08" PRIx32
", %d ms",
1112 if (!debug_execution) {
1118 if (debug_execution) {
1160 && !debug_execution)
1168 if (handle_breakpoints) {
1190 if (!debug_execution) {
1211 bool bkpt_inst_found =
false;
1213 bool isr_timed_out =
false;
1230 if (handle_breakpoints) {
1247 if (bkpt_inst_found ==
false) {
1302 if (cortex_m->
fp_rev == 0 && pc_value > 0x1FFFFFFF) {
1309 bool tmp_bp_set = (retval ==
ERROR_OK);
1332 isr_timed_out = ((
timeval_ms() - t_start) > 500);
1343 if (isr_timed_out) {
1345 "leaving target running");
1372 if (isr_timed_out) {
1380 " nvic_icsr = 0x%" PRIx32,
1389 " nvic_icsr = 0x%" PRIx32,
1517 ?
"SYSRESETREQ" :
"VECTRESET");
1521 "handler to reset any peripherals or configure hardware srst support.");
1595 unsigned int fp_num = 0;
1606 while (comparator_list[fp_num].
used && (fp_num < cortex_m->fp_num_code))
1614 if (cortex_m->
fp_rev == 0) {
1617 "cannot handle HW breakpoint above address 0x1FFFFFFE");
1623 }
else if (cortex_m->
fp_rev > 1) {
1627 comparator_list[fp_num].
used =
true;
1701 comparator_list[fp_num].
used =
false;
1743 unsigned int dwt_num = 0;
1754 comparator->
used && dwt_num < cortex_m->dwt_num_comp;
1755 comparator++, dwt_num++)
1761 comparator->
used =
true;
1769 uint32_t
mask = 0, temp;
1818 (
unsigned) comparator->
comp,
1819 (
unsigned) comparator->
mask,
1847 comparator->
used =
false;
1936 unsigned int dwt_num = wp->number;
1939 uint32_t dwt_function;
1945 if (dwt_function &
BIT(24)) {
1946 *hit_watchpoint = wp;
1973 if (((
size == 4) && (address & 0x3u)) || ((
size == 2) && (address & 0x1u)))
1987 if (((
size == 4) && (address & 0x3u)) || ((
size == 2) && (address & 0x1u)))
2020 uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds)
2032 if (reg_value == 0) {
2052 uint32_t sample_count = 0;
2056 uint32_t read_count = max_num_samples - sample_count;
2057 if (read_count > 1024)
2061 (
void *)&samples[sample_count],
2063 sample_count += read_count;
2081 *num_samples = sample_count;
2134 #define DWT_COMPARATOR(i) \
2135 { DWT_COMP0 + 0x10 * (i), "dwt_" #i "_comp", 32, }, \
2136 { DWT_MASK0 + 0x10 * (i), "dwt_" #i "_mask", 4, }, \
2137 { DWT_FUNCTION0 + 0x10 * (i), "dwt_" #i "_function", 32, }
2154 #undef DWT_COMPARATOR
2207 cache = calloc(1,
sizeof(*cache));
2213 cache->
name =
"Cortex-M DWT registers";
2226 for (
unsigned int i = 0; i < cm->
dwt_num_comp; i++, comparator++) {
2230 for (j = 0; j < 3; j++,
reg++)
2243 (dwtcr & (0xf << 24)) ?
" only" :
"/trigger");
2264 for (
size_t i = 0; i < cache->
num_regs; i++)
2276 uint32_t dauthstatus;
2283 LOG_WARNING(
"Error reading DAUTHSTATUS register");
2289 #define MVFR0 0xe000ef40
2290 #define MVFR1 0xe000ef44
2292 #define MVFR0_DEFAULT_M4 0x10110021
2293 #define MVFR1_DEFAULT_M4 0x11000011
2295 #define MVFR0_DEFAULT_M7_SP 0x10110021
2296 #define MVFR0_DEFAULT_M7_DP 0x10110221
2297 #define MVFR1_DEFAULT_M7_SP 0x11000011
2298 #define MVFR1_DEFAULT_M7_DP 0x12000011
2312 uint32_t cpuid, fpcr, mvfr0, mvfr1;
2371 (uint8_t)((cpuid >> 20) & 0xf),
2372 (uint8_t)((cpuid >> 0) & 0xf));
2377 rev = (cpuid >> 20) & 0xf;
2378 patch = (cpuid >> 0) & 0xf;
2379 if ((rev == 0) && (patch < 2)) {
2470 cortex_m->
fp_num_code = ((fpcr >> 8) & 0x70) | ((fpcr >> 4) & 0xF);
2474 cortex_m->
fp_rev = (fpcr >> 28) & 0xf;
2518 *
ctrl = (uint8_t)dcrdr;
2519 *value = (uint8_t)(dcrdr >> 8);
2525 if (dcrdr & (1 << 0)) {
2542 for (i = 0; i < (
size * 4); i++) {
2571 if (
ctrl & (1 << 0)) {
2576 for (
int i = 1; i <= 3; i++) {
2580 request |= ((uint32_t)data << (i * 8));
2666 static const struct {
2697 if (strcmp(
CMD_ARGV[0],
"all") == 0) {
2702 }
else if (strcmp(
CMD_ARGV[0],
"none") == 0)
2720 armv7m->
demcr =
catch;
2753 static const struct jim_nvp nvp_maskisr_modes[] = {
2758 { .name =
NULL, .value = -1 },
2798 if (strcmp(*
CMD_ARGV,
"sysresetreq") == 0)
2801 else if (strcmp(*
CMD_ARGV,
"vectreset") == 0) {
2814 reset_config =
"sysresetreq";
2818 reset_config =
"vectreset";
2822 reset_config =
"unknown";
2834 .handler = handle_cortex_m_mask_interrupts_command,
2836 .help =
"mask cortex_m interrupts",
2837 .usage =
"['auto'|'on'|'off'|'steponly']",
2840 .name =
"vector_catch",
2841 .handler = handle_cortex_m_vector_catch_command,
2843 .help =
"configure hardware vectors to trigger debug entry",
2844 .usage =
"['all'|'none'|('bus_err'|'chk_err'|...)*]",
2847 .name =
"reset_config",
2848 .handler = handle_cortex_m_reset_config_command,
2850 .help =
"configure software reset handling",
2851 .usage =
"['sysresetreq'|'vectreset']",
2870 .help =
"Cortex-M command group",
const char * arm_get_gdb_arch(struct target *target)
const char * arm_mode_name(unsigned psr_mode)
Map PSR mode bits to the name of an ARM processor operating mode.
int mem_ap_read_buf(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint32_t count, target_addr_t address)
int mem_ap_read_buf_noincr(struct adiv5_ap *ap, uint8_t *buffer, uint32_t size, uint32_t count, target_addr_t address)
int adiv5_verify_config(struct adiv5_private_config *pc)
int mem_ap_read_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t *value)
Asynchronous (queued) read of a word from memory or a system register.
int mem_ap_write_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t value)
Asynchronous (queued) write of a word to memory or a system register.
int adiv5_jim_configure(struct target *target, struct jim_getopt_info *goi)
int dap_find_get_ap(struct adiv5_dap *dap, enum ap_type type_to_find, struct adiv5_ap **ap_out)
int mem_ap_write_buf_noincr(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t size, uint32_t count, target_addr_t address)
int dap_dp_init_or_reconnect(struct adiv5_dap *dap)
Initialize a DAP or do reconnect if DAP is not accessible.
int mem_ap_read_atomic_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t *value)
Synchronous read of a word from memory or a system register.
struct adiv5_ap * dap_get_ap(struct adiv5_dap *dap, uint64_t ap_num)
int dap_put_ap(struct adiv5_ap *ap)
int mem_ap_init(struct adiv5_ap *ap)
Initialize a DAP.
int mem_ap_write_buf(struct adiv5_ap *ap, const uint8_t *buffer, uint32_t size, uint32_t count, target_addr_t address)
int mem_ap_write_atomic_u32(struct adiv5_ap *ap, target_addr_t address, uint32_t value)
Synchronous write of a word to memory or a system register.
This defines formats and data structures used to talk to ADIv5 entities.
static int dap_run(struct adiv5_dap *dap)
Perform all queued DAP operations, and clear any errors posted in the CTRL_STAT register when they ar...
Macros used to generate various ARM or Thumb opcodes.
int arm_semihosting(struct target *target, int *retval)
Checks for and processes an ARM semihosting request.
int arm_semihosting_init(struct target *target)
Initialize ARM semihosting support.
const struct command_registration arm_tpiu_deprecated_command_handlers[]
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)
const int armv7m_psp_reg_map[ARMV7M_NUM_CORE_REGS]
uint32_t armv7m_map_id_to_regsel(unsigned int arm_reg_id)
struct reg_cache * armv7m_build_reg_cache(struct target *target)
Builds cache of architecturally defined registers.
const int armv7m_msp_reg_map[ARMV7M_NUM_CORE_REGS]
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.
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.
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.
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.
static struct armv7m_common * target_to_armv7m(struct target *target)
const struct command_registration armv7m_trace_command_handlers[]
int armv7m_trace_itm_config(struct target *target)
Configure hardware accordingly to the current ITM target settings.
void * buf_cpy(const void *from, void *_to, unsigned size)
Copies size bits out of from and into to.
static uint32_t buf_get_u32(const uint8_t *_buffer, unsigned first, unsigned num)
Retrieves num bits from _buffer, starting at the first bit, returning the bits in a 32-bit word.
static void buf_set_u32(uint8_t *_buffer, unsigned first, unsigned num, uint32_t value)
Sets num bits in _buffer, starting at the first bit, using the bits in value.
void breakpoint_remove(struct target *target, target_addr_t address)
int breakpoint_add(struct target *target, target_addr_t address, uint32_t length, enum breakpoint_type type)
struct breakpoint * breakpoint_find(struct target *target, target_addr_t address)
static void watchpoint_set(struct watchpoint *watchpoint, unsigned int number)
static void breakpoint_hw_set(struct breakpoint *breakpoint, unsigned int hw_number)
void command_print(struct command_invocation *cmd, const char *format,...)
#define CMD
Use this macro to access the command being handled, rather than accessing the variable directly.
#define CMD_NAME
Use this macro to access the name of the command being handled, rather than accessing the variable di...
#define CMD_ARGV
Use this macro to access the arguments for the command being handled, rather than accessing the varia...
#define ERROR_COMMAND_SYNTAX_ERROR
#define CMD_ARGC
Use this macro to access the number of arguments for the command being handled, rather than accessing...
#define CMD_CTX
Use this macro to access the context of the command being handled, rather than accessing the variable...
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
static int cortex_m_debug_entry(struct target *target)
static void cortex_m_dwt_free(struct target *target)
static int cortex_m_unset_watchpoint(struct target *target, struct watchpoint *watchpoint)
COMMAND_HANDLER(handle_cortex_m_vector_catch_command)
static int cortex_m_set_maskints_for_run(struct target *target)
#define MVFR1_DEFAULT_M7_DP
#define MVFR0_DEFAULT_M7_SP
static int cortex_m_find_mem_ap(struct adiv5_dap *swjdp, struct adiv5_ap **debug_ap)
static int cortex_m_dwt_get_reg(struct reg *reg)
static int cortex_m_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
static int cortex_m_target_create(struct target *target, Jim_Interp *interp)
static int cortex_m_enable_fpb(struct target *target)
static int cortex_m_single_step_core(struct target *target)
static int cortex_m_write_debug_halt_mask(struct target *target, uint32_t mask_on, uint32_t mask_off)
#define MVFR1_DEFAULT_M7_SP
static int cortex_m_set_maskints_for_halt(struct target *target)
struct target_type cortexm_target
static int cortex_m_clear_halt(struct target *target)
#define DHCSR_S_REGRDY_TIMEOUT
static const struct command_registration cortex_m_command_handlers[]
static int cortex_m_set_maskints_for_step(struct target *target)
static int cortex_m_poll(struct target *target)
void cortex_m_enable_watchpoints(struct target *target)
static int cortex_m_target_request_data(struct target *target, uint32_t size, uint8_t *buffer)
static int cortex_m_init_target(struct command_context *cmd_ctx, struct target *target)
static int cortex_m_examine_exception_reason(struct target *target)
static int cortex_m_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
int cortex_m_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
static int cortex_m_store_core_reg_u32(struct target *target, uint32_t num, uint32_t value)
static int cortex_m_slow_read_all_regs(struct target *target)
static int cortex_m_init_arch_info(struct target *target, struct cortex_m_common *cortex_m, struct adiv5_dap *dap)
static int cortex_m_set_watchpoint(struct target *target, struct watchpoint *watchpoint)
void cortex_m_enable_breakpoints(struct target *target)
int cortex_m_remove_breakpoint(struct target *target, struct breakpoint *breakpoint)
static int cortex_m_endreset_event(struct target *target)
static int cortex_m_examine_debug_reason(struct target *target)
static int cortex_m_handle_target_request(void *priv)
static int cortex_m_fast_read_all_regs(struct target *target)
static int cortex_m_deassert_reset(struct target *target)
static const struct reg_arch_type dwt_reg_type
static void cortex_m_dwt_addreg(struct target *t, struct reg *r, const struct dwt_reg *d)
static int cortex_m_load_core_reg_u32(struct target *target, uint32_t regsel, uint32_t *value)
int cortex_m_examine(struct target *target)
int cortex_m_remove_watchpoint(struct target *target, struct watchpoint *watchpoint)
static int cortex_m_assert_reset(struct target *target)
int cortex_m_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
static int cortex_m_hit_watchpoint(struct target *target, struct watchpoint **hit_watchpoint)
static const struct cortex_m_part_info cortex_m_parts[]
static int cortex_m_verify_pointer(struct command_invocation *cmd, struct cortex_m_common *cm)
static const struct command_registration cortex_m_exec_command_handlers[]
static int cortex_m_write_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
static int cortex_m_dcc_read(struct target *target, uint8_t *value, uint8_t *ctrl)
int cortex_m_set_breakpoint(struct target *target, struct breakpoint *breakpoint)
static int cortex_m_read_dhcsr_atomic_sticky(struct target *target)
Read DCB DHCSR register to cortex_m->dcb_dhcsr and cumulate sticky bits in cortex_m->dcb_dhcsr_cumula...
static int cortex_m_set_maskints(struct target *target, bool mask)
static void cortex_m_cumulate_dhcsr_sticky(struct cortex_m_common *cortex_m, uint32_t dhcsr)
DCB DHCSR register contains S_RETIRE_ST and S_RESET_ST bits cleared on a read.
static bool cortex_m_has_tz(struct target *target)
static int cortex_m_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
static void cortex_m_dwt_setup(struct cortex_m_common *cm, struct target *target)
void cortex_m_deinit_target(struct target *target)
int cortex_m_unset_breakpoint(struct target *target, struct breakpoint *breakpoint)
#define MVFR0_DEFAULT_M7_DP
static int cortex_m_soft_reset_halt(struct target *target)
int cortex_m_profiling(struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds)
static const struct dwt_reg dwt_comp[]
static int cortex_m_halt(struct target *target)
#define DWT_COMPARATOR(i)
static const struct dwt_reg dwt_base_regs[]
static int cortex_m_queue_reg_read(struct target *target, uint32_t regsel, uint32_t *reg_value, uint32_t *dhcsr)
static int cortex_m_dwt_set_reg(struct reg *reg, uint8_t *buf)
#define FPCR_REPLACE_BKPT_HIGH
#define ARM_CPUID_PARTNO_POS
#define FPCR_REPLACE_BKPT_LOW
#define CORTEX_M_F_HAS_FPV4
#define CORTEX_M_F_HAS_FPV5
#define CORTEX_M_COMMON_MAGIC
#define AIRCR_SYSRESETREQ
static bool is_cortex_m_with_dap_access(const struct cortex_m_common *cortex_m)
#define DAUTHSTATUS_SID_MASK
#define ARM_CPUID_PARTNO_MASK
static struct cortex_m_common * target_to_cm(struct target *target)
@ CORTEX_M_ISRMASK_STEPONLY
#define CORTEX_M_F_TAR_AUTOINCR_BLOCK_4K
#define DWT_DEVARCH_ARMV8M
cortex_m_soft_reset_config
@ CORTEX_M_RESET_VECTRESET
@ CORTEX_M_RESET_SYSRESETREQ
static struct esp_usb_jtag * priv
struct jim_nvp * jim_nvp_name2value_simple(const struct jim_nvp *p, const char *name)
struct jim_nvp * jim_nvp_value2name_simple(const struct jim_nvp *p, int value)
static enum reset_types jtag_reset_config
int adapter_deassert_reset(void)
void jtag_sleep(uint32_t us)
enum reset_types jtag_get_reset_config(void)
int adapter_assert_reset(void)
void alive_sleep(uint64_t ms)
#define LOG_TARGET_INFO(target, fmt_str,...)
#define LOG_TARGET_WARNING(target, fmt_str,...)
#define LOG_WARNING(expr ...)
#define LOG_TARGET_ERROR(target, fmt_str,...)
#define LOG_TARGET_DEBUG(target, fmt_str,...)
#define LOG_ERROR(expr ...)
#define ERROR_TIMEOUT_REACHED
struct reg_cache ** register_get_last_cache_p(struct reg_cache **first)
void register_unlink_cache(struct reg_cache **cache_p, const struct reg_cache *cache)
void register_cache_invalidate(struct reg_cache *cache)
Marks the contents of the register cache as invalid (and clean).
int gettimeofday(struct timeval *tv, struct timezone *tz)
struct rtt_control ctrl
Control block.
size_t size
Size of the control block search area.
const struct command_registration rtt_target_command_handlers[]
This represents an ARM Debug Interface (v5) Access Port (AP).
uint32_t tar_autoincr_block
struct adiv5_dap * dap
DAP this AP belongs to.
uint32_t memaccess_tck
Configures how many extra tck clocks are added after starting a MEM-AP access before we try to read i...
This represents an ARM Debug Interface (v5) Debug Access Port (DAP).
Represents a generic ARM core, with standard application registers.
enum arm_arch arch
ARM architecture version.
enum arm_mode core_mode
Record the current core mode: SVC, USR, or some other mode.
struct reg * cpsr
Handle to the CPSR/xPSR; valid in all core modes.
struct adiv5_dap * dap
For targets conforming to ARM Debug Interface v5, this handle references the Debug Access Port (DAP) ...
struct reg * pc
Handle to the PC; valid in all core modes.
const int * map
Support for arm_reg_current()
int(* read_core_reg)(struct target *target, struct reg *reg, int num, enum arm_mode mode)
Retrieve a single core register.
struct reg_cache * core_cache
struct armv7m_trace_config trace_config
void(* pre_restore_context)(struct target *target)
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)
bool itm_deferred_config
Config ITM after target examine.
enum breakpoint_type type
When run_command is called, a new instance will be created on the stack, filled with the proper value...
const struct command_registration * chain
If non-NULL, the commands in chain will be registered in the same context and scope of this registrat...
const struct cortex_m_part_info * core_info
enum cortex_m_soft_reset_config soft_reset_config
struct armv7m_common armv7m
unsigned int dwt_comp_available
unsigned int dwt_num_comp
struct cortex_m_dwt_comparator * dwt_comparator_list
bool dcb_dhcsr_sticky_is_recent
struct cortex_m_fp_comparator * fp_comparator_list
struct reg_cache * dwt_cache
enum cortex_m_isrmasking_mode isrmasking_mode
unsigned int common_magic
uint32_t dcb_dhcsr_cumulated_sticky
uint32_t dwt_comparator_address
enum cortex_m_partno partno
Name Value Pairs, aka: NVP.
int(* get)(struct reg *reg)
const struct reg_arch_type * type
This holds methods shared between all instances of a given target type.
const char * name
Name of this type of target.
enum target_debug_reason debug_reason
struct reg_cache * reg_cache
struct breakpoint * breakpoints
struct watchpoint * watchpoints
bool defer_examine
Should we defer examine to later.
int target_call_event_callbacks(struct target *target, enum target_event event)
void target_free_all_working_areas(struct target *target)
const char * target_state_name(struct target *t)
Return the name of this targets current state.
int target_halt(struct target *target)
void target_buffer_set_u16(struct target *target, uint8_t *buffer, uint16_t value)
bool target_has_event_action(struct target *target, enum target_event event)
Returns true only if the target has a handler for the specified event.
int target_profiling_default(struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds)
int target_write_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer)
Write count items of size bytes to the memory of target at the address given.
int target_write_u32(struct target *target, target_addr_t address, uint32_t value)
int target_examine_one(struct target *target)
Examine the specified target, letting it perform any Initialisation that requires JTAG access.
int target_poll(struct target *target)
int target_register_timer_callback(int(*callback)(void *priv), unsigned int time_ms, enum target_timer_type type, void *priv)
The period is very approximate, the callback can happen much more often or much more rarely than spec...
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)
uint16_t target_buffer_get_u16(struct target *target, const uint8_t *buffer)
int target_read_memory(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer)
Read count items of size bytes from the memory of target at the address given.
struct target * get_current_target(struct command_context *cmd_ctx)
void target_handle_event(struct target *target, enum target_event e)
int target_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
Make the target (re)start executing using its saved execution context (possibly with some modificatio...
#define ERROR_TARGET_NOT_HALTED
#define ERROR_TARGET_UNALIGNED_ACCESS
#define ERROR_TARGET_INVALID
@ TARGET_TIMER_TYPE_PERIODIC
@ TARGET_EVENT_DEBUG_RESUMED
@ TARGET_EVENT_DEBUG_HALTED
@ TARGET_EVENT_RESET_ASSERT
#define ERROR_TARGET_RESOURCE_NOT_AVAILABLE
static void target_set_examined(struct target *target)
Sets the examined flag for the given target.
static bool target_was_examined(struct target *target)
#define ERROR_TARGET_FAILURE
int target_request(struct target *target, uint32_t request)
int timeval_compare(const struct timeval *x, const struct timeval *y)
int timeval_add_time(struct timeval *result, long sec, long usec)
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.
static const struct @118 vec_ids[]