OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | FastLoad |
Macros | |
#define | DEFAULT_HALT_TIMEOUT 5000 |
Typedefs | |
typedef int(* | target_write_fn) (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
typedef unsigned char | UNIT[2] |
Enumerations | |
enum | target_cfg_param { TCFG_TYPE, TCFG_EVENT, TCFG_WORK_AREA_VIRT, TCFG_WORK_AREA_PHYS, TCFG_WORK_AREA_SIZE, TCFG_WORK_AREA_BACKUP, TCFG_ENDIAN, TCFG_COREID, TCFG_CHAIN_POSITION, TCFG_DBGBASE, TCFG_RTOS, TCFG_DEFER_EXAMINE, TCFG_GDB_PORT, TCFG_GDB_MAX_CONNECTIONS } |
enum | verify_mode { IMAGE_TEST = 0, IMAGE_VERIFY = 1, IMAGE_CHECKSUM_ONLY = 2 } |
Functions | |
static void | append_to_list_all_targets (struct target *target) |
static void | binprint (struct command_invocation *cmd, const char *text, const uint8_t *buf, int size) |
COMMAND_HANDLER (handle_target_init_command) | |
COMMAND_HANDLER (handle_targets_command) | |
COMMAND_HANDLER (handle_reg_command) | |
COMMAND_HANDLER (handle_poll_command) | |
COMMAND_HANDLER (handle_wait_halt_command) | |
COMMAND_HANDLER (handle_halt_command) | |
COMMAND_HANDLER (handle_soft_reset_halt_command) | |
COMMAND_HANDLER (handle_reset_command) | |
COMMAND_HANDLER (handle_resume_command) | |
COMMAND_HANDLER (handle_step_command) | |
COMMAND_HANDLER (handle_md_command) | |
COMMAND_HANDLER (handle_mw_command) | |
COMMAND_HANDLER (handle_load_image_command) | |
COMMAND_HANDLER (handle_dump_image_command) | |
COMMAND_HANDLER (handle_verify_image_checksum_command) | |
COMMAND_HANDLER (handle_verify_image_command) | |
COMMAND_HANDLER (handle_test_image_command) | |
COMMAND_HANDLER (handle_bp_command) | |
COMMAND_HANDLER (handle_rbp_command) | |
COMMAND_HANDLER (handle_wp_command) | |
COMMAND_HANDLER (handle_rwp_command) | |
COMMAND_HANDLER (handle_virt2phys_command) | |
Translate a virtual address to a physical address. More... | |
COMMAND_HANDLER (handle_profile_command) | |
COMMAND_HANDLER (handle_target_event_list) | |
COMMAND_HANDLER (handle_fast_load_image_command) | |
COMMAND_HANDLER (handle_fast_load_command) | |
COMMAND_HANDLER (handle_target_reset_nag) | |
COMMAND_HANDLER (handle_ps_command) | |
COMMAND_HANDLER (handle_test_mem_access_command) | |
static | COMMAND_HELPER (parse_load_image_command_CMD_ARGV, struct image *image, target_addr_t *min_address, target_addr_t *max_address) |
static | COMMAND_HELPER (handle_verify_image_command_internal, enum verify_mode verify) |
const char * | debug_reason_name (struct target *t) |
static int | default_check_reset (struct target *target) |
static int | default_examine (struct target *target) |
static int | find_target (struct command_invocation *cmd, const char *name) |
static void | free_fastload (void) |
struct target * | get_current_target (struct command_context *cmd_ctx) |
struct target * | get_current_target_or_null (struct command_context *cmd_ctx) |
static int | get_int_array_element (Jim_Interp *interp, const char *varname, int idx, uint32_t *val) |
struct target * | get_target (const char *id) |
struct target * | get_target_by_num (int num) |
bool | get_target_reset_nag (void) |
static int | handle_bp_command_list (struct command_invocation *cmd) |
static int | handle_bp_command_set (struct command_invocation *cmd, target_addr_t addr, uint32_t asid, uint32_t length, int hw) |
static int | handle_target (void *priv) |
static int | identity_virt2phys (struct target *target, target_addr_t virtual, target_addr_t *physical) |
static int | jim_array2mem (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_mem2array (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_array2mem (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_configure (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_create (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_current (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_current_state (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_examine (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_examine_deferred (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_halt (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_halt_gdb (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_invoke_event (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_mem2array (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_names (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_poll (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_reset (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_smp (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_tap_disabled (Jim_Interp *interp) |
static int | jim_target_types (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_wait_state (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jim_target_was_examined (Jim_Interp *interp, int argc, Jim_Obj *const *argv) |
static int | jtag_enable_callback (enum jtag_event event, void *priv) |
static | LIST_HEAD (target_reset_callback_list) |
static | LIST_HEAD (target_trace_callback_list) |
static int | new_int_array_element (Jim_Interp *interp, const char *varname, int idx, uint32_t val) |
static int | new_target_number (void) |
static int | no_mmu (struct target *target, int *enabled) |
static void | print_wa_layout (struct target *target) |
static int | sense_handler (void) |
int | target_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
Add the breakpoint for target. More... | |
int | target_add_context_breakpoint (struct target *target, struct breakpoint *breakpoint) |
Add the ContextID breakpoint for target. More... | |
int | target_add_hybrid_breakpoint (struct target *target, struct breakpoint *breakpoint) |
Add the ContextID & IVA breakpoint for target. More... | |
int | target_add_watchpoint (struct target *target, struct watchpoint *watchpoint) |
Add the watchpoint for target. More... | |
unsigned | target_address_bits (struct target *target) |
Return the number of address bits this target supports. More... | |
target_addr_t | target_address_max (struct target *target) |
Return the highest accessible address for this target. More... | |
int | target_alloc_working_area (struct target *target, uint32_t size, struct working_area **area) |
int | target_alloc_working_area_try (struct target *target, uint32_t size, struct working_area **area) |
int | target_arch_state (struct target *target) |
static int | target_array2mem (Jim_Interp *interp, struct target *target, int argc, Jim_Obj *const *argv) |
int | target_blank_check_memory (struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value) |
uint16_t | target_buffer_get_u16 (struct target *target, const uint8_t *buffer) |
void | target_buffer_get_u16_array (struct target *target, const uint8_t *buffer, uint32_t count, uint16_t *dstbuf) |
uint32_t | target_buffer_get_u24 (struct target *target, const uint8_t *buffer) |
uint32_t | target_buffer_get_u32 (struct target *target, const uint8_t *buffer) |
void | target_buffer_get_u32_array (struct target *target, const uint8_t *buffer, uint32_t count, uint32_t *dstbuf) |
uint64_t | target_buffer_get_u64 (struct target *target, const uint8_t *buffer) |
void | target_buffer_get_u64_array (struct target *target, const uint8_t *buffer, uint32_t count, uint64_t *dstbuf) |
void | target_buffer_set_u16 (struct target *target, uint8_t *buffer, uint16_t value) |
void | target_buffer_set_u16_array (struct target *target, uint8_t *buffer, uint32_t count, const uint16_t *srcbuf) |
void | target_buffer_set_u24 (struct target *target, uint8_t *buffer, uint32_t value) |
void | target_buffer_set_u32 (struct target *target, uint8_t *buffer, uint32_t value) |
void | target_buffer_set_u32_array (struct target *target, uint8_t *buffer, uint32_t count, const uint32_t *srcbuf) |
void | target_buffer_set_u64 (struct target *target, uint8_t *buffer, uint64_t value) |
void | target_buffer_set_u64_array (struct target *target, uint8_t *buffer, uint32_t count, const uint64_t *srcbuf) |
static void | target_buffer_set_u8 (struct target *target, uint8_t *buffer, uint8_t value) |
int | target_call_event_callbacks (struct target *target, enum target_event event) |
int | target_call_reset_callbacks (struct target *target, enum target_reset_mode reset_mode) |
static int | target_call_timer_callback (struct target_timer_callback *cb, struct timeval *now) |
int | target_call_timer_callbacks (void) |
static int | target_call_timer_callbacks_check_time (int checktime) |
int | target_call_timer_callbacks_now (void) |
Invoke this to ensure that e.g. More... | |
int | target_call_trace_callbacks (struct target *target, size_t len, uint8_t *data) |
int | target_checksum_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t *crc) |
static int | target_configure (Jim_GetOptInfo *goi, struct target *target) |
static int | target_create (Jim_GetOptInfo *goi) |
static void | target_destroy (struct target *target) |
const char * | target_event_name (enum target_event event) |
Return the name of a target event enumeration value. More... | |
int | target_examine (void) |
int | target_examine_one (struct target *target) |
Examine the specified target, letting it perform any Initialisation that requires JTAG access. More... | |
static int | target_fill_mem (struct target *target, target_addr_t address, target_write_fn fn, unsigned data_size, uint64_t b, unsigned c) |
void | target_free_all_working_areas (struct target *target) |
static void | target_free_all_working_areas_restore (struct target *target, int restore) |
int | target_free_working_area (struct target *target, struct working_area *area) |
static int | target_free_working_area_restore (struct target *target, struct working_area *area, int restore) |
int | target_gdb_fileio_end (struct target *target, int retcode, int fileio_errno, bool ctrl_c) |
Pass GDB file-I/O response to target after finishing host syscall. More... | |
static int | target_gdb_fileio_end_default (struct target *target, int retcode, int fileio_errno, bool ctrl_c) |
const char * | target_get_gdb_arch (struct target *target) |
Obtain the architecture for GDB. More... | |
int | target_get_gdb_fileio_info (struct target *target, struct gdb_fileio_info *fileio_info) |
Obtain file-I/O information from target for GDB to do syscall. More... | |
static int | target_get_gdb_fileio_info_default (struct target *target, struct gdb_fileio_info *fileio_info) |
int | target_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Obtain the registers for GDB. More... | |
int | target_get_gdb_reg_list_noread (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
Obtain the registers for GDB, but don't read register values from the target. More... | |
uint32_t | target_get_working_area_avail (struct target *target) |
int | target_halt (struct target *target) |
void | target_handle_event (struct target *target, enum target_event e) |
void | target_handle_md_output (struct command_invocation *cmd, struct target *target, target_addr_t address, unsigned size, unsigned count, const uint8_t *buffer) |
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. More... | |
int | target_hit_watchpoint (struct target *target, struct watchpoint **hit_watchpoint) |
Find out the just hit watchpoint for target. More... | |
static int | target_init (struct command_context *cmd_ctx) |
static int | target_init_one (struct command_context *cmd_ctx, struct target *target) |
static int | target_mem2array (Jim_Interp *interp, struct target *target, int argc, Jim_Obj *const *argv) |
static void | target_merge_working_areas (struct target *target) |
int | target_poll (struct target *target) |
static int | target_process_reset (struct command_invocation *cmd, enum target_reset_mode reset_mode) |
static int | target_profiling (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
int | target_profiling_default (struct target *target, uint32_t *samples, uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds) |
void | target_quit (void) |
Free all the resources allocated by targets and the target layer. More... | |
int | target_read_buffer (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer) |
static int | target_read_buffer_default (struct target *target, target_addr_t address, uint32_t count, 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. More... | |
int | target_read_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
int | target_read_u16 (struct target *target, target_addr_t address, uint16_t *value) |
int | target_read_u32 (struct target *target, target_addr_t address, uint32_t *value) |
int | target_read_u64 (struct target *target, target_addr_t address, uint64_t *value) |
int | target_read_u8 (struct target *target, target_addr_t address, uint8_t *value) |
int | target_register_commands (struct command_context *cmd_ctx) |
int | target_register_event_callback (int(*callback)(struct target *target, enum target_event event, void *priv), void *priv) |
int | target_register_reset_callback (int(*callback)(struct target *target, enum target_reset_mode reset_mode, void *priv), void *priv) |
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 specified. More... | |
int | target_register_trace_callback (int(*callback)(struct target *target, size_t len, uint8_t *data, void *priv), void *priv) |
static int | target_register_user_commands (struct command_context *cmd_ctx) |
int | target_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
Remove the breakpoint for target. More... | |
int | target_remove_watchpoint (struct target *target, struct watchpoint *watchpoint) |
Remove the watchpoint for target. More... | |
static void | target_reset_examined (struct target *target) |
Reset the examined flag for the given target. More... | |
const char * | target_reset_mode_name (enum target_reset_mode reset_mode) |
Return the name of a target reset reason enumeration value. More... | |
static int | target_restore_working_area (struct target *target, struct working_area *area) |
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 modifications). More... | |
int | target_run_algorithm (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_param, uint32_t entry_point, uint32_t exit_point, int timeout_ms, void *arch_info) |
Downloads a target-specific native code algorithm to the target, and executes it. More... | |
int | target_run_flash_async_algorithm (struct target *target, const uint8_t *buffer, uint32_t count, int block_size, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t buffer_start, uint32_t buffer_size, uint32_t entry_point, uint32_t exit_point, void *arch_info) |
Streams data to a circular buffer on target intended for consumption by code running asynchronously on target. More... | |
int | target_run_read_async_algorithm (struct target *target, uint8_t *buffer, uint32_t count, int block_size, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t buffer_start, uint32_t buffer_size, uint32_t entry_point, uint32_t exit_point, void *arch_info) |
This routine is a wrapper for asynchronous algorithms. More... | |
static int | target_soft_reset_halt (struct target *target) |
static void | target_split_working_area (struct working_area *area, uint32_t size) |
int | target_start_algorithm (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t entry_point, uint32_t exit_point, void *arch_info) |
Executes a target-specific native code algorithm and leaves it running. More... | |
const char * | target_state_name (struct target *t) |
Return the name of this targets current state. More... | |
int | target_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
Step the target. More... | |
static const char * | target_strerror_safe (int err) |
bool | target_supports_gdb_connection (struct target *target) |
Check if target allows GDB connections. More... | |
static int | target_timer_callback_periodic_restart (struct target_timer_callback *cb, struct timeval *now) |
const char * | target_type_name (struct target *target) |
Get the target type name. More... | |
int | target_unregister_event_callback (int(*callback)(struct target *target, enum target_event event, void *priv), void *priv) |
int | target_unregister_reset_callback (int(*callback)(struct target *target, enum target_reset_mode reset_mode, void *priv), void *priv) |
int | target_unregister_timer_callback (int(*callback)(void *priv), void *priv) |
int | target_unregister_trace_callback (int(*callback)(struct target *target, size_t len, uint8_t *data, void *priv), void *priv) |
int | target_wait_algorithm (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, uint32_t exit_point, int timeout_ms, void *arch_info) |
Waits for an algorithm started with target_start_algorithm() to complete. More... | |
int | target_wait_state (struct target *target, enum target_state state, int ms) |
int | target_write_buffer (struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer) |
static int | target_write_buffer_default (struct target *target, target_addr_t address, uint32_t count, const uint8_t *buffer) |
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. More... | |
int | target_write_phys_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
int | target_write_phys_u16 (struct target *target, target_addr_t address, uint16_t value) |
int | target_write_phys_u32 (struct target *target, target_addr_t address, uint32_t value) |
int | target_write_phys_u64 (struct target *target, target_addr_t address, uint64_t value) |
int | target_write_phys_u8 (struct target *target, target_addr_t address, uint8_t value) |
int | target_write_u16 (struct target *target, target_addr_t address, uint16_t value) |
int | target_write_u32 (struct target *target, target_addr_t address, uint32_t value) |
int | target_write_u64 (struct target *target, target_addr_t address, uint64_t value) |
int | target_write_u8 (struct target *target, target_addr_t address, uint8_t value) |
static void | write_gmon (uint32_t *samples, uint32_t sampleNum, const char *filename, bool with_range, uint32_t start_address, uint32_t end_address, struct target *target, uint32_t duration_ms) |
static void | writeData (FILE *f, const void *data, size_t len) |
static void | writeLong (FILE *f, int l, struct target *target) |
static void | writeString (FILE *f, char *s) |
#define DEFAULT_HALT_TIMEOUT 5000 |
Definition at line 60 of file target/target.c.
Referenced by COMMAND_HANDLER(), and target_poll().
typedef int(* target_write_fn) (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
Definition at line 3445 of file target/target.c.
typedef unsigned char UNIT[2] |
Definition at line 4141 of file target/target.c.
enum target_cfg_param |
Definition at line 4795 of file target/target.c.
enum verify_mode |
Enumerator | |
---|---|
IMAGE_TEST | |
IMAGE_VERIFY | |
IMAGE_CHECKSUM_ONLY |
Definition at line 3729 of file target/target.c.
|
static |
Definition at line 345 of file target/target.c.
References all_targets, and target.
Referenced by target_create().
|
static |
Definition at line 6211 of file target/target.c.
References command_print(), command_print_sameline(), NULL, and size.
Referenced by COMMAND_HANDLER().
COMMAND_HANDLER | ( | handle_target_init_command | ) |
Definition at line 1582 of file target/target.c.
References CMD_ARGC, CMD_CTX, command_run_line(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, LOG_INFO, and target_init().
COMMAND_HANDLER | ( | handle_targets_command | ) |
Definition at line 2798 of file target/target.c.
References all_targets, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, command_print(), jtag_tap::dotted_name, jtag_tap::enabled, target::endianness, ERROR_OK, find_target(), Jim_Nvp_value2name_simple(), Jim_Nvp::name, target::next, target::state, target::tap, target_name(), target::target_number, target_state_name(), and target_type_name().
COMMAND_HANDLER | ( | handle_reg_command | ) |
Definition at line 3016 of file target/target.c.
References buf_to_hex_str(), CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), count, reg::dirty, DIV_ROUND_UP, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, reg::exist, reg_arch_type::get, get_current_target(), reg::hidden, LOG_DEBUG, reg::name, reg_cache::name, reg_cache::next, NULL, reg_cache::num_regs, target::reg_cache, reg_cache::reg_list, register_get_by_name(), reg_arch_type::set, reg::size, str_to_buf(), target, reg::type, reg::valid, and reg::value.
COMMAND_HANDLER | ( | handle_poll_command | ) |
Definition at line 3143 of file target/target.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ON_OFF, command_print(), jtag_tap::dotted_name, jtag_tap::enabled, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), jtag_poll_get_enabled(), jtag_poll_set_enabled(), target::tap, target_arch_state(), and target_poll().
COMMAND_HANDLER | ( | handle_wait_halt_command | ) |
Definition at line 3172 of file target/target.c.
References CMD_ARGC, CMD_ARGV, CMD_CTX, DEFAULT_HALT_TIMEOUT, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), TARGET_HALTED, and target_wait_state().
COMMAND_HANDLER | ( | handle_halt_command | ) |
Definition at line 3227 of file target/target.c.
References CALL_COMMAND_HANDLER, CMD_ARGC, CMD_ARGV, CMD_CTX, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), LOG_DEBUG, target_halt(), and target::verbose_halt_msg.
COMMAND_HANDLER | ( | handle_soft_reset_halt_command | ) |
Definition at line 3251 of file target/target.c.
References CMD_CTX, ERROR_OK, get_current_target(), LOG_USER, and target_soft_reset_halt().
COMMAND_HANDLER | ( | handle_reset_command | ) |
Definition at line 3262 of file target/target.c.
References CMD, CMD_ARGC, CMD_ARGV, ERROR_COMMAND_SYNTAX_ERROR, Jim_Nvp_name2value_simple(), Jim_Nvp::name, NULL, RESET_RUN, RESET_UNKNOWN, target_process_reset(), and Jim_Nvp::value.
COMMAND_HANDLER | ( | handle_resume_command | ) |
Definition at line 3281 of file target/target.c.
References addr, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, ERROR_COMMAND_SYNTAX_ERROR, get_current_target(), and target_resume().
COMMAND_HANDLER | ( | handle_step_command | ) |
Definition at line 3301 of file target/target.c.
References addr, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, ERROR_COMMAND_SYNTAX_ERROR, get_current_target(), LOG_DEBUG, and target_step().
COMMAND_HANDLER | ( | handle_md_command | ) |
Definition at line 3387 of file target/target.c.
References buffer, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, CMD_NAME, COMMAND_PARSE_ADDRESS, COMMAND_PARSE_NUMBER, count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, get_current_target(), LOG_ERROR, NULL, size, target, target_handle_md_output(), target_read_memory(), and target_read_phys_memory().
COMMAND_HANDLER | ( | handle_mw_command | ) |
Definition at line 3504 of file target/target.c.
References CMD_ARGC, CMD_ARGV, CMD_CTX, CMD_NAME, COMMAND_PARSE_ADDRESS, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, get_current_target(), target_fill_mem(), target_write_memory(), and target_write_phys_memory().
COMMAND_HANDLER | ( | handle_load_image_command | ) |
Definition at line 3583 of file target/target.c.
References imagesection::base_address, buffer, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, command_print(), duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_FAIL, ERROR_OK, get_current_target(), image_close(), image_open(), image_read_section(), length, NULL, image::num_sections, offset, image::sections, imagesection::size, TARGET_ADDR_FMT, and target_write_buffer().
COMMAND_HANDLER | ( | handle_dump_image_command | ) |
Definition at line 3667 of file target/target.c.
References buffer, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, command_print(), duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, FILEIO_BINARY, fileio_close(), fileio_open(), fileio_size(), FILEIO_WRITE, fileio_write(), get_current_target(), size, and target_read_buffer().
COMMAND_HANDLER | ( | handle_verify_image_checksum_command | ) |
Definition at line 3868 of file target/target.c.
References CALL_COMMAND_HANDLER, and IMAGE_CHECKSUM_ONLY.
COMMAND_HANDLER | ( | handle_verify_image_command | ) |
Definition at line 3873 of file target/target.c.
References CALL_COMMAND_HANDLER, and IMAGE_VERIFY.
COMMAND_HANDLER | ( | handle_test_image_command | ) |
Definition at line 3878 of file target/target.c.
References CALL_COMMAND_HANDLER, and IMAGE_TEST.
COMMAND_HANDLER | ( | handle_bp_command | ) |
Definition at line 3953 of file target/target.c.
References addr, BKPT_HARD, BKPT_SOFT, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_ADDRESS, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, handle_bp_command_list(), handle_bp_command_set(), and length.
COMMAND_HANDLER | ( | handle_rbp_command | ) |
Definition at line 3997 of file target/target.c.
References addr, breakpoint_remove(), breakpoint_remove_all(), CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and get_current_target().
COMMAND_HANDLER | ( | handle_wp_command | ) |
Definition at line 4016 of file target/target.c.
References addr, watchpoint::address, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), watchpoint::length, length, LOG_ERROR, watchpoint::mask, watchpoint::next, watchpoint::rw, TARGET_ADDR_FMT, type, watchpoint::value, watchpoint_add(), target::watchpoints, WPT_ACCESS, WPT_READ, and WPT_WRITE.
COMMAND_HANDLER | ( | handle_rwp_command | ) |
Definition at line 4084 of file target/target.c.
References addr, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), and watchpoint_remove().
COMMAND_HANDLER | ( | handle_virt2phys_command | ) |
Translate a virtual address to a physical address.
The low-level target implementation must have logged a detailed error which is forwarded to telnet/GDB session.
Definition at line 4104 of file target/target.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), TARGET_ADDR_FMT, target::type, and target_type::virt2phys.
COMMAND_HANDLER | ( | handle_profile_command | ) |
Some cores let us sample the PC without the annoying halt/resume step; for example, ARMv7 PCSR. Provide a way to use that more efficient mechanism.
Definition at line 4243 of file target/target.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, get_current_target(), LOG_ERROR, NULL, offset, target::state, target_halt(), TARGET_HALTED, target_poll(), target_profiling(), target_resume(), TARGET_RUNNING, timeval_ms(), and write_gmon().
COMMAND_HANDLER | ( | handle_target_event_list | ) |
Definition at line 5388 of file target/target.c.
References target_event_action::body, CMD, CMD_CTX, command_print(), ERROR_OK, target_event_action::event, target::event_action, get_current_target(), Jim_Nvp_value2name_simple(), Jim_Nvp::name, target_event_action::next, NULL, target_name(), and target::target_number.
COMMAND_HANDLER | ( | handle_fast_load_image_command | ) |
Definition at line 6021 of file target/target.c.
References FastLoad::address, imagesection::base_address, buffer, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, command_print(), FastLoad::data, duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_FAIL, ERROR_OK, free_fastload(), image_close(), image_open(), image_read_section(), FastLoad::length, NULL, image::num_sections, offset, image::sections, and imagesection::size.
COMMAND_HANDLER | ( | handle_fast_load_command | ) |
Definition at line 6123 of file target/target.c.
References CMD, CMD_ARGC, CMD_CTX, command_print(), FastLoad::data, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, fastload_num, get_current_target(), FastLoad::length, LOG_ERROR, NULL, target_write_buffer(), and timeval_ms().
COMMAND_HANDLER | ( | handle_target_reset_nag | ) |
Definition at line 6183 of file target/target.c.
References CALL_COMMAND_HANDLER.
COMMAND_HANDLER | ( | handle_ps_command | ) |
Definition at line 6190 of file target/target.c.
References CMD, CMD_CTX, command_print(), ERROR_OK, ERROR_TARGET_FAILURE, get_current_target(), LOG_INFO, rtos_type::ps_command, target::rtos, target::state, TARGET_HALTED, and rtos::type.
COMMAND_HANDLER | ( | handle_test_mem_access_command | ) |
Definition at line 6220 of file target/target.c.
References working_area::address, binprint(), CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), command_print_sameline(), duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ERROR_TARGET_UNALIGNED_ACCESS, get_current_target(), LOG_ERROR, LOG_INFO, NULL, offset, size, target::state, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, target_read_memory(), and target_write_memory().
|
static |
Definition at line 3551 of file target/target.c.
References addr, image::base_address, image::base_address_set, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_ADDRESS, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and image::start_address_set.
|
static |
Definition at line 3735 of file target/target.c.
References addr, imagesection::base_address, image::base_address, image::base_address_set, buffer, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ADDRESS, command_print(), duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, get_current_target(), image_calculate_checksum(), IMAGE_CHECKSUM_ONLY, image_close(), image_open(), image_read_section(), IMAGE_VERIFY, keep_alive(), LOG_ERROR, NULL, image::num_sections, image::sections, imagesection::size, image::start_address_set, TARGET_ADDR_FMT, target_checksum_memory(), and target_read_buffer().
const char* debug_reason_name | ( | struct target * | t | ) |
Definition at line 278 of file target/target.c.
References target::debug_reason, Jim_Nvp_value2name_simple(), LOG_ERROR, and Jim_Nvp::name.
Referenced by arm_arch_state(), armv7m_arch_state(), armv8_aarch64_state(), avr32_ap7k_arch_state(), esirisc_arch_state(), hwthread_fill_thread(), lakemont_arch_state(), mips32_arch_state(), mips64_arch_state(), nds32_arch_state(), stm8_arch_state(), and target_name().
|
static |
Definition at line 714 of file target/target.c.
References ERROR_OK.
Referenced by target_init_one().
|
static |
Definition at line 707 of file target/target.c.
References ERROR_OK, and target_set_examined().
Referenced by target_init_one().
|
static |
Definition at line 2776 of file target/target.c.
References command_print(), command_invocation::ctx, command_context::current_target, command_context::current_target_override, jtag_tap::dotted_name, jtag_tap::enabled, ERROR_FAIL, ERROR_OK, get_target(), NULL, target::tap, and target.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 6011 of file target/target.c.
References FastLoad::data, fastload_num, and NULL.
Referenced by COMMAND_HANDLER().
struct target* get_current_target | ( | struct command_context * | cmd_ctx | ) |
Definition at line 525 of file target/target.c.
References get_current_target_or_null(), LOG_ERROR, NULL, and target.
Referenced by __COMMAND_HANDLER(), aice_transport_init(), COMMAND_HANDLER(), COMMAND_HELPER(), esirisc_trace_analyze(), esirisc_trace_analyze_buffer(), esirisc_trace_analyze_full(), esirisc_trace_analyze_memory(), esirisc_trace_analyze_simple(), esirisc_trace_dump_buffer(), esirisc_trace_dump_memory(), get_current_sam3(), get_current_sam4(), handle_bp_command_list(), handle_bp_command_set(), hl_transport_init(), jim_arc_add_reg(), jim_arc_add_reg_type_flags(), jim_arc_add_reg_type_struct(), jim_arc_get_aux_reg(), jim_arc_get_core_reg(), jim_arc_get_reg_field(), jim_arc_set_aux_reg(), jim_arc_set_core_reg(), jim_array2mem(), jim_handle_actionpoints_num(), jim_mcrmrc(), and jim_mem2array().
struct target* get_current_target_or_null | ( | struct command_context * | cmd_ctx | ) |
Definition at line 537 of file target/target.c.
References command_context::current_target, and command_context::current_target_override.
Referenced by get_current_target(), jim_target_current(), and tcl_new_connection().
|
static |
Definition at line 4526 of file target/target.c.
References alloc_printf(), and NULL.
Referenced by target_array2mem().
struct target* get_target | ( | const char * | id | ) |
Definition at line 481 of file target/target.c.
References ERROR_OK, LOG_WARNING, target::next, NULL, target, target_name(), and target::target_number.
Referenced by COMMAND_HANDLER(), COMMAND_HELPER(), find_target(), FLASH_BANK_COMMAND_HANDLER(), image_open(), and jim_target_smp().
struct target* get_target_by_num | ( | int | num | ) |
Definition at line 512 of file target/target.c.
References all_targets, target::next, NULL, target, and target::target_number.
bool get_target_reset_nag | ( | void | ) |
Definition at line 6178 of file target/target.c.
References target_reset_nag.
Referenced by arm7_9_check_reset().
|
static |
Definition at line 3883 of file target/target.c.
References breakpoint::address, breakpoint::asid, BKPT_SOFT, target::breakpoints, buf_to_hex_str(), command_print(), command_invocation::ctx, ERROR_OK, get_current_target(), breakpoint::length, breakpoint::next, breakpoint::orig_instr, breakpoint::set, TARGET_ADDR_FMT, and breakpoint::type.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 3918 of file target/target.c.
References target_type::add_context_breakpoint, target_type::add_hybrid_breakpoint, breakpoint_add(), command_print(), context_breakpoint_add(), command_invocation::ctx, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, get_current_target(), hybrid_breakpoint_add(), LOG_ERROR, NULL, TARGET_ADDR_FMT, and target::type.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 2904 of file target/target.c.
References target::backoff, backoff_timer::count, jtag_tap::enabled, ERROR_OK, target::examined, is_jtag_poll_safe(), LOG_INFO, LOG_USER, target::next, polling_interval, sense_handler(), target::tap, target, target_call_event_callbacks(), TARGET_EVENT_GDB_HALT, target_examine_one(), target_name(), target_poll(), target_reset_examined(), target_was_examined(), and backoff_timer::times.
Referenced by target_init(), and target_reset_examined().
|
static |
Definition at line 694 of file target/target.c.
References ERROR_OK.
Referenced by target_init_one().
|
static |
Definition at line 4556 of file target/target.c.
References current_command_context(), get_current_target(), LOG_ERROR, NULL, target, and target_array2mem().
|
static |
Definition at line 4354 of file target/target.c.
References current_command_context(), get_current_target(), LOG_ERROR, NULL, target, and target_mem2array().
|
static |
Definition at line 5183 of file target/target.c.
References target_array2mem().
|
static |
Definition at line 5161 of file target/target.c.
References jim_getopt::argc, jim_getopt::argv, jim_getopt::interp, jim_getopt::isconfigure, Jim_GetOpt_Setup(), NULL, and target_configure().
|
static |
Definition at line 5944 of file target/target.c.
References jim_getopt::argc, jim_getopt::argv, jim_getopt::interp, Jim_GetOpt_Setup(), and target_create().
|
static |
Definition at line 5847 of file target/target.c.
References current_command_context(), get_current_target_or_null(), NULL, and target_name().
|
static |
Definition at line 5408 of file target/target.c.
References target_state_name().
|
static |
Definition at line 5196 of file target/target.c.
References jim_getopt::argc, target::cmd_name, target::defer_examine, jtag_tap::enabled, ERROR_OK, target_type::examine, jim_getopt::interp, Jim_GetOpt_Obj(), Jim_GetOpt_Setup(), jim_target_tap_disabled(), LOG_INFO, NULL, target::tap, target_name(), and target::type.
|
static |
Definition at line 5242 of file target/target.c.
References target::defer_examine.
|
static |
Definition at line 5334 of file target/target.c.
References jtag_tap::enabled, ERROR_OK, target_type::halt, jim_target_tap_disabled(), target::tap, and target::type.
|
static |
Definition at line 5250 of file target/target.c.
References ERROR_OK, target_call_event_callbacks(), and TARGET_EVENT_GDB_HALT.
|
static |
Definition at line 5418 of file target/target.c.
References jim_getopt::argc, target::cmd_name, jim_getopt::interp, Jim_GetOpt_Nvp(), Jim_GetOpt_NvpUnknown(), Jim_GetOpt_Setup(), NULL, target_handle_event(), and Jim_Nvp::value.
|
static |
Definition at line 5176 of file target/target.c.
References target_mem2array().
|
static |
Definition at line 5876 of file target/target.c.
References all_targets, target::next, NULL, and target_name().
|
static |
Definition at line 5264 of file target/target.c.
References jtag_tap::enabled, ERROR_OK, ERROR_TARGET_NOT_EXAMINED, jim_target_tap_disabled(), target_type::poll, target::tap, target_was_examined(), and target::type.
|
static |
Definition at line 5284 of file target/target.c.
References jim_getopt::argc, target_type::assert_reset, target_type::deassert_reset, target::defer_examine, jtag_tap::enabled, ERROR_OK, jim_getopt::interp, Jim_GetOpt_Nvp(), Jim_GetOpt_NvpUnknown(), Jim_GetOpt_Setup(), Jim_GetOpt_Wide(), jim_target_tap_disabled(), NVP_ASSERT, target::reset_halt, target::tap, target_free_all_working_areas_restore(), target_name(), target_reset_examined(), target::type, and Jim_Nvp::value.
|
static |
Definition at line 5892 of file target/target.c.
References get_target(), target::head, LOG_DEBUG, target::next, target_list::next, NULL, target::rtos, rtos_smp_init(), target::smp, target, and target_list::target.
|
static |
Definition at line 5190 of file target/target.c.
Referenced by jim_target_examine(), jim_target_halt(), jim_target_poll(), jim_target_reset(), and jim_target_wait_state().
|
static |
Definition at line 5862 of file target/target.c.
|
static |
Definition at line 5347 of file target/target.c.
References jim_getopt::argc, target::cmd_name, jtag_tap::enabled, ERROR_OK, jim_getopt::interp, Jim_GetOpt_Nvp(), Jim_GetOpt_NvpUnknown(), Jim_GetOpt_Setup(), Jim_GetOpt_Wide(), jim_target_tap_disabled(), Jim_Nvp::name, NULL, target::tap, target_name(), target_strerror_safe(), target_wait_state(), and Jim_Nvp::value.
|
static |
Definition at line 5234 of file target/target.c.
References target_was_examined().
|
static |
Definition at line 736 of file target/target.c.
References jtag_tap::enabled, ERROR_OK, JTAG_TAP_EVENT_ENABLE, jtag_unregister_event_callback(), target::tap, and target_examine_one().
Referenced by target_destroy(), and target_examine().
|
static |
|
static |
|
static |
Definition at line 4327 of file target/target.c.
References alloc_printf().
Referenced by target_mem2array().
|
static |
Definition at line 329 of file target/target.c.
References all_targets, target::next, and target::target_number.
Referenced by target_create().
|
static |
Definition at line 701 of file target/target.c.
References ERROR_OK.
Referenced by target_init_one().
|
static |
Definition at line 1904 of file target/target.c.
References working_area::address, working_area::backup, working_area::free, LOG_DEBUG, working_area::next, working_area::size, TARGET_ADDR_FMT, and target::working_areas.
Referenced by target_alloc_working_area_try(), target_free_all_working_areas_restore(), and target_free_working_area_restore().
|
static |
Definition at line 2851 of file target/target.c.
References ERROR_OK, jtag_power_dropout(), jtag_srst_asserted(), powerDropout, srstAsserted, and timeval_ms().
Referenced by handle_target().
int target_add_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Add the breakpoint for target.
This routine is a wrapper for target->type->add_breakpoint.
Definition at line 1311 of file target/target.c.
References target_type::add_breakpoint, BKPT_HARD, ERROR_TARGET_NOT_HALTED, LOG_WARNING, target::state, TARGET_HALTED, target_name(), breakpoint::type, and target::type.
Referenced by breakpoint_add_internal(), nds32_v3_leave_debug_state(), and target_set_examined().
int target_add_context_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Add the ContextID breakpoint for target.
This routine is a wrapper for target->type->add_context_breakpoint.
Definition at line 1321 of file target/target.c.
References target_type::add_context_breakpoint, ERROR_TARGET_NOT_HALTED, LOG_WARNING, target::state, TARGET_HALTED, target_name(), and target::type.
Referenced by context_breakpoint_add_internal(), and target_set_examined().
int target_add_hybrid_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Add the ContextID & IVA breakpoint for target.
This routine is a wrapper for target->type->add_hybrid_breakpoint.
Definition at line 1331 of file target/target.c.
References target_type::add_hybrid_breakpoint, ERROR_TARGET_NOT_HALTED, LOG_WARNING, target::state, TARGET_HALTED, target_name(), and target::type.
Referenced by hybrid_breakpoint_add_internal(), and target_set_examined().
int target_add_watchpoint | ( | struct target * | target, |
struct watchpoint * | watchpoint | ||
) |
Add the watchpoint for target.
This routine is a wrapper for target->type->add_watchpoint.
Definition at line 1347 of file target/target.c.
References target_type::add_watchpoint, ERROR_TARGET_NOT_HALTED, LOG_WARNING, target::state, TARGET_HALTED, target_name(), and target::type.
Referenced by target_set_examined(), and watchpoint_add().
unsigned target_address_bits | ( | struct target * | target | ) |
Return the number of address bits this target supports.
This routine is a wrapper for target->type->address_bits.
Definition at line 1471 of file target/target.c.
References target_type::address_bits, and target::type.
Referenced by target_address_max(), and target_set_examined().
target_addr_t target_address_max | ( | struct target * | target | ) |
Return the highest accessible address for this target.
Definition at line 1462 of file target/target.c.
References bits, and target_address_bits().
Referenced by gdb_memory_map(), and target_set_examined().
int target_alloc_working_area | ( | struct target * | target, |
uint32_t | size, | ||
struct working_area ** | area | ||
) |
Definition at line 2070 of file target/target.c.
References ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_WARNING, and target_alloc_working_area_try().
Referenced by aduc702x_write_block(), aducm360_write_block_async(), aducm360_write_block_sync(), arm7_9_bulk_write_memory(), arm_blank_check_memory(), arm_checksum_memory(), arm_code_to_working_area(), armv7m_blank_check_memory(), armv7m_checksum_memory(), bluenrgx_write(), cc26xx_init(), cc3220sf_write(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), COMMAND_HANDLER(), efm32x_write_block(), em357_write_block(), feroceon_bulk_write_memory(), fespi_write(), fm3_chip_erase(), fm3_erase(), fm3_write_block(), fm4_flash_erase(), fm4_flash_write(), kinetis_disable_wdog_algo(), kinetis_ke_stop_watchdog(), kinetis_ke_write_words(), kinetis_write_block(), lpc2000_iap_working_area_init(), lpc2000_write(), lpc3180_read_page(), lpc3180_write_page(), lpc32xx_read_page(), lpc32xx_write_page(), lpcspifi_erase(), lpcspifi_set_hw_mode(), lpcspifi_write(), max32xxx_write_block(), mdr_write_block(), mips32_blank_check_memory(), mips32_checksum_memory(), mips_m4k_bulk_write_memory(), mips_mips64_bulk_write_memory(), mrvlqspi_flash_write(), msp432_init(), niietcm4_write_block(), nrf5_ll_flash_write(), numicro_writeblock(), pic32mx_write_block(), psoc4_sysreq(), psoc5lp_write(), psoc6_erase(), psoc6_program_row(), scratch_reserve(), sh_qspi_upload_helper(), sim3x_write_block(), sromalgo_prepare(), stellaris_write_block(), stm32l4_write_block(), stm32lx_write_half_pages(), stm32x_write_block(), stm8_blank_check_memory(), str9x_write_block(), target_set_examined(), xmc1xxx_erase(), xmc1xxx_erase_check(), and xmc1xxx_write().
int target_alloc_working_area_try | ( | struct target * | target, |
uint32_t | size, | ||
struct working_area ** | area | ||
) |
Definition at line 1975 of file target/target.c.
References working_area::address, working_area::backup, target::backup_working_area, ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, working_area::free, LOG_DEBUG, LOG_ERROR, target_type::mmu, working_area::next, NULL, print_wa_layout(), working_area::size, TARGET_ADDR_FMT, target_read_memory(), target_split_working_area(), target::type, working_area::user, target::working_area, target::working_area_phys, target::working_area_phys_spec, target::working_area_size, target::working_area_virt, target::working_area_virt_spec, and target::working_areas.
Referenced by aduc702x_write_block(), aducm360_write_block_async(), aducm360_write_block_sync(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), efm32x_write_block(), em357_write_block(), fespi_write(), lpc2900_write(), max32xxx_write_block(), mdr_write_block(), niietcm4_write_block(), pic32mx_write_block(), qspi_read_write_block(), qspi_verify(), sh_qspi_upload_helper(), sim3x_write_block(), stellaris_write_block(), stm32l4_write_block(), stm32lx_write_half_pages(), stm32x_write_block(), stmqspi_blank_check(), str7x_write_block(), str9x_write_block(), target_alloc_working_area(), and target_set_examined().
int target_arch_state | ( | struct target * | target | ) |
Definition at line 2263 of file target/target.c.
References target_type::arch_state, ERROR_OK, LOG_WARNING, NULL, target::state, TARGET_HALTED, and target::type.
Referenced by COMMAND_HANDLER(), log_target_callback_event_handler(), and target_set_examined().
|
static |
Definition at line 4573 of file target/target.c.
References addr, buffer, count, ERROR_OK, get_int_array_element(), LOG_ERROR, NULL, target_buffer_set_u16(), target_buffer_set_u32(), target_write_memory(), target_write_phys_memory(), and width.
Referenced by jim_array2mem(), and jim_target_array2mem().
int target_blank_check_memory | ( | struct target * | target, |
struct target_memory_check_block * | blocks, | ||
int | num_blocks, | ||
uint8_t | erased_value | ||
) |
Definition at line 2505 of file target/target.c.
References target_type::blank_check_memory, ERROR_FAIL, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_ERROR, NULL, target_was_examined(), and target::type.
Referenced by default_flash_blank_check(), and target_set_examined().
uint16_t target_buffer_get_u16 | ( | struct target * | target, |
const uint8_t * | buffer | ||
) |
Definition at line 382 of file target/target.c.
References be_to_h_u16(), target::endianness, le_to_h_u16(), and TARGET_LITTLE_ENDIAN.
Referenced by aarch64_write_cpu_memory_slow(), arm7_9_unset_breakpoint(), arm7_9_write_memory(), arm_semihosting(), cfi_command_val(), cfi_probe(), COMMAND_HANDLER(), cortex_a_write_cpu_memory_slow(), cortex_m_dcc_read(), etm_read_instruction(), etmv1_data(), handle_iod_output(), mips_m4k_unset_breakpoint(), mips_mips16_unset_sdbbp(), target_buffer_get_u16_array(), target_handle_md_output(), target_mem2array(), target_read_u16(), target_set_examined(), xscale_read_instruction(), and xscale_write_memory().
void target_buffer_get_u16_array | ( | struct target * | target, |
const uint8_t * | buffer, | ||
uint32_t | count, | ||
uint16_t * | dstbuf | ||
) |
Definition at line 449 of file target/target.c.
References count, and target_buffer_get_u16().
Referenced by arc_mem_write(), mips_m4k_write_memory(), mips_mips64_write_memory(), and target_set_examined().
uint32_t target_buffer_get_u24 | ( | struct target * | target, |
const uint8_t * | buffer | ||
) |
Definition at line 373 of file target/target.c.
References be_to_h_u24(), target::endianness, le_to_h_u24(), and TARGET_LITTLE_ENDIAN.
Referenced by target_set_examined().
uint32_t target_buffer_get_u32 | ( | struct target * | target, |
const uint8_t * | buffer | ||
) |
Definition at line 364 of file target/target.c.
References be_to_h_u32(), target::endianness, le_to_h_u32(), and TARGET_LITTLE_ENDIAN.
Referenced by aarch64_write_cpu_memory_slow(), arc_get_register(), arc_get_register_value(), arc_mem_write_block16(), arc_mem_write_block8(), arc_restore_context(), arc_resume(), arc_set_register(), arm7_9_unset_breakpoint(), arm7_9_write_memory(), arm_semihosting(), armv4_5_mmu_translate_va(), armv7m_blank_check_memory(), calcaddr_physfromlin(), cfi_command_val(), cfi_probe(), COMMAND_HANDLER(), cortex_a_write_cpu_memory_slow(), cpu_context_read(), dsp563xx_write_memory_core(), etm_read_instruction(), etmv1_data(), feroceon_bulk_write_memory(), get_buffer(), get_name(), handle_iod_output(), lpc2000_iap_call(), mips_m4k_set_breakpoint(), mips_m4k_unset_breakpoint(), mips_mips64_unset_sdbbp(), psoc4_get_family(), riscv_semihosting(), semihosting_get_field(), target_buffer_get_u32_array(), target_checksum_memory(), target_handle_md_output(), target_mem2array(), target_read_u32(), target_set_examined(), xmc4xxx_write_page(), xscale_read_instruction(), and xscale_write_memory().
void target_buffer_get_u32_array | ( | struct target * | target, |
const uint8_t * | buffer, | ||
uint32_t | count, | ||
uint32_t * | dstbuf | ||
) |
Definition at line 441 of file target/target.c.
References count, and target_buffer_get_u32().
Referenced by arc_mem_write(), lpc2900_run_bist128(), mips_m4k_bulk_write_memory(), mips_m4k_write_memory(), mips_mips64_write_memory(), and target_set_examined().
uint64_t target_buffer_get_u64 | ( | struct target * | target, |
const uint8_t * | buffer | ||
) |
Definition at line 355 of file target/target.c.
References be_to_h_u64(), target::endianness, le_to_h_u64(), and TARGET_LITTLE_ENDIAN.
Referenced by calcaddr_physfromlin(), chromium_ec_update_threads(), COMMAND_HANDLER(), read_userrow(), semihosting_get_field(), target_buffer_get_u64_array(), target_handle_md_output(), target_read_u64(), and target_set_examined().
void target_buffer_get_u64_array | ( | struct target * | target, |
const uint8_t * | buffer, | ||
uint32_t | count, | ||
uint64_t * | dstbuf | ||
) |
Definition at line 433 of file target/target.c.
References count, and target_buffer_get_u64().
Referenced by mips_mips64_bulk_write_memory(), mips_mips64_write_memory(), and target_set_examined().
void target_buffer_set_u16 | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint16_t | value | ||
) |
Definition at line 418 of file target/target.c.
References target::endianness, h_u16_to_be(), h_u16_to_le(), and TARGET_LITTLE_ENDIAN.
Referenced by aarch64_read_cpu_memory_slow(), arc_mem_write_block16(), COMMAND_HANDLER(), cortex_a_read_cpu_memory_slow(), cortex_m_dcc_read(), stm32x_write_options(), target_array2mem(), target_buffer_set_u16_array(), target_fill_io(), target_fill_mem(), target_set_examined(), target_write_phys_u16(), target_write_u16(), and xscale_read_memory().
void target_buffer_set_u16_array | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | count, | ||
const uint16_t * | srcbuf | ||
) |
Definition at line 473 of file target/target.c.
References count, and target_buffer_set_u16().
Referenced by mips_m4k_read_memory(), mips_mips64_read_memory(), and target_set_examined().
void target_buffer_set_u24 | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | value | ||
) |
Definition at line 409 of file target/target.c.
References target::endianness, h_u24_to_be(), h_u24_to_le(), and TARGET_LITTLE_ENDIAN.
Referenced by target_set_examined().
void target_buffer_set_u32 | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | value | ||
) |
Definition at line 400 of file target/target.c.
References target::endianness, h_u32_to_be(), h_u32_to_le(), and TARGET_LITTLE_ENDIAN.
Referenced by aarch64_read_cpu_memory_fast(), aarch64_read_cpu_memory_slow(), arc_get_register(), arc_mem_write_block16(), arc_mem_write_block8(), arc_resume(), arc_save_context(), arc_set_register(), armv7m_blank_check_memory(), COMMAND_HANDLER(), cortex_a_read_cpu_memory_fast(), cortex_a_read_cpu_memory_slow(), dsp563xx_read_memory_core(), kinetis_fill_fcf(), lpc2000_iap_call(), lpc2000_iap_working_area_init(), mips_m4k_set_breakpoint(), or1k_add_breakpoint(), psoc4_protect(), psoc4_sysreq(), psoc4_write(), semihosting_set_field(), sim3x_flash_protect(), target_array2mem(), target_buffer_set_u32_array(), target_checksum_memory(), target_fill_io(), target_fill_mem(), target_set_examined(), target_write_phys_u32(), target_write_u32(), writeLong(), xmc4xxx_flash_protect(), and xscale_read_memory().
void target_buffer_set_u32_array | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | count, | ||
const uint32_t * | srcbuf | ||
) |
Definition at line 465 of file target/target.c.
References count, and target_buffer_set_u32().
Referenced by aduc702x_write_block(), aducm360_write_block_async(), aducm360_write_block_sync(), arc_mem_read(), arm7_9_bulk_write_memory(), arm_code_to_working_area(), ath79_spi_bitbang_chunk(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), feroceon_bulk_write_memory(), lpc2900_write(), mips32_blank_check_memory(), mips32_checksum_memory(), mips_m4k_read_memory(), mips_mips64_read_memory(), pic32mx_write_block(), str7x_write_block(), str9x_write_block(), and target_set_examined().
void target_buffer_set_u64 | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint64_t | value | ||
) |
Definition at line 391 of file target/target.c.
References target::endianness, h_u64_to_be(), h_u64_to_le(), and TARGET_LITTLE_ENDIAN.
Referenced by COMMAND_HANDLER(), samd_modify_user_row_masked(), semihosting_set_field(), target_buffer_set_u64_array(), target_fill_mem(), target_set_examined(), target_write_phys_u64(), and target_write_u64().
void target_buffer_set_u64_array | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | count, | ||
const uint64_t * | srcbuf | ||
) |
Definition at line 457 of file target/target.c.
References count, and target_buffer_set_u64().
Referenced by mips_mips64_read_memory(), and target_set_examined().
|
static |
Definition at line 427 of file target/target.c.
Referenced by target_fill_mem().
int target_call_event_callbacks | ( | struct target * | target, |
enum target_event | event | ||
) |
Definition at line 1784 of file target/target.c.
References target_event_callback::callback, ERROR_OK, Jim_Nvp_value2name_simple(), LOG_DEBUG, name, target_event_callback::next, target_event_callback::priv, target_call_event_callbacks(), target_event_callbacks, TARGET_EVENT_GDB_HALT, TARGET_EVENT_HALTED, target_handle_event(), and target_name().
Referenced by aarch64_poll(), aarch64_resume(), aarch64_step(), aarch64_step_restart_smp(), adapter_poll(), adapter_resume(), adapter_step(), arc_halt(), arc_poll(), arc_resume(), arc_step(), arm11_halt(), arm11_poll(), arm11_resume(), arm11_step(), arm720t_soft_reset_halt(), arm7_9_poll(), arm7_9_resume(), arm7_9_soft_reset_halt(), arm7_9_step(), arm920t_soft_reset_halt(), arm926ejs_soft_reset_halt(), armv7m_trace_tpiu_config(), avr32_ap7k_poll(), avr32_ap7k_resume(), cortex_a_poll(), cortex_a_resume(), cortex_m_poll(), cortex_m_resume(), cortex_m_step(), do_resume(), dsp563xx_poll(), dsp563xx_resume(), dsp563xx_step(), esirisc_poll(), esirisc_resume_or_step(), gdb_connection_closed(), gdb_handle_vcont_packet(), gdb_input_inner(), gdb_new_connection(), gdb_target_callback_event_handler(), gdb_v_packet(), halt_finish(), handle_halt(), handle_target(), jim_target_halt_gdb(), lakemont_poll(), lakemont_step(), lakemont_update_after_probemode_entry(), mips_m4k_internal_restore(), mips_m4k_poll(), mips_m4k_resume(), mips_m4k_step(), mips_mips64_poll(), mips_mips64_resume(), mips_mips64_step(), nds32_halt(), nds32_poll(), nds32_resume(), nds32_step(), or1k_poll(), or1k_resume_or_step(), resume_finish(), riscv_openocd_poll(), riscv_openocd_step(), semihosting_common(), stm8_poll(), stm8_resume(), stm8_step(), target_call_event_callbacks(), target_examine_one(), target_poll(), target_resume(), target_step(), xscale_poll(), xscale_resume(), xscale_step(), and xscale_step_inner().
int target_call_reset_callbacks | ( | struct target * | target, |
enum target_reset_mode | reset_mode | ||
) |
Definition at line 1809 of file target/target.c.
References target_reset_callback::callback, ERROR_OK, Jim_Nvp_value2name_simple(), list_for_each_entry, LOG_DEBUG, name, and target_reset_callback::priv.
Referenced by psoc5lp_nvl_write(), and target_process_reset().
|
static |
Definition at line 1840 of file target/target.c.
References target_timer_callback::callback, target_timer_callback::priv, target_timer_callback_periodic_restart(), TARGET_TIMER_TYPE_PERIODIC, target_unregister_timer_callback(), and target_timer_callback::type.
Referenced by target_call_timer_callbacks_check_time().
int target_call_timer_callbacks | ( | void | ) |
Definition at line 1892 of file target/target.c.
References target_call_timer_callbacks_check_time().
Referenced by server_loop().
|
static |
Definition at line 1851 of file target/target.c.
References target_timer_callback::callback, ERROR_OK, gettimeofday(), keep_alive(), target_timer_callback::next, NULL, target_call_timer_callback(), target_timer_callbacks, TARGET_TIMER_TYPE_PERIODIC, and timeval_compare().
Referenced by target_call_timer_callbacks(), and target_call_timer_callbacks_now().
int target_call_timer_callbacks_now | ( | void | ) |
Invoke this to ensure that e.g.
polling timer callbacks happen before a synchronous command completes.
Definition at line 1898 of file target/target.c.
References target_call_timer_callbacks_check_time().
Referenced by COMMAND_HANDLER(), gdb_query_packet(), script_command_run(), and target_process_reset().
int target_call_trace_callbacks | ( | struct target * | target, |
size_t | len, | ||
uint8_t * | data | ||
) |
Definition at line 1822 of file target/target.c.
References target_trace_callback::callback, ERROR_OK, list_for_each_entry, and target_trace_callback::priv.
Referenced by armv7m_poll_trace().
int target_checksum_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint32_t * | crc | ||
) |
Definition at line 2465 of file target/target.c.
References buffer, target_type::checksum_memory, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, image_calculate_checksum(), LOG_ERROR, NULL, target_buffer_get_u32(), target_buffer_set_u32(), target_read_buffer(), target_was_examined(), and target::type.
Referenced by COMMAND_HELPER(), default_flash_verify(), gdb_query_packet(), mdr_write(), and target_set_examined().
|
static |
Definition at line 4830 of file target/target.c.
References jim_getopt::argc, jim_getopt::argv, target::backup_working_area, target_event_action::body, COMMAND_CONFIG, CONNECTION_LIMIT_UNLIMITED, target::coreid, current_command_context(), target::dbgbase, target::dbgbase_set, target::defer_examine, jtag_tap::dotted_name, target::endianness, target_event_action::event, target::event_action, target::gdb_max_connections, target::gdb_port_override, target::has_dap, jim_getopt::interp, target_event_action::interp, jim_getopt::isconfigure, Jim_GetOpt_Nvp(), Jim_GetOpt_NvpUnknown(), Jim_GetOpt_Obj(), Jim_GetOpt_String(), Jim_GetOpt_Wide(), Jim_Nvp_value2name_simple(), jtag_tap_by_jim_obj(), command_context::mode, Jim_Nvp::name, target_event_action::next, NULL, rtos_create(), target::tap, target::tap_configured, target, target_free_all_working_areas(), target_type::target_jim_configure, TARGET_LITTLE_ENDIAN, target_type_name(), TCFG_CHAIN_POSITION, TCFG_COREID, TCFG_DBGBASE, TCFG_DEFER_EXAMINE, TCFG_ENDIAN, TCFG_EVENT, TCFG_GDB_MAX_CONNECTIONS, TCFG_GDB_PORT, TCFG_RTOS, TCFG_TYPE, TCFG_WORK_AREA_BACKUP, TCFG_WORK_AREA_PHYS, TCFG_WORK_AREA_SIZE, TCFG_WORK_AREA_VIRT, target::type, Jim_Nvp::value, target::working_area_phys, target::working_area_phys_spec, target::working_area_size, target::working_area_virt, and target::working_area_virt_spec.
Referenced by jim_target_configure(), and target_create().
|
static |
Definition at line 5597 of file target/target.c.
References append_to_list_all_targets(), target::arch_info, jim_getopt::argc, jim_getopt::argv, target::backup_working_area, target::breakpoints, command_registration::chain, target::cmd_name, COMMAND_ANY, command_find_in_context(), COMMAND_REGISTRATION_DONE, command_set_handler_data(), target_type::commands, target::coreid, current_command_context(), command_context::current_target, target::dap_configured, target::dbg_msg_enabled, DBG_REASON_UNDEFINED, target::dbgmsg, target::debug_reason, target_type::deinit_target, target::endianness, ERROR_OK, target::gdb_max_connections, target::gdb_port_override, get_current_transport(), target::halt_issued, target::has_dap, jim_getopt::interp, jim_getopt::isconfigure, Jim_GetOpt_Obj(), Jim_GetOpt_String(), LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, target_type::name, name, command_registration::name, new_target_number(), target::next, NULL, transport::override_target, target::reg_cache, register_commands(), target::rtos, target::rtos_auto_detect, rtos_destroy(), target::state, target::tap, target::tap_configured, target, target_configure(), target_type::target_create, TARGET_ENDIAN_UNKNOWN, target_instance_command_handlers, TARGET_LITTLE_ENDIAN, target::target_number, TARGET_UNKNOWN, target::trace_info, target::type, target::verbose_halt_msg, target::watchpoints, target::working_area, target::working_area_size, and target::working_areas.
Referenced by jim_target_create().
|
static |
Definition at line 2193 of file target/target.c.
References target_event_action::body, target::cmd_name, target_type::deinit_target, target::event_action, target::fileio_info, working_area::free, target::gdb_port_override, target::head, target_event_action::interp, jtag_enable_callback(), jtag_unregister_event_callback(), target_list::next, target_event_action::next, NULL, rtos_destroy(), target::semihosting, target::smp, target_list::target, target_free_all_working_areas(), target::trace_info, and target::type.
Referenced by target_quit().
const char* target_event_name | ( | enum target_event | event | ) |
Return the name of a target event enumeration value.
Definition at line 306 of file target/target.c.
References Jim_Nvp_value2name_simple(), LOG_ERROR, and Jim_Nvp::name.
Referenced by target_set_examined(), and tcl_target_callback_event_handler().
int target_examine | ( | void | ) |
Definition at line 753 of file target/target.c.
References target::defer_examine, jtag_tap::enabled, ERROR_OK, jtag_enable_callback(), jtag_register_event_callback(), LOG_WARNING, target::next, target::tap, target, target_examine_one(), and target_name().
Referenced by COMMAND_HANDLER().
int target_examine_one | ( | struct target * | target | ) |
Examine the specified target, letting it perform any Initialisation that requires JTAG access.
This routine is a wrapper for target->type->examine.
Definition at line 721 of file target/target.c.
References ERROR_OK, target_type::examine, target_call_event_callbacks(), TARGET_EVENT_EXAMINE_END, TARGET_EVENT_EXAMINE_FAIL, TARGET_EVENT_EXAMINE_START, and target::type.
Referenced by arm7_9_deassert_reset(), COMMAND_HANDLER(), handle_target(), jtag_enable_callback(), and target_examine().
|
static |
Definition at line 3448 of file target/target.c.
References ERROR_FAIL, ERROR_OK, keep_alive(), LOG_ERROR, NULL, target_buffer_set_u16(), target_buffer_set_u32(), target_buffer_set_u64(), and target_buffer_set_u8().
Referenced by COMMAND_HANDLER().
void target_free_all_working_areas | ( | struct target * | target | ) |
Definition at line 2161 of file target/target.c.
References working_area::backup, working_area::free, NULL, target_free_all_working_areas_restore(), and target::working_areas.
Referenced by aarch64_restore_one(), adapter_resume(), arm11_resume(), arm7_9_resume(), avr32_ap7k_resume(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), cortex_a_internal_restore(), cortex_m_resume(), esirisc_resume_or_step(), lpc2900_write(), mips_m4k_internal_restore(), mips_mips64_resume(), nds32_resume(), or1k_resume_or_step(), stm8_resume(), target_configure(), target_destroy(), target_set_examined(), and xscale_resume().
|
static |
Definition at line 2137 of file target/target.c.
References working_area::free, LOG_DEBUG, working_area::next, NULL, print_wa_layout(), target_merge_working_areas(), target_restore_working_area(), working_area::user, and target::working_areas.
Referenced by jim_target_reset(), and target_free_all_working_areas().
int target_free_working_area | ( | struct target * | target, |
struct working_area * | area | ||
) |
Definition at line 2129 of file target/target.c.
References target_free_working_area_restore().
Referenced by aduc702x_write_block(), aducm360_write_block_async(), aducm360_write_block_sync(), arm_blank_check_memory(), arm_checksum_memory(), armv7m_blank_check_memory(), armv7m_checksum_memory(), bluenrgx_write(), cc26xx_init(), cc26xx_quit(), cc3220sf_write(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), COMMAND_HANDLER(), efm32x_write_block(), em357_write_block(), fespi_write(), fm3_chip_erase(), fm3_erase(), fm3_write_block(), fm4_flash_erase(), fm4_flash_write(), get_lpc2000_part_id(), kinetis_disable_wdog_algo(), kinetis_ke_stop_watchdog(), kinetis_ke_write_words(), kinetis_write_block(), lpc2000_erase(), lpc2000_iap_blank_check(), lpc2000_iap_working_area_init(), lpc2000_write(), lpc3180_read_page(), lpc3180_write_page(), lpc32xx_read_page(), lpc32xx_write_page(), lpcspifi_erase(), lpcspifi_set_hw_mode(), lpcspifi_write(), max32xxx_write_block(), mdr_write_block(), mips32_blank_check_memory(), mips32_checksum_memory(), mrvlqspi_flash_write(), msp432_init(), msp432_quit(), niietcm4_write_block(), nrf5_ll_flash_write(), numicro_writeblock(), pic32mx_write_block(), psoc4_sysreq(), psoc5lp_write(), psoc6_erase(), psoc6_program_row(), qspi_read_write_block(), qspi_verify(), scratch_release(), sh_qspi_upload_helper(), sim3x_write_block(), sromalgo_prepare(), sromalgo_release(), stellaris_write_block(), stm32l4_write_block(), stm32lx_write_half_pages(), stm32x_write_block(), stm8_blank_check_memory(), stmqspi_blank_check(), str7x_write_block(), str9x_write_block(), target_set_examined(), xmc1xxx_erase(), xmc1xxx_erase_check(), and xmc1xxx_write().
|
static |
Definition at line 2096 of file target/target.c.
References working_area::address, ERROR_OK, working_area::free, LOG_DEBUG, NULL, print_wa_layout(), working_area::size, TARGET_ADDR_FMT, target_merge_working_areas(), target_restore_working_area(), and working_area::user.
Referenced by target_free_working_area().
Pass GDB file-I/O response to target after finishing host syscall.
This routine is a wrapper for target->type->gdb_fileio_end.
Definition at line 1453 of file target/target.c.
References target::cmd_name, ERROR_TARGET_NOT_HALTED, target_type::gdb_fileio_end, LOG_WARNING, target::state, TARGET_HALTED, and target::type.
Referenced by gdb_fileio_response_packet(), and target_set_examined().
|
static |
Definition at line 2288 of file target/target.c.
References ERROR_OK.
Referenced by target_init_one().
const char* target_get_gdb_arch | ( | struct target * | target | ) |
Obtain the architecture for GDB.
This routine is a wrapper for target->type->get_gdb_arch.
Definition at line 1379 of file target/target.c.
References target_type::get_gdb_arch, NULL, and target::type.
Referenced by gdb_generate_target_description(), gdb_target_description_supported(), and target_set_examined().
int target_get_gdb_fileio_info | ( | struct target * | target, |
struct gdb_fileio_info * | fileio_info | ||
) |
Obtain file-I/O information from target for GDB to do syscall.
This routine is a wrapper for target->type->get_gdb_fileio_info.
Definition at line 1444 of file target/target.c.
References target::cmd_name, ERROR_TARGET_NOT_HALTED, target_type::get_gdb_fileio_info, LOG_WARNING, target::state, TARGET_HALTED, and target::type.
Referenced by gdb_frontend_halted(), and target_set_examined().
|
static |
Definition at line 2278 of file target/target.c.
References ERROR_FAIL.
Referenced by target_init_one().
int target_get_gdb_reg_list | ( | struct target * | target, |
struct reg ** | reg_list[], | ||
int * | reg_list_size, | ||
enum target_register_class | reg_class | ||
) |
Obtain the registers for GDB.
This routine is a wrapper for target->type->get_gdb_reg_list.
Definition at line 1386 of file target/target.c.
References ERROR_FAIL, ERROR_OK, target_type::get_gdb_reg_list, LOG_ERROR, NULL, target_was_examined(), and target::type.
Referenced by gdb_get_registers_packet(), gdb_set_registers_packet(), get_current(), hwthread_get_thread_reg_list(), linux_os_thread_reg_list(), target_get_gdb_reg_list_noread(), and target_set_examined().
int target_get_gdb_reg_list_noread | ( | struct target * | target, |
struct reg ** | reg_list[], | ||
int * | reg_list_size, | ||
enum target_register_class | reg_class | ||
) |
Obtain the registers for GDB, but don't read register values from the target.
This routine is a wrapper for target->type->get_gdb_reg_list_noread.
Definition at line 1408 of file target/target.c.
References ERROR_OK, target_type::get_gdb_reg_list_noread, target_get_gdb_reg_list(), and target::type.
Referenced by gdb_generate_target_description(), gdb_get_register_packet(), gdb_set_register_packet(), gdb_target_description_supported(), and target_set_examined().
uint32_t target_get_working_area_avail | ( | struct target * | target | ) |
Definition at line 2175 of file target/target.c.
References working_area::free, working_area::next, NULL, size, working_area::size, target::working_area_size, and target::working_areas.
Referenced by armv7m_blank_check_memory(), cc3220sf_write(), fm4_flash_write(), kinetis_write_block(), lpcspifi_write(), mrvlqspi_flash_write(), psoc5lp_write(), qspi_read_write_block(), stm32l4_write_block(), stmqspi_blank_check(), target_set_examined(), and xmc1xxx_write().
int target_halt | ( | struct target * | target | ) |
Definition at line 574 of file target/target.c.
References ERROR_FAIL, ERROR_OK, target_type::halt, target::halt_issued, target::halt_issued_time, LOG_ERROR, target_was_examined(), timeval_ms(), and target::type.
Referenced by aarch64_deassert_reset(), arc_assert_reset(), arm11_deassert_reset(), arm720t_soft_reset_halt(), arm7_9_dcc_completion(), arm7_9_deassert_reset(), arm7_9_soft_reset_halt(), arm920t_soft_reset_halt(), arm926ejs_soft_reset_halt(), armv4_5_run_algorithm_completion(), armv7m_wait_algorithm(), cc26xx_quit(), COMMAND_HANDLER(), cortex_m_assert_reset(), dsp563xx_assert_reset(), feroceon_bulk_write_memory(), gdb_input_inner(), handle_reset_halt(), lakemont_reset_deassert(), mips32_run_and_wait(), mips_m4k_assert_reset(), mips_mips64_assert_reset(), msp432_quit(), nds32_gdb_attach(), nds32_soft_reset_halt(), nds32_v2_deassert_reset(), nds32_v3_deassert_reset(), nds32_v3m_deassert_reset(), sromalgo_release(), stm32lx_obl_launch(), stm8_reset_assert(), stm8_run_and_wait(), target_profiling_default(), and xscale_assert_reset().
void target_handle_event | ( | struct target * | target, |
enum target_event | e | ||
) |
Definition at line 4735 of file target/target.c.
References target_event_action::body, current_command_context(), command_context::current_target_override, ERROR_COMMAND_CLOSE_CONNECTION, target_event_action::event, target::event_action, target_event_action::interp, Jim_Nvp_value2name_simple(), LOG_DEBUG, LOG_USER, name, target_event_action::next, NULL, target, target_name(), target::target_number, and target_type_name().
Referenced by aarch64_assert_reset(), arc_assert_reset(), arm11_assert_reset(), arm7_9_assert_reset(), cortex_a_assert_reset(), cortex_m_assert_reset(), jim_target_invoke_event(), mips_m4k_assert_reset(), target_call_event_callbacks(), and target_set_examined().
void target_handle_md_output | ( | struct command_invocation * | cmd, |
struct target * | target, | ||
target_addr_t | address, | ||
unsigned | size, | ||
unsigned | count, | ||
const uint8_t * | buffer | ||
) |
Definition at line 3323 of file target/target.c.
References command_print(), count, LOG_ERROR, output, size, TARGET_ADDR_FMT, target_buffer_get_u16(), target_buffer_get_u32(), and target_buffer_get_u64().
Referenced by COMMAND_HANDLER(), and target_set_examined().
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.
Definition at line 4784 of file target/target.c.
References target_event_action::event, target::event_action, target_event_action::next, and NULL.
Referenced by aarch64_assert_reset(), arc_assert_reset(), arm11_assert_reset(), arm7_9_assert_reset(), cortex_a_assert_reset(), cortex_m_assert_reset(), and mips_m4k_assert_reset().
int target_hit_watchpoint | ( | struct target * | target, |
struct watchpoint ** | watchpoint | ||
) |
Find out the just hit watchpoint for target.
This routine is a wrapper for target->type->hit_watchpoint.
Definition at line 1361 of file target/target.c.
References target::cmd_name, ERROR_FAIL, ERROR_TARGET_NOT_HALTED, target_type::hit_watchpoint, LOG_WARNING, NULL, target::state, TARGET_HALTED, and target::type.
Referenced by target_set_examined(), and watchpoint_hit().
|
static |
Definition at line 1556 of file target/target.c.
References ERROR_OK, handle_target(), command_context::interp, target::next, polling_interval, target, target_init_one(), target_register_timer_callback(), target_register_user_commands(), and TARGET_TIMER_TYPE_PERIODIC.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 1496 of file target/target.c.
References target_type::check_reset, default_check_reset(), default_examine(), ERROR_OK, target_type::examine, target_type::gdb_fileio_end, target_type::get_gdb_fileio_info, identity_virt2phys(), target_type::init_target, LOG_ERROR, LOG_WARNING, target_type::mmu, target_type::name, no_mmu(), NULL, target_type::profiling, target_type::read_buffer, target_type::read_memory, target_type::read_phys_memory, target_gdb_fileio_end_default(), target_get_gdb_fileio_info_default(), target_name(), target_profiling_default(), target_read_buffer_default(), target_reset_examined(), target_write_buffer_default(), target::type, type, target_type::virt2phys, target_type::write_buffer, target_type::write_memory, and target_type::write_phys_memory.
Referenced by target_init().
|
static |
Definition at line 4371 of file target/target.c.
References addr, buffer, count, ERROR_OK, LOG_ERROR, new_int_array_element(), NULL, target_buffer_get_u16(), target_buffer_get_u32(), target_read_memory(), target_read_phys_memory(), and width.
Referenced by jim_mem2array(), and jim_target_mem2array().
|
static |
Definition at line 1947 of file target/target.c.
References working_area::address, working_area::backup, working_area::free, working_area::next, NULL, working_area::size, and target::working_areas.
Referenced by target_free_all_working_areas_restore(), and target_free_working_area_restore().
int target_poll | ( | struct target * | target | ) |
Definition at line 544 of file target/target.c.
References DEFAULT_HALT_TIMEOUT, ERROR_FAIL, ERROR_OK, target::halt_issued, target::halt_issued_time, LOG_INFO, target_type::poll, target::state, target_call_event_callbacks(), TARGET_EVENT_GDB_HALT, TARGET_HALTED, target_was_examined(), timeval_ms(), and target::type.
Referenced by ambiqmicro_exec_command(), arm7_9_deassert_reset(), COMMAND_HANDLER(), cortex_m_profiling(), gdb_handle_vcont_packet(), gdb_input_inner(), handle_target(), or1k_profiling(), stm32lx_obl_launch(), target_profiling_default(), and target_wait_state().
|
static |
Definition at line 649 of file target/target.c.
References target_type::check_reset, command_print(), command_invocation::ctx, ERROR_FAIL, command_context::interp, Jim_Nvp_value2name_simple(), jtag_poll_get_enabled(), jtag_poll_set_enabled(), LOG_ERROR, Jim_Nvp::name, target::next, NULL, target::running_alg, target, target_call_reset_callbacks(), target_call_timer_callbacks_now(), and target::type.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 1478 of file target/target.c.
References target_type::profiling, and target::type.
Referenced by COMMAND_HANDLER().
int target_profiling_default | ( | struct target * | target, |
uint32_t * | samples, | ||
uint32_t | max_num_samples, | ||
uint32_t * | num_samples, | ||
uint32_t | seconds | ||
) |
Definition at line 2294 of file target/target.c.
References alive_sleep(), buf_get_u32(), ERROR_OK, gettimeofday(), LOG_INFO, NULL, target::reg_cache, register_get_by_name(), target::state, target_halt(), TARGET_HALTED, target_poll(), target_resume(), TARGET_RUNNING, timeval_add_time(), timeval_compare(), and reg::value.
Referenced by cortex_m_profiling(), target_init_one(), and target_set_examined().
void target_quit | ( | void | ) |
Free all the resources allocated by targets and the target layer.
Definition at line 2234 of file target/target.c.
References target::next, target_event_callback::next, target_timer_callback::next, NULL, target, target_destroy(), target_event_callbacks, and target_timer_callbacks.
Referenced by server_quit(), and target_set_examined().
int target_read_buffer | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint8_t * | buffer | ||
) |
Definition at line 2408 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, target_type::read_buffer, TARGET_ADDR_FMT, target_was_examined(), and target::type.
Referenced by arc_read_instruction_u32(), arc_set_breakpoint(), arm_access_size(), arm_nandread(), armv4_5_run_algorithm_inner(), armv7m_blank_check_memory(), armv7m_wait_algorithm(), cc3220sf_write(), chibios_update_memory_signature(), chibios_update_threads(), chromium_ec_detect_rtos(), chromium_ec_update_threads(), COMMAND_HANDLER(), COMMAND_HELPER(), default_flash_read(), dsp563xx_run_algorithm(), eCos_get_thread_reg_list(), eCos_update_threads(), embKernel_get_tasks_details(), embKernel_get_thread_reg_list(), embKernel_update_threads(), FreeRTOS_get_symbol_list_to_lookup(), FreeRTOS_update_threads(), gdb_read_memory_packet(), get_stacking_info_arm926ejs(), image_read_section(), imx31_read_page(), jim_nds32_bulk_read(), mips32_run_algorithm(), mqx_target_read_buffer(), mxc_read_page(), nds32_read_opcode(), nuttx_update_threads(), read_channel_name(), read_from_channel(), read_rtt_channel(), riot_update_threads(), riscv_hit_watchpoint(), rtos_generic_stack_read(), semihosting_common(), sh_qspi_read(), stm8_run_algorithm(), stmqspi_blank_check(), target_checksum_memory(), target_rtt_find_control_block(), target_rtt_read_control_block(), target_run_read_async_algorithm(), target_set_examined(), ThreadX_detect_rtos(), ThreadX_get_thread_reg_list(), ThreadX_update_threads(), tms470_erase_check(), and uCOS_III_update_threads().
|
static |
Definition at line 2432 of file target/target.c.
References ERROR_OK, size, and target_read_memory().
Referenced by target_init_one().
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.
This routine is a wrapper for target->type->read_memory.
Definition at line 1255 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_type::read_memory, target_name(), target_was_examined(), and target::type.
Referenced by aarch64_set_breakpoint(), arm7_9_set_breakpoint(), arm7_9_unset_breakpoint(), arm920t_write_memory(), arm_semihosting(), cfi_target_read_memory(), COMMAND_HANDLER(), cortex_a_read_buffer(), cortex_a_set_breakpoint(), cortex_m_set_breakpoint(), default_flash_mem_blank_check(), esirisc_trace_read_memory(), kinetis_write(), linux_read_memory(), lpc2900_read_security_status(), lpc2900_run_bist128(), lpc3180_read_page(), lpc32xx_read_page_mlc(), lpc32xx_read_page_slc(), lpc32xx_write_page_slc(), mips_m4k_set_breakpoint(), mips_m4k_unset_breakpoint(), mips_mips16_set_sdbbp(), mips_mips16_unset_sdbbp(), mips_mips64_set_sdbbp(), mips_mips64_unset_sdbbp(), psoc4_get_family(), psoc4_protect_check(), read_userrow(), riscv_add_breakpoint(), riscv_semihosting(), rpchf_read(), sam3_page_read(), sam4_page_read(), sam4l_write_page_partial(), samd_modify_user_row_masked(), same5_modify_user_row_masked(), samv_page_read(), semihosting_common(), semihosting_read_fields(), stm8_unset_breakpoint(), target_alloc_working_area_try(), target_mem2array(), target_read_buffer_default(), target_read_u16(), target_read_u32(), target_read_u64(), target_read_u8(), target_set_examined(), uCOS_III_find_last_thread_address(), uCOS_III_get_thread_reg_list(), uCOS_III_update_thread_offsets(), uCOS_III_update_threads(), and xscale_set_breakpoint().
int target_read_phys_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
uint8_t * | buffer | ||
) |
Definition at line 1269 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_type::read_phys_memory, target_name(), target_was_examined(), and target::type.
Referenced by COMMAND_HANDLER(), linux_read_memory(), target_mem2array(), and target_set_examined().
int target_read_u16 | ( | struct target * | target, |
target_addr_t | address, | ||
uint16_t * | value | ||
) |
Definition at line 2568 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_get_u16(), target_read_memory(), and target_was_examined().
Referenced by arc_set_breakpoint(), arc_unset_breakpoint(), arm7_9_set_breakpoint(), arm_semihosting(), arm_simulate_step_core(), armv7m_maybe_skip_bkpt_inst(), COMMAND_HANDLER(), do_data_output(), ecc_status_v1(), ecc_status_v2(), efm32x_get_flash_size(), efm32x_get_part_num(), efm32x_get_ram_size(), get_next_byte_from_sram_buffer(), get_next_halfword_from_sram_buffer(), imx31_init(), imx31_nand_ready(), imx31_write_page(), initialize_nf_controller(), kinetis_disable_wdog_kx(), lpc3180_read_data(), mips_m4k_set_breakpoint(), mips_mips16_set_sdbbp(), mxc_init(), mxc_nand_ready(), mxc_read_page(), mxc_write_page(), poll_for_complete_op(), riot_update_threads(), samd_check_error(), samd_protect_check(), same5_wait_and_check_error(), stm32l4_probe(), stm32lx_probe(), stm32x_get_flash_size(), stm32x_probe(), str9x_protect_check(), target_set_examined(), uCOS_III_update_threads(), xmc1xxx_erase_check(), and xmc1xxx_nvm_check_idle().
int target_read_u32 | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t * | value | ||
) |
Definition at line 2544 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_get_u32(), target_read_memory(), and target_was_examined().
Referenced by adapter_debug_entry(), aducm360_check_flash_completion(), aducm360_mass_erase(), aducm360_page_erase(), aducm360_set_write_enable(), aducm360_write_modified(), ambiqmicro_read_part_info(), arm7_9_resume(), arm7_9_set_breakpoint(), arm7_9_step(), arm_semihosting(), arm_simulate_step_core(), armv7m_trace_tpiu_config(), at91sam7_get_flash_status(), at91sam7_read_clock_info(), at91sam7_read_part_info(), at91sam9_nand_ready(), at91sam9_read_page(), at91sam9_write_page(), bluenrgx_probe(), bluenrgx_read_flash_reg(), bluenrgx_write(), call_sromapi(), cc26xx_probe(), cc26xx_wait_algo_done(), cc3220sf_erase(), cc3220sf_mass_erase(), check_flash_status(), chibios_get_thread_reg_list(), chibios_update_stacking(), chibios_update_threads(), chromium_ec_get_current_task_ptr(), chromium_ec_get_num_tasks(), chromium_ec_get_thread_reg_list(), chromium_ec_update_threads(), clrsetbits_u32(), COMMAND_HANDLER(), cortex_m_dwt_get_reg(), cortex_m_dwt_setup(), cortex_m_enable_fpb(), cortex_m_examine(), cortex_m_profiling(), davinci_init(), davinci_nand_ready(), davinci_read_block_data(), davinci_write_page_ecc1(), davinci_write_page_ecc4(), davinci_write_page_ecc4infix(), EFC_GetResult(), EFC_GetStatus(), efm32x_read_info(), efm32x_read_lock_data(), efm32x_read_reg_u32(), em357_get_flash_status(), em357_protect(), em357_protect_check(), em357_read_options(), esirisc_flash_check_status(), esirisc_flash_disable_protect(), esirisc_flash_enable_protect(), esirisc_flash_wait(), fespi_read_reg(), FLASHD_ReadUniqueID(), fm3_chip_erase(), fm3_erase(), fm4_enter_flash_cpu_programming_mode(), fm4_enter_flash_cpu_rom_mode(), FreeRTOS_get_thread_reg_list(), FreeRTOS_update_threads(), handle_reset_halt(), imx31_init(), ipc_acquire(), ipc_poll_lock_stat(), kinetis_disable_wdog32(), kinetis_ke_probe(), kinetis_probe_chip(), kinetis_protect_check(), kinetis_read_pmstat(), lpc2000_iap_call(), lpc288x_read_part_info(), lpc288x_wait_status_busy(), lpc2900_probe(), lpc2900_wait_status(), lpc3180_controller_ready(), lpc3180_cycle_time(), lpc3180_nand_ready(), lpc3180_read_data(), lpc3180_read_page(), lpc3180_tc_ready(), lpc32xx_controller_ready(), lpc32xx_cycle_time(), lpc32xx_dma_ready(), lpc32xx_nand_ready(), lpc32xx_read_data(), lpc32xx_read_page_mlc(), lpc32xx_tc_ready(), max32xxx_erase(), max32xxx_flash_op_post(), max32xxx_flash_op_pre(), max32xxx_mass_erase(), max32xxx_probe(), max32xxx_protect(), max32xxx_protect_check(), max32xxx_write(), mdr_erase(), mdr_mass_erase(), mdr_read(), mdr_write(), mips32_configure_break_unit(), mips32_configure_dbs(), mips32_configure_ibs(), mips32_enable_interrupts(), mips_m4k_examine_debug_reason(), mips_m4k_set_breakpoint(), mips_mips64_set_sdbbp(), mrvlqspi_fifo_flush(), mrvlqspi_read_byte(), mrvlqspi_set_conf(), mrvlqspi_set_ss_state(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), msp432_probe(), msp432_wait_inactive(), msp432_wait_return_code(), mxc_init(), niietcm4_dump_uflash_page(), niietcm4_opstatus_check(), niietcm4_probe(), niietcm4_probe_k1921vk01t(), niietcm4_protect_check(), niietcm4_uopstatus_check(), nrf5_erase_page(), nrf5_get_ram_size(), nrf5_probe(), nrf5_protect_check_bprot(), nrf5_protect_check_clenr0(), nrf5_protect_clenr0(), nrf5_read_ficr_info(), nrf5_wait_for_nvmc(), nuc910_nand_ready(), numicro_erase(), numicro_fmc_cmd(), numicro_get_cpu_type(), numicro_init_isp(), numicro_reg_unlock(), numicro_write(), nuttx_get_thread_reg_list(), nuttx_update_threads(), pic32mx_get_flash_status(), pic32mx_probe(), pic32mx_protect_check(), psoc4_get_silicon_id(), psoc4_probe(), psoc4_sysreq(), psoc4_test_flash_wounding(), psoc5lp_eeprom_probe(), psoc5lp_get_device_id(), psoc6_probe(), read_sfdp_block(), riot_get_thread_reg_list(), riot_update_threads(), rpc_hf_mode(), rpc_hf_wait_tend(), rpc_hf_xfer(), s3c2440_read_block_data(), s6e2cc_probe(), sam3_page_write(), sam3_ReadThisReg(), sam4_ReadThisReg(), sam4_set_wait(), sam4l_check_page_erased(), sam4l_flash_check_error(), sam4l_flash_command(), sam4l_flash_wait_until_ready(), sam4l_probe(), sam4l_protect_check(), samd_get_flash_page_info(), samd_get_reservedmask(), samd_modify_user_row_masked(), samd_probe(), samd_write(), same5_pre_write_check(), same5_probe(), same5_protect_check(), samv_efc_get_result(), samv_efc_get_status(), samv_get_device_id(), sim3x_erase_page(), sim3x_flash_erase(), sim3x_flash_lock_check(), sim3x_read_deviceid(), sim3x_read_info(), ssp_read_reg(), stellaris_erase(), stellaris_mass_erase(), stellaris_protect(), stellaris_protect_check(), stellaris_read_clock_info(), stellaris_read_part_info(), stellaris_write(), stm32l4_read_flash_reg(), stm32l4_read_idcode(), stm32lx_enable_write_half_page(), stm32lx_get_flash_status(), stm32lx_lock_program_memory(), stm32lx_mass_erase(), stm32lx_protect_check(), stm32lx_read_id_code(), stm32lx_unlock_options_bytes(), stm32lx_unlock_program_memory(), stm32x_get_device_id(), stm32x_get_flash_size(), stm32x_get_flash_status(), stm32x_probe(), stm32x_protect_check(), stm32x_read_flash_reg(), stm32x_read_id_code(), stm32x_read_options(), stm32x_unlock_option_reg(), stm32x_unlock_reg(), stmqspi_probe(), str7x_protect_check(), str7x_result(), str7x_waitbusy(), str9x_protect_check(), target_run_flash_async_algorithm(), target_run_read_async_algorithm(), target_set_examined(), test_iomux_settings(), tms470_check_flash_unlocked(), tms470_erase_check(), tms470_erase_sector(), tms470_flash_initialize_internal_state_machine(), tms470_flash_status(), tms470_protect(), tms470_protect_check(), tms470_read_part_info(), tms470_try_flash_keys(), tms470_write(), w600_get_flash_id(), w600_start_do(), xmc1xxx_get_info_command(), xmc1xxx_probe(), xmc1xxx_protect_check(), xmc4xxx_erase_sector(), xmc4xxx_get_flash_status(), xmc4xxx_get_info_command(), xmc4xxx_probe(), xmc4xxx_protect_check(), xscale_resume(), xscale_step_inner(), and xscale_update_vectors().
int target_read_u64 | ( | struct target * | target, |
target_addr_t | address, | ||
uint64_t * | value | ||
) |
Definition at line 2520 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_get_u64(), target_read_memory(), and target_was_examined().
Referenced by mips64_configure_break_unit(), mips64_configure_d_break_unit(), mips64_configure_i_break_unit(), mips64_enable_interrupts(), and target_set_examined().
int target_read_u8 | ( | struct target * | target, |
target_addr_t | address, | ||
uint8_t * | value | ||
) |
Definition at line 2592 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_read_memory(), and target_was_examined().
Referenced by aduc702x_check_flash_completion(), aduc702x_write_single(), at91sam9_read_data(), chibios_update_threads(), COMMAND_HANDLER(), davinci_read_block_data(), davinci_read_data(), efm32x_get_part_family(), efm32x_get_prod_rev(), efm32x_read_info(), find_sfdp_dummy(), fm3_busy_wait(), kinetis_disable_wdog(), kinetis_ftfx_command(), kinetis_ftfx_prepare(), kinetis_ke_ftmrx_command(), kinetis_ke_prepare_flash(), kinetis_ke_protect_check(), kinetis_ke_stop_watchdog(), kinetis_make_ram_ready(), kinetis_protect_check(), kinetis_read_pmstat(), kinetis_write_block(), lpc3180_controller_ready(), lpc3180_nand_ready(), lpc3180_read_data(), lpc32xx_controller_ready(), lpc32xx_nand_ready(), lpc32xx_read_data(), nuc910_nand_read(), orion_nand_read(), psoc5lp_nvl_write(), psoc5lp_spc_busy_wait_data(), psoc5lp_spc_busy_wait_idle(), psoc5lp_spc_enable_clock(), psoc5lp_spc_get_temp(), psoc5lp_spc_read_byte(), psoc5lp_spc_read_hidden_row(), psoc5lp_spc_read_volatile_byte(), read_flash_id(), read_sfdp_block(), read_status_reg(), riot_update_threads(), s3c2410_nand_ready(), s3c2410_read_data(), s3c2440_nand_ready(), s3c2440_read_block_data(), s3c24xx_read_data(), sh_qspi_cs_activate(), sh_qspi_cs_deactivate(), sh_qspi_init(), sh_qspi_wait_for_bit(), sh_qspi_xfer_common(), stm32x_otp_protect(), stm32x_otp_read_protect(), stm8_set_breakpoint(), str9x_erase(), str9x_protect(), str9x_write(), target_set_examined(), and uCOS_III_update_threads().
int target_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 6171 of file target/target.c.
References NULL, and register_commands().
Referenced by setup_command_handler().
int target_register_event_callback | ( | int(*)(struct target *target, enum target_event event, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1612 of file target/target.c.
References target_event_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, NULL, target_event_callback::priv, and target_event_callbacks.
Referenced by COMMAND_HANDLER(), gdb_new_connection(), nds32_init(), and tcl_new_connection().
int target_register_reset_callback | ( | int(*)(struct target *target, enum target_reset_mode reset_mode, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1634 of file target/target.c.
References target_reset_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, target_reset_callback::list, list_add(), LOG_ERROR, NULL, and target_reset_callback::priv.
Referenced by tcl_new_connection(), and uCOS_III_create().
int target_register_timer_callback | ( | int(*)(void *priv) | callback, |
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 specified.
Definition at line 1678 of file target/target.c.
References target_timer_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, gettimeofday(), NULL, target_timer_callback::priv, target_timer_callbacks, target_timer_callback::time_ms, timeval_add_time(), and type.
Referenced by aarch64_init_arch_info(), adapter_init_arch_info(), arm7_9_init_arch_info(), armv7m_trace_tpiu_config(), cortex_a_init_arch_info(), cortex_m_init_arch_info(), jsp_new_connection(), rtt_set_polling_interval(), rtt_start(), and target_init().
int target_register_trace_callback | ( | int(*)(struct target *target, size_t len, uint8_t *data, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1656 of file target/target.c.
References target_trace_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, target_trace_callback::list, list_add(), LOG_ERROR, NULL, and target_trace_callback::priv.
Referenced by tcl_new_connection().
|
static |
Definition at line 6652 of file target/target.c.
References ERROR_OK, NULL, register_commands(), target_request_register_commands(), and trace_register_commands().
Referenced by target_init().
int target_remove_breakpoint | ( | struct target * | target, |
struct breakpoint * | breakpoint | ||
) |
Remove the breakpoint for target.
This routine is a wrapper for target->type->remove_breakpoint.
Definition at line 1341 of file target/target.c.
References target_type::remove_breakpoint, and target::type.
Referenced by breakpoint_free(), nds32_v3_debug_entry(), and target_set_examined().
int target_remove_watchpoint | ( | struct target * | target, |
struct watchpoint * | watchpoint | ||
) |
Remove the watchpoint for target.
This routine is a wrapper for target->type->remove_watchpoint.
Definition at line 1356 of file target/target.c.
References target_type::remove_watchpoint, and target::type.
Referenced by target_set_examined(), and watchpoint_free().
|
static |
Reset the examined
flag for the given target.
Pure paranoia – targets are zeroed on allocation.
Definition at line 1489 of file target/target.c.
References target::examined, and handle_target().
Referenced by handle_target(), jim_target_reset(), and target_init_one().
const char* target_reset_mode_name | ( | enum target_reset_mode | reset_mode | ) |
Return the name of a target reset reason enumeration value.
Definition at line 317 of file target/target.c.
References Jim_Nvp_value2name_simple(), LOG_ERROR, and Jim_Nvp::name.
Referenced by target_set_examined(), and tcl_target_callback_reset_handler().
|
static |
Definition at line 2081 of file target/target.c.
References working_area::address, working_area::backup, target::backup_working_area, ERROR_OK, LOG_ERROR, NULL, working_area::size, TARGET_ADDR_FMT, and target_write_memory().
Referenced by target_free_all_working_areas_restore(), and target_free_working_area_restore().
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 modifications).
target | Which target should start executing. |
current | True to use the target's saved program counter instead of the address parameter |
address | Optionally used as the program counter. |
handle_breakpoints | True iff breakpoints at the resumption PC should be skipped. (For example, maybe execution was stopped by such a breakpoint, in which case it would be counterproductive to let it re-trigger. |
debug_execution | False if all working areas allocated by OpenOCD should be released and/or restored to their original contents. (This would for example be true to run some downloaded "helper" algorithm code, which resides in one such working buffer and uses another for data storage.) |
Definition at line 623 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, target_type::resume, target_call_event_callbacks(), TARGET_EVENT_RESUME_END, TARGET_EVENT_RESUME_START, target_was_examined(), and target::type.
Referenced by ambiqmicro_exec_command(), arc_assert_reset(), arm_semihosting_resume(), armv4_5_run_algorithm_inner(), armv7m_start_algorithm(), COMMAND_HANDLER(), cortex_m_profiling(), dsp563xx_run_algorithm(), gdb_fileio_reply(), gdb_fileio_response_packet(), gdb_handle_vcont_packet(), gdb_step_continue_packet(), hl_deassert_reset(), mips32_run_and_wait(), nds32_gdb_detach(), or1k_profiling(), stm8_run_and_wait(), and target_profiling_default().
int target_run_algorithm | ( | struct target * | target, |
int | num_mem_params, | ||
struct mem_param * | mem_params, | ||
int | num_reg_params, | ||
struct reg_param * | reg_param, | ||
uint32_t | entry_point, | ||
uint32_t | exit_point, | ||
int | timeout_ms, | ||
void * | arch_info | ||
) |
Downloads a target-specific native code algorithm to the target, and executes it.
Run an algorithm on the target given.
target | used to run the algorithm |
arch_info | target-specific description of the algorithm. |
Definition at line 808 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_type::run_algorithm, target::running_alg, target_type_name(), target_was_examined(), and target::type.
Referenced by aduc702x_write_block(), aducm360_write_block_sync(), arm_blank_check_memory(), arm_checksum_memory(), arm_nandread(), arm_nandwrite(), armv7m_blank_check_memory(), armv7m_checksum_memory(), cc3220sf_write(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), em357_write_block(), fm3_chip_erase(), fm3_erase(), fm3_write_block(), fm4_flash_erase(), fm4_flash_write(), kinetis_disable_wdog_algo(), kinetis_ke_stop_watchdog(), lpc2000_iap_call(), lpc2900_write(), lpcspifi_erase(), lpcspifi_set_hw_mode(), mips32_blank_check_memory(), mips32_checksum_memory(), numicro_writeblock(), pic32mx_write_block(), psoc4_sysreq(), qspi_verify(), sh_qspi_read(), sh_qspi_write(), steps_execute(), stm32lx_write_half_pages(), stm8_blank_check_memory(), stmqspi_blank_check(), str7x_write_block(), str9x_write_block(), target_set_examined(), xmc1xxx_erase(), xmc1xxx_erase_check(), and xmc1xxx_write().
int target_run_flash_async_algorithm | ( | struct target * | target, |
const uint8_t * | buffer, | ||
uint32_t | count, | ||
int | block_size, | ||
int | num_mem_params, | ||
struct mem_param * | mem_params, | ||
int | num_reg_params, | ||
struct reg_param * | reg_params, | ||
uint32_t | buffer_start, | ||
uint32_t | buffer_size, | ||
uint32_t | entry_point, | ||
uint32_t | exit_point, | ||
void * | arch_info | ||
) |
Streams data to a circular buffer on target intended for consumption by code running asynchronously on target.
This routine is a wrapper for asynchronous algorithms.
This is intended for applications where target-specific native code runs on the target, receives data from the circular buffer, does something with it (most likely writing it to a flash memory), and advances the circular buffer pointer.
This assumes that the helper algorithm has already been loaded to the target, but has not been started yet. Given memory and register parameters are passed to the algorithm.
The buffer is defined by (buffer_start, buffer_size) arguments and has the following format:
[buffer_start + 0, buffer_start + 4): Write Pointer address (aka head). Written and updated by this routine when new data is written to the circular buffer. [buffer_start + 4, buffer_start + 8): Read Pointer address (aka tail). Updated by code running on the target after it consumes data. [buffer_start + 8, buffer_start + buffer_size): Circular buffer contents.
See contrib/loaders/flash/stm32f1x.S for an example.
target | used to run the algorithm |
buffer | address on the host where data to be sent is located |
count | number of blocks to send |
block_size | size in bytes of each block |
num_mem_params | count of memory-based params to pass to algorithm |
mem_params | memory-based params to pass to algorithm |
num_reg_params | count of register-based params to pass to algorithm |
reg_params | memory-based params to pass to algorithm |
buffer_start | address on the target of the circular buffer structure |
buffer_size | size of the circular buffer structure |
entry_point | address on the target to execute to start the algorithm |
exit_point | address at which to set a breakpoint to catch the end of the algorithm; can be 0 if target triggers a breakpoint itself |
Definition at line 952 of file target/target.c.
References alive_sleep(), buffer, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, keep_alive(), LOG_DEBUG, LOG_ERROR, target_read_u32(), target_start_algorithm(), target_wait_algorithm(), target_write_buffer(), and target_write_u32().
Referenced by aducm360_write_block_async(), bluenrgx_write(), efm32x_write_block(), kinetis_ke_write_words(), kinetis_write_block(), lpcspifi_write(), max32xxx_write_block(), mdr_write_block(), mrvlqspi_flash_write(), niietcm4_write_block(), nrf5_ll_flash_write(), qspi_read_write_block(), sim3x_write_block(), stellaris_write_block(), stm32l4_write_block(), stm32x_write_block(), and target_set_examined().
int target_run_read_async_algorithm | ( | struct target * | target, |
uint8_t * | buffer, | ||
uint32_t | count, | ||
int | block_size, | ||
int | num_mem_params, | ||
struct mem_param * | mem_params, | ||
int | num_reg_params, | ||
struct reg_param * | reg_params, | ||
uint32_t | buffer_start, | ||
uint32_t | buffer_size, | ||
uint32_t | entry_point, | ||
uint32_t | exit_point, | ||
void * | arch_info | ||
) |
This routine is a wrapper for asynchronous algorithms.
Definition at line 1105 of file target/target.c.
References alive_sleep(), buffer, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, keep_alive(), LOG_DEBUG, LOG_ERROR, target_read_buffer(), target_read_u32(), target_start_algorithm(), target_wait_algorithm(), and target_write_u32().
Referenced by qspi_read_write_block(), and target_set_examined().
|
static |
Definition at line 783 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_type::soft_reset_halt, target_name(), target_was_examined(), and target::type.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 1917 of file target/target.c.
References working_area::address, working_area::backup, working_area::free, working_area::next, NULL, size, working_area::size, and working_area::user.
Referenced by target_alloc_working_area_try().
int target_start_algorithm | ( | struct target * | target, |
int | num_mem_params, | ||
struct mem_param * | mem_params, | ||
int | num_reg_params, | ||
struct reg_param * | reg_params, | ||
uint32_t | entry_point, | ||
uint32_t | exit_point, | ||
void * | arch_info | ||
) |
Executes a target-specific native code algorithm and leaves it running.
Starts an algorithm in the background on the target given.
target | used to run the algorithm |
arch_info | target-specific description of the algorithm. |
Definition at line 843 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target::running_alg, target_type::start_algorithm, target_type_name(), target_was_examined(), and target::type.
Referenced by cc26xx_init(), msp432_init(), sromalgo_prepare(), target_run_flash_async_algorithm(), target_run_read_async_algorithm(), and target_set_examined().
const char* target_state_name | ( | struct target * | t | ) |
Return the name of this targets current state.
Definition at line 291 of file target/target.c.
References target::defer_examine, Jim_Nvp_value2name_simple(), LOG_ERROR, Jim_Nvp::name, target::state, and target_was_examined().
Referenced by adapter_debug_entry(), arc_arch_state(), arc_assert_reset(), arc_deassert_reset(), arc_halt(), arm11_halt(), arm11_resume(), arm11_step(), arm7_9_assert_reset(), arm7_9_deassert_reset(), arm7_9_halt(), avr32_ap7k_halt(), COMMAND_HANDLER(), cortex_m_assert_reset(), cortex_m_deassert_reset(), cortex_m_debug_entry(), cortex_m_halt(), dsp563xx_poll(), gdb_connection_closed(), gdb_new_connection(), jim_target_current_state(), mips_m4k_assert_reset(), mips_m4k_deassert_reset(), mips_m4k_debug_entry(), mips_m4k_halt(), mips_mips64_assert_reset(), mips_mips64_deassert_reset(), mips_mips64_debug_entry(), mips_mips64_halt(), nds32_halt(), nds32_resume(), nds32_step(), or1k_halt(), stm8_debug_entry(), stm8_halt(), target_set_examined(), tcl_target_callback_event_handler(), xscale_assert_reset(), and xscale_halt().
int target_step | ( | struct target * | target, |
int | current, | ||
target_addr_t | address, | ||
int | handle_breakpoints | ||
) |
Step the target.
This routine is a wrapper for target->type->step.
Definition at line 1428 of file target/target.c.
References ERROR_OK, target_type::step, target_call_event_callbacks(), TARGET_EVENT_STEP_END, TARGET_EVENT_STEP_START, and target::type.
Referenced by COMMAND_HANDLER(), gdb_fileio_response_packet(), gdb_handle_vcont_packet(), gdb_step_continue_packet(), and target_set_examined().
|
static |
Definition at line 186 of file target/target.c.
References Jim_Nvp_value2name_simple(), Jim_Nvp::name, and NULL.
Referenced by jim_target_wait_state().
Check if target allows GDB connections.
Some target do not implement the necessary code required by GDB.
Definition at line 1419 of file target/target.c.
References target::gdb_max_connections, target_type::get_gdb_reg_list, and target::type.
Referenced by gdb_target_add_one(), and target_set_examined().
|
static |
Definition at line 1832 of file target/target.c.
References ERROR_OK, target_timer_callback::time_ms, timeval_add_time(), and target_timer_callback::when.
Referenced by target_call_timer_callback().
const char* target_type_name | ( | struct target * | target | ) |
Get the target type name.
This routine is a wrapper for the target->type->name field. Note that this is not an instance-specific name for his target.
Definition at line 778 of file target/target.c.
References target_type::name, and target::type.
Referenced by arm_default_mcr(), arm_default_mrc(), cfi_spansion_write_block(), COMMAND_HANDLER(), embeddedice_build_reg_cache(), target_configure(), target_handle_event(), target_run_algorithm(), target_start_algorithm(), and target_wait_algorithm().
int target_unregister_event_callback | ( | int(*)(struct target *target, enum target_event event, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1707 of file target/target.c.
References target_event_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, target_event_callback::next, NULL, target_event_callback::priv, and target_event_callbacks.
Referenced by gdb_connection_closed(), and tcl_closed().
int target_unregister_reset_callback | ( | int(*)(struct target *target, enum target_reset_mode reset_mode, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1730 of file target/target.c.
References target_reset_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, target_reset_callback::list, list_del(), list_for_each_entry, NULL, and target_reset_callback::priv.
Referenced by tcl_closed().
int target_unregister_timer_callback | ( | int(*)(void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1768 of file target/target.c.
References target_trace_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, target_timer_callback::next, and NULL.
Referenced by armv7m_trace_tpiu_config(), jsp_connection_closed(), read_channel_callback(), rtt_set_polling_interval(), rtt_stop(), and target_call_timer_callback().
int target_unregister_trace_callback | ( | int(*)(struct target *target, size_t len, uint8_t *data, void *priv) | callback, |
void * | priv | ||
) |
Definition at line 1749 of file target/target.c.
References target_trace_callback::callback, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, target_trace_callback::list, list_del(), list_for_each_entry, NULL, and target_trace_callback::priv.
Referenced by tcl_closed().
int target_wait_algorithm | ( | struct target * | target, |
int | num_mem_params, | ||
struct mem_param * | mem_params, | ||
int | num_reg_params, | ||
struct reg_param * | reg_params, | ||
uint32_t | exit_point, | ||
int | timeout_ms, | ||
void * | arch_info | ||
) |
Waits for an algorithm started with target_start_algorithm() to complete.
Wait for an algorithm on the target given.
target | used to run the algorithm |
arch_info | target-specific description of the algorithm. |
Definition at line 881 of file target/target.c.
References ERROR_FAIL, ERROR_TARGET_TIMEOUT, LOG_ERROR, target::running_alg, target_type_name(), target::type, and target_type::wait_algorithm.
Referenced by cc26xx_quit(), msp432_quit(), sromalgo_release(), target_run_flash_async_algorithm(), target_run_read_async_algorithm(), and target_set_examined().
int target_wait_state | ( | struct target * | target, |
enum target_state | state, | ||
int | ms | ||
) |
Definition at line 3194 of file target/target.c.
References ERROR_FAIL, ERROR_OK, Jim_Nvp_value2name_simple(), keep_alive(), LOG_DEBUG, LOG_ERROR, name, target::state, target_poll(), and timeval_ms().
Referenced by arm7_9_dcc_completion(), armv4_5_run_algorithm_completion(), armv7m_wait_algorithm(), COMMAND_HANDLER(), dsp563xx_run_algorithm(), feroceon_bulk_write_memory(), handle_reset_halt(), jim_target_wait_state(), mips32_run_and_wait(), stm8_run_and_wait(), and target_set_examined().
int target_write_buffer | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
const uint8_t * | buffer | ||
) |
Definition at line 2346 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_was_examined(), target::type, and target_type::write_buffer.
Referenced by aduc702x_write_block(), aducm360_write_block_async(), aducm360_write_block_sync(), ambiqmicro_write_block(), arc_unset_breakpoint(), arc_write_instruction_u32(), arm_nandwrite(), armv4_5_run_algorithm_inner(), armv7m_blank_check_memory(), armv7m_checksum_memory(), armv7m_start_algorithm(), bluenrgx_write(), cc26xx_erase(), cc26xx_init(), cc26xx_mass_erase(), cc26xx_write(), cc3220sf_write(), cfi_intel_write_block(), cfi_spansion_write_block(), cfi_spansion_write_block_mips(), COMMAND_HANDLER(), dsp563xx_run_algorithm(), efm32x_write_block(), em357_write_block(), esirisc_flash_fill_pb(), fespi_write(), fm3_chip_erase(), fm3_erase(), fm3_write_block(), fm4_flash_erase(), fm4_flash_write(), gdb_write_memory_binary_packet(), gdb_write_memory_packet(), imx31_write_page(), jim_nds32_bulk_write(), jim_nds32_multi_write(), kinetis_disable_wdog_algo(), kinetis_ke_stop_watchdog(), kinetis_ke_write_words(), kinetis_write_block(), lpc2000_write(), lpc288x_write(), lpc2900_write(), lpcspifi_erase(), lpcspifi_set_hw_mode(), lpcspifi_write(), max32xxx_write(), max32xxx_write_block(), mdr_write_block(), mips32_blank_check_memory(), mips32_checksum_memory(), mips32_run_algorithm(), mrvlqspi_flash_write(), msp432_exec_cmd(), msp432_init(), msp432_write(), mxc_write_page(), niietcm4_write_block(), nrf5_ll_flash_write(), numicro_writeblock(), pic32mx_write_block(), psoc4_sysreq(), psoc5lp_write(), psoc6_program_row(), qspi_read_write_block(), qspi_verify(), semihosting_common(), sh_qspi_upload_helper(), sh_qspi_write(), sim3x_write_block(), smi_write_buffer(), stellaris_write(), stellaris_write_block(), steps_execute(), stm32l4_write_block(), stm32lx_write(), stm32lx_write_half_pages(), stm32x_write(), stm32x_write_block(), stm8_blank_check_memory(), stm8_run_algorithm(), stmqspi_blank_check(), str7x_write_block(), str9x_write_block(), target_run_flash_async_algorithm(), target_set_examined(), w600_write(), write_to_channel(), xmc1xxx_erase(), xmc1xxx_erase_check(), and xmc1xxx_write().
|
static |
Definition at line 2370 of file target/target.c.
References ERROR_OK, size, and target_write_memory().
Referenced by target_init_one().
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.
address must be aligned to size in target memory.
The endianness is the same in the host and target memory for this function.
This is not enforced via e.g. assert's today and e.g. the target_write_buffer fn breaks this assumption.
This routine is wrapper for target->type->write_memory.
Definition at line 1283 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_name(), target_was_examined(), target::type, and target_type::write_memory.
Referenced by aarch64_set_breakpoint(), aarch64_unset_breakpoint(), arm7_9_unset_breakpoint(), arm_code_to_working_area(), at91sam7_write(), cfi_target_write_memory(), COMMAND_HANDLER(), cortex_a_set_breakpoint(), cortex_a_unset_breakpoint(), cortex_a_write_buffer(), cortex_m_set_breakpoint(), cortex_m_unset_breakpoint(), kinetis_ftfx_command(), kinetis_write_sections(), lpc2000_iap_working_area_init(), lpc2900_write(), lpc2900_write_index_page(), lpc3180_write_page(), lpc32xx_read_page_slc(), lpc32xx_write_page_mlc(), lpc32xx_write_page_slc(), mips_m4k_set_breakpoint(), mips_m4k_unset_breakpoint(), mips_mips16_unset_sdbbp(), mips_mips64_unset_sdbbp(), nrf5_ll_flash_write(), numicro_write(), riscv_add_breakpoint(), riscv_remove_breakpoint(), rpc_hf_xfer(), sam3_page_write(), sam4_page_write(), sam4l_write_page(), samd_modify_user_row_masked(), samd_write(), same5_modify_user_row_masked(), same5_write(), samv_page_write(), semihosting_common(), semihosting_write_fields(), stm8_unset_breakpoint(), str7x_write(), str9x_write(), swm050_write(), target_array2mem(), target_restore_working_area(), target_set_examined(), target_write_buffer_default(), target_write_u16(), target_write_u32(), target_write_u64(), target_write_u8(), xmc1xxx_write(), and xscale_unset_breakpoint().
int target_write_phys_memory | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | size, | ||
uint32_t | count, | ||
const uint8_t * | buffer | ||
) |
Definition at line 1297 of file target/target.c.
References ERROR_FAIL, LOG_ERROR, target_name(), target_was_examined(), target::type, and target_type::write_phys_memory.
Referenced by COMMAND_HANDLER(), target_array2mem(), target_set_examined(), target_write_phys_u16(), target_write_phys_u32(), target_write_phys_u64(), and target_write_phys_u8().
int target_write_phys_u16 | ( | struct target * | target, |
target_addr_t | address, | ||
uint16_t | value | ||
) |
Definition at line 2737 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u16(), target_was_examined(), and target_write_phys_memory().
Referenced by target_set_examined().
int target_write_phys_u32 | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | value | ||
) |
Definition at line 2716 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u32(), target_was_examined(), and target_write_phys_memory().
Referenced by arm7a_l2x_flush_all_data(), armv7a_l2x_cache_clean_virt(), armv7a_l2x_cache_flush_virt(), armv7a_l2x_cache_inval_virt(), and target_set_examined().
int target_write_phys_u64 | ( | struct target * | target, |
target_addr_t | address, | ||
uint64_t | value | ||
) |
Definition at line 2695 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u64(), target_was_examined(), and target_write_phys_memory().
Referenced by target_set_examined().
int target_write_phys_u8 | ( | struct target * | target, |
target_addr_t | address, | ||
uint8_t | value | ||
) |
Definition at line 2758 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_was_examined(), and target_write_phys_memory().
Referenced by target_set_examined().
int target_write_u16 | ( | struct target * | target, |
target_addr_t | address, | ||
uint16_t | value | ||
) |
Definition at line 2656 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u16(), target_was_examined(), and target_write_memory().
Referenced by aduc702x_erase(), aduc702x_set_write_enable(), aduc702x_write_single(), arc_set_breakpoint(), arm7_9_set_breakpoint(), do_data_output(), em357_write(), em357_write_options(), imx31_address(), imx31_command(), imx31_write_page(), initialize_nf_controller(), mips_m4k_set_breakpoint(), mips_mips16_set_sdbbp(), mxc_address(), mxc_command(), mxc_read_page(), mxc_write_page(), s3c24xx_address(), s3c24xx_command(), samd_check_error(), samd_issue_nvmctrl_command(), same5_wait_and_check_error(), sh_qspi_cs_activate(), sh_qspi_init(), stm32x_write(), str9x_erase(), str9x_protect(), str9x_protect_check(), str9x_write(), target_set_examined(), tms470_erase_sector(), tms470_write(), xmc1xxx_nvm_set_idle(), and xscale_set_breakpoint().
int target_write_u32 | ( | struct target * | target, |
target_addr_t | address, | ||
uint32_t | value | ||
) |
Definition at line 2635 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u32(), target_was_examined(), and target_write_memory().
Referenced by adapter_resume(), adapter_step(), aducm360_mass_erase(), aducm360_page_erase(), aducm360_set_write_enable(), aducm360_write_modified(), ambiqmicro_erase(), ambiqmicro_mass_erase(), ambiqmicro_otp_program(), ambiqmicro_write_block(), arm7_9_set_breakpoint(), arm_blank_check_memory(), arm_checksum_memory(), arm_simulate_step_core(), armv7m_trace_itm_config(), armv7m_trace_tpiu_config(), at91sam7_flash_command(), at91sam7_set_flash_mode(), at91sam9_disable(), at91sam9_ecc_init(), at91sam9_enable(), bluenrgx_erase(), bluenrgx_write_flash_reg(), call_sromapi(), cc3220sf_erase(), cc3220sf_mass_erase(), clrsetbits_u32(), COMMAND_HANDLER(), cortex_m_dwt_set_reg(), cortex_m_dwt_setup(), cortex_m_enable_fpb(), cortex_m_endreset_event(), cortex_m_examine(), cortex_m_set_breakpoint(), cortex_m_set_watchpoint(), cortex_m_unset_breakpoint(), cortex_m_unset_watchpoint(), davinci_write_block_data(), davinci_write_page_ecc1(), davinci_write_page_ecc4(), davinci_write_page_ecc4infix(), EFC_StartCommand(), efm32x_write_reg_u32(), em357_erase(), em357_erase_options(), em357_mass_erase(), em357_probe(), em357_wait_status_busy(), em357_write(), em357_write_block(), em357_write_options(), esirisc_flash_clear_status(), esirisc_flash_control(), esirisc_flash_disable_protect(), esirisc_flash_enable_protect(), esirisc_flash_erase(), esirisc_flash_fill_pb(), esirisc_flash_init(), esirisc_flash_mass_erase(), esirisc_flash_unlock(), esirisc_flash_write(), fespi_write_reg(), find_sfdp_dummy(), fm3_chip_erase(), fm3_erase(), fm3_write_block(), fm4_disable_hw_watchdog(), fm4_enter_flash_cpu_programming_mode(), fm4_enter_flash_cpu_rom_mode(), imx31_init(), io_write_reg(), ioconfig_write_reg(), ipc_acquire(), kinetis_check_run_mode(), kinetis_invalidate_flash_cache(), kinetis_ke_prepare_flash(), lpc288x_erase(), lpc288x_load_timer(), lpc288x_protect(), lpc288x_set_flash_clk(), lpc288x_write(), lpc2900_erase(), lpc2900_read_security_status(), lpc2900_run_bist128(), lpc2900_setup(), lpc2900_write(), lpc2900_write_index_page(), lpc3180_address(), lpc3180_command(), lpc3180_init(), lpc3180_read_page(), lpc3180_reset(), lpc3180_write_data(), lpc3180_write_page(), lpc32xx_address(), lpc32xx_command(), lpc32xx_init(), lpc32xx_read_page_mlc(), lpc32xx_read_page_slc(), lpc32xx_reset(), lpc32xx_start_slc_dma(), lpc32xx_write_data(), lpc32xx_write_page_mlc(), lpc32xx_write_page_slc(), max32xxx_erase(), max32xxx_flash_op_post(), max32xxx_flash_op_pre(), max32xxx_mass_erase(), max32xxx_protect(), max32xxx_write(), mdr_erase(), mdr_mass_erase(), mdr_read(), mdr_write(), mips32_configure_dbs(), mips32_configure_ibs(), mips32_enable_interrupts(), mips_m4k_examine_debug_reason(), mips_m4k_set_breakpoint(), mips_m4k_set_watchpoint(), mips_m4k_unset_breakpoint(), mips_m4k_unset_watchpoint(), mips_mips64_set_sdbbp(), mrvlqspi_fifo_flush(), mrvlqspi_set_addr(), mrvlqspi_set_conf(), mrvlqspi_set_din_cnt(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_set_ss_state(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), msp432_exec_cmd(), msp432_write(), mxc_init(), niietcm4_dump_uflash_page(), niietcm4_erase(), niietcm4_load_uflash_page(), niietcm4_mass_erase(), niietcm4_opstatus_check(), niietcm4_probe_k1921vk01t(), niietcm4_protect_check(), niietcm4_uflash_page_erase(), niietcm4_uopstatus_check(), niietcm4_write(), nrf5_nvmc_erase_enable(), nrf5_nvmc_generic_erase(), nrf5_nvmc_read_only(), nrf5_nvmc_write_enable(), nrf5_protect_clenr0(), nuc910_nand_address(), nuc910_nand_init(), numicro_erase(), numicro_fmc_cmd(), numicro_init_isp(), numicro_reg_unlock(), numicro_write(), pic32mx_erase(), pic32mx_nvm_exec(), pic32mx_write_word(), poll_busy(), psoc4_sysreq(), psoc5lp_eeprom_probe(), psoc5lp_write(), psoc6_erase_row(), psoc6_erase_sector(), psoc6_program_row(), qspi_erase_sector(), qspi_write_enable(), read_flash_id(), read_from_channel(), read_sfdp_block(), read_status_reg(), rpc_hf_mode(), rpc_hf_xfer(), s3c2410_init(), s3c2410_write_data(), s3c2412_init(), s3c2440_init(), s3c2440_write_block_data(), s3c2443_init(), s3c24xx_reset(), s3c6400_init(), sam3_page_write(), sam4_set_wait(), sam4l_flash_command(), samd_erase_row(), samd_protect(), same5_erase_block(), same5_issue_nvmctrl_command(), same5_protect(), samv_efc_start_command(), set_mm_mode(), sh_qspi_xfer_common(), sim3x_erase_page(), sim3x_flash_erase(), sim3x_init(), sromalgo_prepare(), ssp_write_reg(), stellaris_erase(), stellaris_mass_erase(), stellaris_protect(), stellaris_set_flash_timing(), stellaris_write(), stm32l4_write_flash_reg(), stm32lx_enable_write_half_page(), stm32lx_erase_sector(), stm32lx_lock(), stm32lx_lock_program_memory(), stm32lx_mass_erase(), stm32lx_obl_launch(), stm32lx_unlock(), stm32lx_unlock_options_bytes(), stm32lx_unlock_program_memory(), stm32lx_wait_until_bsy_clear_timeout(), stm32x_erase(), stm32x_erase_options(), stm32x_mass_erase(), stm32x_unlock_option_reg(), stm32x_unlock_reg(), stm32x_wait_status_busy(), stm32x_write(), stm32x_write_block(), stm32x_write_flash_reg(), stm32x_write_options(), stmqspi_blank_check(), stmqspi_probe(), stmqspi_read(), stmqspi_verify(), stmqspi_write(), str7x_erase(), str7x_protect(), str7x_write(), swm050_erase(), swm050_mass_erase(), swm050_write(), target_run_flash_async_algorithm(), target_run_read_async_algorithm(), target_set_examined(), tms470_erase_check(), tms470_erase_sector(), tms470_flash_initialize_internal_state_machine(), tms470_protect(), tms470_protect_check(), tms470_read_part_info(), tms470_try_flash_keys(), tms470_write(), w600_start_do(), write_to_channel(), xmc4xxx_clear_flash_status(), xmc4xxx_enter_page_mode(), xmc4xxx_write_command_sequence(), xmc4xxx_write_page(), and xscale_set_breakpoint().
int target_write_u64 | ( | struct target * | target, |
target_addr_t | address, | ||
uint64_t | value | ||
) |
Definition at line 2614 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_buffer_set_u64(), target_was_examined(), and target_write_memory().
Referenced by mips64_configure_d_break_unit(), mips64_configure_i_break_unit(), mips64_enable_interrupts(), mips_mips64_set_hwbp(), mips_mips64_set_watchpoint(), mips_mips64_unset_hwbp(), mips_mips64_unset_watchpoint(), and target_set_examined().
int target_write_u8 | ( | struct target * | target, |
target_addr_t | address, | ||
uint8_t | value | ||
) |
Definition at line 2677 of file target/target.c.
References ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, target_was_examined(), and target_write_memory().
Referenced by aduc702x_erase(), aduc702x_write_single(), at91sam9_address(), at91sam9_command(), at91sam9_write_data(), COMMAND_HANDLER(), davinci_address(), davinci_command(), davinci_seek_column(), davinci_write_block_data(), davinci_write_data(), davinci_write_pagecmd(), davinci_writepage_tail(), kinetis_check_run_mode(), kinetis_disable_wdog(), kinetis_ftfx_clear_error(), kinetis_ftfx_command(), kinetis_invalidate_flash_cache(), kinetis_ke_ftmrx_command(), kinetis_ke_prepare_flash(), kinetis_write_block(), nuc910_nand_command(), nuc910_nand_write(), orion_nand_address(), orion_nand_command(), orion_nand_write(), psoc5lp_nvl_write(), psoc5lp_spc_enable_clock(), psoc5lp_spc_erase_sector(), psoc5lp_spc_get_temp(), psoc5lp_spc_load_byte(), psoc5lp_spc_load_row(), psoc5lp_spc_read_byte(), psoc5lp_spc_read_hidden_row(), psoc5lp_spc_read_volatile_byte(), psoc5lp_spc_write_opcode(), psoc5lp_spc_write_row(), psoc5lp_spc_write_user_nvl(), s3c2440_write_block_data(), s3c24xx_write_data(), sh_qspi_cs_activate(), sh_qspi_cs_deactivate(), sh_qspi_init(), sh_qspi_xfer_common(), stm32x_otp_protect(), stm32x_write(), stm8_set_breakpoint(), and target_set_examined().
|
static |
Definition at line 4144 of file target/target.c.
References NULL, writeData(), writeLong(), and writeString().
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 4121 of file target/target.c.
References LOG_ERROR.
Referenced by write_gmon(), writeLong(), and writeString().
|
static |
Definition at line 4128 of file target/target.c.
References target_buffer_set_u32(), and writeData().
Referenced by write_gmon().
|
static |
Definition at line 4136 of file target/target.c.
References writeData().
Referenced by write_gmon().
struct target_type aarch64_target |
struct target* all_targets |
Definition at line 154 of file target/target.c.
Referenced by aice_init_targets(), aice_scan_jtag_chain(), append_to_list_all_targets(), COMMAND_HANDLER(), delete_debug_msg_receiver(), find_debug_msg_receiver(), gdb_new_connection(), get_target_by_num(), jim_target_names(), new_target_number(), and target_set_examined().
struct target_type arcv2_target |
struct target_type arm11_target |
struct target_type arm720t_target |
struct target_type arm7tdmi_target |
Holds methods for ARM7TDMI targets.
Definition at line 695 of file arm7tdmi.c.
struct target_type arm920t_target |
struct target_type arm926ejs_target |
Holds methods for ARM926 targets.
Definition at line 801 of file arm926ejs.c.
struct target_type arm946e_target |
struct target_type arm966e_target |
struct target_type arm9tdmi_target |
Holds methods for ARM9TDMI targets.
Definition at line 899 of file arm9tdmi.c.
struct target_type avr32_ap7k_target |
Definition at line 592 of file avr32_ap7k.c.
struct target_type avr_target |
struct target_type cortexa_target |
Definition at line 3144 of file cortex_a.c.
struct target_type cortexm_target |
Definition at line 2499 of file cortex_m.c.
struct target_type cortexr4_target |
Definition at line 3225 of file cortex_a.c.
struct target_type dragonite_target |
Definition at line 741 of file feroceon.c.
struct target_type dsp563xx_target |
Holds methods for DSP563XX targets.
Definition at line 2252 of file dsp563xx.c.
struct target_type dsp5680xx_target |
Holds methods for dsp5680xx targets.
Definition at line 2277 of file dsp5680xx.c.
struct target_type esirisc_target |
struct target_type fa526_target |
|
static |
Definition at line 6009 of file target/target.c.
|
static |
Definition at line 6008 of file target/target.c.
Referenced by COMMAND_HANDLER(), and free_fastload().
struct target_type feroceon_target |
Definition at line 702 of file feroceon.c.
struct target_type hla_target |
Definition at line 636 of file hla_target.c.
struct target_type ls1_sap_target |
struct target_type mem_ap_target |
struct target_type mips_m4k_target |
Definition at line 1393 of file mips_m4k.c.
struct target_type mips_mips64_target |
Definition at line 1158 of file mips_mips64.c.
struct target_type nds32_v2_target |
Holds methods for V2 targets.
Definition at line 740 of file nds32_v2.c.
struct target_type nds32_v3_target |
Holds methods for Andes1337 targets.
Definition at line 471 of file nds32_v3.c.
struct target_type nds32_v3m_target |
Holds methods for NDS32 V3m targets.
Definition at line 458 of file nds32_v3m.c.
|
static |
Definition at line 161 of file target/target.c.
|
static |
Definition at line 4812 of file target/target.c.
|
static |
Definition at line 171 of file target/target.c.
|
static |
Definition at line 270 of file target/target.c.
|
static |
Definition at line 249 of file target/target.c.
|
static |
Definition at line 262 of file target/target.c.
|
static |
Definition at line 197 of file target/target.c.
|
static |
Definition at line 240 of file target/target.c.
struct target_type or1k_target |
|
static |
Definition at line 159 of file target/target.c.
Referenced by handle_target(), and target_init().
|
static |
Definition at line 2843 of file target/target.c.
Referenced by readPowerDropout(), and sense_handler().
struct target_type quark_d20xx_target |
Definition at line 90 of file quark_d20xx.c.
struct target_type quark_x10xx_target |
Definition at line 68 of file quark_x10xx.c.
struct target_type riscv_target |
|
static |
Definition at line 2847 of file target/target.c.
|
static |
Definition at line 2846 of file target/target.c.
|
static |
Definition at line 2848 of file target/target.c.
|
static |
Definition at line 2849 of file target/target.c.
|
static |
Definition at line 2844 of file target/target.c.
Referenced by readSRST(), sense_handler(), and waitSRST().
struct target_type stm8_target |
Definition at line 2173 of file stm8.c.
Referenced by stm8_get_core_reg().
|
static |
Definition at line 6152 of file target/target.c.
|
static |
Definition at line 155 of file target/target.c.
Referenced by target_call_event_callbacks(), target_quit(), target_register_event_callback(), and target_unregister_event_callback().
|
static |
Definition at line 6403 of file target/target.c.
|
static |
Definition at line 5438 of file target/target.c.
Referenced by target_create().
Definition at line 6176 of file target/target.c.
Referenced by get_target_reset_nag().
|
static |
Definition at line 5956 of file target/target.c.
|
static |
Definition at line 156 of file target/target.c.
Referenced by target_call_timer_callbacks_check_time(), target_quit(), and target_register_timer_callback().
|
static |
Definition at line 114 of file target/target.c.
struct target_type testee_target |
struct target_type xscale_target |