OpenOCD
|
This holds methods shared between all instances of a given target type. More...
Data Fields | |
int(* | add_breakpoint )(struct target *target, struct breakpoint *breakpoint) |
int(* | add_context_breakpoint )(struct target *target, struct breakpoint *breakpoint) |
int(* | add_hybrid_breakpoint )(struct target *target, struct breakpoint *breakpoint) |
int(* | add_watchpoint )(struct target *target, struct watchpoint *watchpoint) |
unsigned(* | address_bits )(struct target *target) |
int(* | arch_state )(struct target *target) |
int(* | assert_reset )(struct target *target) |
int(* | blank_check_memory )(struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value) |
int(* | check_reset )(struct target *target) |
int(* | checksum_memory )(struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
const struct command_registration * | commands |
unsigned int(* | data_bits )(struct target *target) |
int(* | deassert_reset )(struct target *target) |
The implementation is responsible for polling the target such that target->state reflects the state correctly. More... | |
void(* | deinit_target )(struct target *target) |
Free all the resources allocated by the target. More... | |
int(* | examine )(struct target *target) |
This method is used to perform target setup that requires JTAG access. More... | |
int(* | gdb_fileio_end )(struct target *target, int retcode, int fileio_errno, bool ctrl_c) |
int(* | gdb_query_custom )(struct target *target, const char *packet, char **response_p) |
const char *(* | get_gdb_arch )(struct target *target) |
Target architecture for GDB. More... | |
int(* | get_gdb_fileio_info )(struct target *target, struct gdb_fileio_info *fileio_info) |
int(* | get_gdb_reg_list )(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Target register access for GDB. More... | |
int(* | get_gdb_reg_list_noread )(struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Same as get_gdb_reg_list, but doesn't read the register values. More... | |
int(* | halt )(struct target *target) |
int(* | hit_watchpoint )(struct target *target, struct watchpoint **hit_watchpoint) |
int(* | init_target )(struct command_context *cmd_ctx, struct target *target) |
int(* | mmu )(struct target *target, int *enabled) |
const char * | name |
Name of this type of target. More... | |
int(* | poll )(struct target *target) |
int(* | profiling )(struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
int(* | read_buffer )(struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer) |
int(* | read_memory )(struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
Target memory read callback. More... | |
int(* | read_phys_memory )(struct target *target, target_addr_t phys_address, uint32_t size, uint32_t count, uint8_t *buffer) |
int(* | remove_breakpoint )(struct target *target, struct breakpoint *breakpoint) |
int(* | remove_watchpoint )(struct target *target, struct watchpoint *watchpoint) |
int(* | resume )(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
int(* | run_algorithm )(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info) |
Target algorithm support. More... | |
int(* | soft_reset_halt )(struct target *target) |
int(* | start_algorithm )(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t entry_point, target_addr_t exit_point, void *arch_info) |
int(* | step )(struct target *target, int current, target_addr_t address, int handle_breakpoints) |
int(* | target_create )(struct target *target, Jim_Interp *interp) |
int(* | target_jim_commands )(struct target *target, struct jim_getopt_info *goi) |
int(* | target_jim_configure )(struct target *target, struct jim_getopt_info *goi) |
int(* | target_request_data )(struct target *target, uint32_t size, uint8_t *buffer) |
int(* | virt2phys )(struct target *target, target_addr_t address, target_addr_t *physical) |
int(* | wait_algorithm )(struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t exit_point, int timeout_ms, void *arch_info) |
int(* | write_buffer )(struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer) |
int(* | write_memory )(struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Target memory write callback. More... | |
int(* | write_phys_memory )(struct target *target, target_addr_t phys_address, uint32_t size, uint32_t count, const uint8_t *buffer) |
This holds methods shared between all instances of a given target type.
For example, all Cortex-M3 targets on a scan chain share the same method table.
Definition at line 26 of file target_type.h.
int(* target_type::add_breakpoint) (struct target *target, struct breakpoint *breakpoint) |
Definition at line 153 of file target_type.h.
Referenced by arm_dpm_setup(), arm_dpm_write_dirty_registers(), armv8_dpm_setup(), armv8_dpm_write_dirty_registers(), and target_add_breakpoint().
int(* target_type::add_context_breakpoint) (struct target *target, struct breakpoint *breakpoint) |
Definition at line 154 of file target_type.h.
Referenced by handle_bp_command_set(), and target_add_context_breakpoint().
int(* target_type::add_hybrid_breakpoint) (struct target *target, struct breakpoint *breakpoint) |
Definition at line 155 of file target_type.h.
Referenced by handle_bp_command_set(), and target_add_hybrid_breakpoint().
int(* target_type::add_watchpoint) (struct target *target, struct watchpoint *watchpoint) |
Definition at line 164 of file target_type.h.
Referenced by arm_dpm_setup(), armv8_dpm_setup(), and target_add_watchpoint().
Definition at line 306 of file target_type.h.
Referenced by target_address_bits().
Definition at line 37 of file target_type.h.
Referenced by riscv_arch_state(), and target_arch_state().
Definition at line 64 of file target_type.h.
Referenced by COMMAND_HANDLER(), jim_target_reset(), and riscv_assert_reset().
int(* target_type::blank_check_memory) (struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value) |
Definition at line 137 of file target_type.h.
Referenced by target_blank_check_memory().
Definition at line 279 of file target_type.h.
Referenced by target_process_reset().
int(* target_type::checksum_memory) (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
Definition at line 135 of file target_type.h.
Referenced by target_checksum_memory().
const struct command_registration* target_type::commands |
Definition at line 194 of file target_type.h.
Referenced by target_create().
Definition at line 311 of file target_type.h.
Referenced by target_data_bits().
The implementation is responsible for polling the target such that target->state reflects the state correctly.
Otherwise the following would fail, as there will not be any "poll" invoked between the "reset run" and "halt".
reset run; halt
Definition at line 76 of file target_type.h.
Referenced by COMMAND_HANDLER(), jim_target_reset(), and riscv_deassert_reset().
Free all the resources allocated by the target.
WARNING: deinit_target is called unconditionally regardless the target has ever been examined/initialised or not. If a problem has prevented establishing JTAG/SWD/... communication or if the target was created with -defer-examine flag and has never been examined then it is not possible to communicate with the target.
If you need to talk to the target during deinit, first check if target_was_examined()!
target | The target to deinit |
Definition at line 247 of file target_type.h.
Referenced by riscv_deinit_target(), target_create(), and target_destroy().
This method is used to perform target setup that requires JTAG access.
This may be called multiple times. It is called after the scan chain is initially validated, or later after the target is enabled by a JRC. It may also be called during some parts of the reset sequence.
For one-time initialization tasks, use target_was_examined() and target_set_examined(). For example, probe the hardware before setting up chip-specific state, and then set that flag so you don't do that again.
Definition at line 222 of file target_type.h.
Referenced by jim_target_examine(), riscv_examine(), and target_examine_one().
int(* target_type::gdb_fileio_end) (struct target *target, int retcode, int fileio_errno, bool ctrl_c) |
Definition at line 287 of file target_type.h.
Referenced by semihosting_common_init(), target_gdb_fileio_end(), and target_init_one().
Definition at line 296 of file target_type.h.
Referenced by gdb_query_packet().
Target architecture for GDB.
The string returned by this function will not be automatically freed; if dynamic allocation is used for this value, it must be managed by the target, ideally by caching the result for subsequent calls.
Definition at line 86 of file target_type.h.
Referenced by target_get_gdb_arch().
int(* target_type::get_gdb_fileio_info) (struct target *target, struct gdb_fileio_info *fileio_info) |
Definition at line 283 of file target_type.h.
Referenced by semihosting_common_init(), target_get_gdb_fileio_info(), and target_init_one().
int(* target_type::get_gdb_reg_list) (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Target register access for GDB.
Do not call this function directly, use target_get_gdb_reg_list() instead.
Danger! this function will succeed even if the target is running and return a register list with dummy values.
The reason is that GDB connection will fail without a valid register list, however it is after GDB is connected that monitor commands can be run to properly initialize the target
Definition at line 99 of file target_type.h.
Referenced by target_get_gdb_reg_list(), and target_supports_gdb_connection().
int(* target_type::get_gdb_reg_list_noread) (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Same as get_gdb_reg_list, but doesn't read the register values.
Definition at line 105 of file target_type.h.
Referenced by target_get_gdb_reg_list_noread().
Definition at line 43 of file target_type.h.
Referenced by halt_go(), jim_target_halt(), riscv_halt(), and target_halt().
int(* target_type::hit_watchpoint) (struct target *target, struct watchpoint **hit_watchpoint) |
Definition at line 175 of file target_type.h.
Referenced by target_hit_watchpoint().
int(* target_type::init_target) (struct command_context *cmd_ctx, struct target *target) |
Definition at line 229 of file target_type.h.
Referenced by riscv_examine().
Definition at line 271 of file target_type.h.
Referenced by target_alloc_working_area_try().
const char* target_type::name |
Name of this type of target.
Do not access this field directly, use target_type_name() instead.
Definition at line 31 of file target_type.h.
Referenced by chibios_create(), chibios_get_thread_reg_list(), chromium_ec_create(), ecos_create(), embkernel_create(), freertos_create(), jim_arm_tpiu_swo_enable(), mqx_create(), nuttx_create(), riot_create(), target_create(), target_type_name(), threadx_create(), and ucos_iii_create().
Definition at line 34 of file target_type.h.
Referenced by jim_target_poll(), oldriscv_poll(), and target_poll().
int(* target_type::profiling) (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
Definition at line 300 of file target_type.h.
Referenced by target_init_one(), and target_profiling().
int(* target_type::read_buffer) (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer) |
Definition at line 128 of file target_type.h.
Referenced by nds32_add_software_breakpoint(), nds32_get_gdb_fileio_info(), nds32_remove_software_breakpoint(), target_init_one(), and target_read_buffer().
int(* target_type::read_memory) (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
Target memory read callback.
Do not call this function directly, use target_read_memory() instead.
Definition at line 118 of file target_type.h.
Referenced by target_read_memory().
int(* target_type::read_phys_memory) (struct target *target, target_addr_t phys_address, uint32_t size, uint32_t count, uint8_t *buffer) |
Definition at line 262 of file target_type.h.
Referenced by target_read_phys_memory().
int(* target_type::remove_breakpoint) (struct target *target, struct breakpoint *breakpoint) |
Definition at line 161 of file target_type.h.
Referenced by arm_dpm_setup(), armv8_dpm_setup(), and target_remove_breakpoint().
int(* target_type::remove_watchpoint) (struct target *target, struct watchpoint *watchpoint) |
Definition at line 170 of file target_type.h.
Referenced by arm_dpm_setup(), armv8_dpm_setup(), and target_remove_watchpoint().
int(* target_type::resume) (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
Definition at line 45 of file target_type.h.
Referenced by resume_go(), and target_resume().
int(* target_type::run_algorithm) (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t entry_point, target_addr_t exit_point, int timeout_ms, void *arch_info) |
Target algorithm support.
Do not call this method directly, use target_run_algorithm() instead.
Definition at line 181 of file target_type.h.
Referenced by target_run_algorithm().
Definition at line 77 of file target_type.h.
Referenced by target_soft_reset_halt().
int(* target_type::start_algorithm) (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t entry_point, target_addr_t exit_point, void *arch_info) |
Definition at line 185 of file target_type.h.
Referenced by target_start_algorithm().
int(* target_type::step) (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
Definition at line 47 of file target_type.h.
Referenced by gdb_handle_vcont_packet(), oldriscv_step(), and target_step().
Definition at line 197 of file target_type.h.
Referenced by target_create().
int(* target_type::target_jim_commands) (struct target *target, struct jim_getopt_info *goi) |
Definition at line 206 of file target_type.h.
int(* target_type::target_jim_configure) (struct target *target, struct jim_getopt_info *goi) |
Definition at line 202 of file target_type.h.
Referenced by target_configure().
Definition at line 40 of file target_type.h.
Referenced by COMMAND_HANDLER(), target_asciimsg(), target_hexmsg(), and target_request().
int(* target_type::virt2phys) (struct target *target, target_addr_t address, target_addr_t *physical) |
Definition at line 252 of file target_type.h.
Referenced by arm926ejs_write_memory(), armv7a_l2x_cache_clean_virt(), armv7a_l2x_cache_flush_virt(), armv7a_l2x_cache_inval_virt(), COMMAND_HANDLER(), linux_compute_virt2phys(), nds32_cache_sync(), nds32_v2_translate_address(), nds32_v3_read_buffer(), nds32_v3_read_memory(), nds32_v3_write_buffer(), nds32_v3_write_memory(), riscv_read_memory(), and riscv_write_memory().
int(* target_type::wait_algorithm) (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, target_addr_t exit_point, int timeout_ms, void *arch_info) |
Definition at line 189 of file target_type.h.
Referenced by target_wait_algorithm().
int(* target_type::write_buffer) (struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer) |
Definition at line 132 of file target_type.h.
Referenced by nds32_add_software_breakpoint(), nds32_remove_software_breakpoint(), target_init_one(), and target_write_buffer().
int(* target_type::write_memory) (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Target memory write callback.
Do not call this function directly, use target_write_memory() instead.
Definition at line 124 of file target_type.h.
Referenced by riscv_write_memory(), riscv_write_phys_memory(), and target_write_memory().
int(* target_type::write_phys_memory) (struct target *target, target_addr_t phys_address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Definition at line 268 of file target_type.h.
Referenced by target_write_phys_memory().