OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | stm8_algorithm |
struct | stm8_comparator |
struct | stm8_core_reg |
Macros | |
#define | BK1F 0x02 |
#define | BK2F 0x04 |
#define | BRW 0x08 |
#define | CC_I0 0x8 |
#define | CC_I1 0x20 |
#define | DM_BKR1E 0x7f90 |
#define | DM_BKR2E 0x7f93 |
#define | DM_CR1 0x7f96 |
#define | DM_CR2 0x7f97 |
#define | DM_CSR1 0x7f98 |
#define | DM_CSR2 0x7f99 |
#define | DM_REG_A 0x7f00 |
#define | DM_REG_CC 0x7f0a |
#define | DM_REG_PC 0x7f01 |
#define | DM_REG_SP 0x7f08 |
#define | DM_REG_X 0x7f04 |
#define | DM_REG_Y 0x7f06 |
#define | DM_REGS 0x7f00 |
#define | DUL 0x08 |
#define | EOP 0x04 |
#define | ERASE 0x20 |
#define | FLASH_CR1_STM8L 0x5050 |
#define | FLASH_CR1_STM8S 0x505A |
#define | FLASH_CR2_STM8L 0x5051 |
#define | FLASH_CR2_STM8S 0x505B |
#define | FLASH_DUKR_STM8L 0x5053 |
#define | FLASH_DUKR_STM8S 0x5064 |
#define | FLASH_IAPSR_STM8L 0x5054 |
#define | FLASH_IAPSR_STM8S 0x505F |
#define | FLASH_NCR2_STM8L 0 |
#define | FLASH_NCR2_STM8S 0x505C |
#define | FLASH_PUKR_STM8L 0x5052 |
#define | FLASH_PUKR_STM8S 0x5062 |
#define | FLUSH 0x01 |
#define | FPRG 0x10 |
#define | HS 0x10 |
#define | HSIT 0x02 |
#define | HVOFF 0x40 |
#define | NO_ACCESS 0x40 |
#define | OPT 0x80 |
#define | OSCOFF 0x08 |
#define | PRG 0x01 |
#define | PRI 0x01 |
#define | PUL 0x02 |
#define | RST 0x10 |
#define | SAFE_MASK 0x80 |
#define | STALL 0x08 |
#define | STE 0x40 |
#define | STF 0x20 |
#define | STM8_A 1 |
#define | STM8_BREAK 0x8B |
#define | STM8_CC 5 |
#define | STM8_NUM_REGS ARRAY_SIZE(stm8_regs) |
#define | STM8_PC 0 |
#define | STM8_SP 4 |
#define | STM8_X 2 |
#define | STM8_Y 3 |
#define | SWBKF 0x10 |
#define | SWBRK 0x20 |
#define | SWIM_CSR 0x7f80 |
#define | SWIM_DM 0x20 |
#define | SWIM_RST 0x04 |
#define | WPRG 0x40 |
#define | WR_PG_DIS 0x01 |
Enumerations | |
enum | hw_break_type { HWBRK_EXEC , HWBRK_RD , HWBRK_WR , HWBRK_ACC } |
enum | mem_type { RAM , FLASH , EEPROM , OPTION } |
Functions | |
COMMAND_HANDLER (stm8_handle_enable_step_irq_command) | |
COMMAND_HANDLER (stm8_handle_enable_stm8l_command) | |
static int | stm8_adapter_read_memory (struct target *target, uint32_t addr, int size, int count, void *buf) |
static int | stm8_adapter_write_memory (struct target *target, uint32_t addr, int size, int count, const void *buf) |
static int | stm8_add_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | stm8_add_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | stm8_arch_state (struct target *target) |
static int | stm8_blank_check_memory (struct target *target, struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value) |
Checks whether a memory region is erased. More... | |
static struct reg_cache * | stm8_build_reg_cache (struct target *target) |
static int | stm8_checksum_memory (struct target *target, target_addr_t address, uint32_t count, uint32_t *checksum) |
static int | stm8_config_step (struct target *target, int enable) |
static int | stm8_configure_break_unit (struct target *target) |
static int | stm8_debug_entry (struct target *target) |
static int | stm8_debug_stall (struct target *target) |
static void | stm8_deinit (struct target *target) |
static void | stm8_enable_breakpoints (struct target *target) |
static int | stm8_enable_interrupts (struct target *target, int enable) |
static void | stm8_enable_watchpoints (struct target *target) |
static int | stm8_examine (struct target *target) |
static int | stm8_examine_debug_reason (struct target *target) |
static int | stm8_exit_debug (struct target *target) |
static void | stm8_free_reg_cache (struct target *target) |
static int | stm8_get_core_reg (struct reg *reg) |
static const char * | stm8_get_gdb_arch (const struct target *target) |
static int | stm8_get_gdb_reg_list (struct target *target, struct reg **reg_list[], int *reg_list_size, enum target_register_class reg_class) |
static int | stm8_halt (struct target *target) |
static int | stm8_init (struct command_context *cmd_ctx, struct target *target) |
static int | stm8_init_arch_info (struct target *target, struct stm8_common *stm8, struct jtag_tap *tap) |
static int | stm8_init_flash_regs (bool enable_stm8l, struct stm8_common *stm8) |
static int | stm8_jim_configure (struct target *target, struct jim_getopt_info *goi) |
static int | stm8_poll (struct target *target) |
static int | stm8_read_core_reg (struct target *target, unsigned int num) |
static int | stm8_read_dm_csrx (struct target *target, uint8_t *csr1, uint8_t *csr2) |
static int | stm8_read_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | stm8_read_regs (struct target *target, uint32_t regs[]) |
static int | stm8_read_u8 (struct target *target, uint32_t addr, uint8_t *val) |
static int | stm8_remove_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | stm8_remove_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | stm8_reset_assert (struct target *target) |
static int | stm8_reset_deassert (struct target *target) |
static int | stm8_restore_context (struct target *target) |
static int | stm8_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution) |
static int | stm8_run_algorithm (struct target *target, int num_mem_params, struct mem_param *mem_params, int num_reg_params, struct reg_param *reg_params, target_addr_t entry_point, target_addr_t exit_point, unsigned int timeout_ms, void *arch_info) |
static int | stm8_run_and_wait (struct target *target, uint32_t entry_point, unsigned int timeout_ms, uint32_t exit_point, struct stm8_common *stm8) |
static int | stm8_save_context (struct target *target) |
static int | stm8_set_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | stm8_set_core_reg (struct reg *reg, uint8_t *buf) |
static int | stm8_set_hwbreak (struct target *target, struct stm8_comparator comparator_list[]) |
static int | stm8_set_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | stm8_single_step_core (struct target *target) |
static int | stm8_speed (int speed) |
static int | stm8_step (struct target *target, int current, target_addr_t address, int handle_breakpoints) |
static int | stm8_target_create (struct target *target, Jim_Interp *interp) |
static int | stm8_unlock_eeprom (struct target *target) |
static int | stm8_unlock_flash (struct target *target) |
static int | stm8_unset_breakpoint (struct target *target, struct breakpoint *breakpoint) |
static int | stm8_unset_watchpoint (struct target *target, struct watchpoint *watchpoint) |
static int | stm8_write_core_reg (struct target *target, unsigned int num) |
static int | stm8_write_flash (struct target *target, enum mem_type type, uint32_t address, uint32_t size, uint32_t count, uint32_t blocksize_param, const uint8_t *buffer) |
static int | stm8_write_memory (struct target *target, target_addr_t address, uint32_t size, uint32_t count, const uint8_t *buffer) |
static int | stm8_write_regs (struct target *target, uint32_t regs[]) |
static int | stm8_write_u8 (struct target *target, uint32_t addr, uint8_t val) |
Variables | |
struct adapter_driver * | adapter_driver |
static int(* | adapter_speed )(int speed) |
static const struct command_registration | stm8_command_handlers [] |
static const struct command_registration | stm8_exec_command_handlers [] |
static const struct reg_arch_type | stm8_reg_type |
struct { | |
const uint8_t bits | |
const char * feature | |
int flag | |
const char * group | |
unsigned int id | |
const char * name | |
enum reg_type type | |
} | stm8_regs [] |
struct target_type | stm8_target |
#define STM8_NUM_REGS ARRAY_SIZE(stm8_regs) |
enum hw_break_type |
COMMAND_HANDLER | ( | stm8_handle_enable_step_irq_command | ) |
Definition at line 2098 of file stm8.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ENABLE, command_print(), stm8_common::enable_step_irq, ERROR_OK, get_current_target(), and target_to_stm8().
COMMAND_HANDLER | ( | stm8_handle_enable_stm8l_command | ) |
Definition at line 2114 of file stm8.c.
References CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_ENABLE, command_print(), stm8_common::enable_stm8l, ERROR_OK, get_current_target(), stm8_init_flash_regs(), and target_to_stm8().
|
static |
Definition at line 171 of file stm8.c.
References addr, count, size, and swim_read_mem().
Referenced by stm8_read_dm_csrx(), stm8_read_memory(), and stm8_read_regs().
|
static |
Definition at line 177 of file stm8.c.
References addr, count, size, and swim_write_mem().
Referenced by stm8_set_hwbreak(), stm8_write_flash(), stm8_write_memory(), and stm8_write_regs().
|
static |
Definition at line 1433 of file stm8.c.
References BKPT_HARD, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, stm8_common::num_hw_bpoints_avail, stm8_set_breakpoint(), target_to_stm8(), and breakpoint::type.
|
static |
Definition at line 1594 of file stm8.c.
References ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_INFO, stm8_common::num_hw_bpoints_avail, stm8_set_watchpoint(), and target_to_stm8().
|
static |
Definition at line 1284 of file stm8.c.
References buf_get_u32(), stm8_common::core_cache, debug_reason_name(), ERROR_OK, LOG_USER, reg_cache::reg_list, STM8_PC, target_to_stm8(), and reg::value.
|
static |
Checks whether a memory region is erased.
Definition at line 1717 of file stm8.c.
References working_area::address, buf_set_u32(), stm8_algorithm::common_magic, destroy_mem_param(), destroy_reg_param(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_mem_param(), init_reg_param(), LOG_ERROR, PARAM_IN_OUT, PARAM_OUT, target_memory_check_block::result, size, STM8_COMMON_MAGIC, target_alloc_working_area(), target_free_working_area(), target_run_algorithm(), target_write_buffer(), and reg_param::value.
Definition at line 1187 of file stm8.c.
References reg::arch_info, reg::caller_save, stm8_common::core_cache, reg::dirty, reg::exist, reg::feature, feature, reg::group, LOG_ERROR, reg::name, reg_cache::name, reg_cache::next, NULL, stm8_core_reg::num, reg_cache::num_regs, reg::number, target::reg_cache, reg::reg_data_type, reg_cache::reg_list, register_get_last_cache_p(), reg::size, STM8_NUM_REGS, stm8_reg_type, stm8_regs, target, stm8_core_reg::target, target_to_stm8(), reg_data_type::type, reg::type, reg::valid, and reg::value.
Referenced by stm8_init().
|
static |
Definition at line 1778 of file stm8.c.
References ERROR_TARGET_RESOURCE_NOT_AVAILABLE.
|
static |
Definition at line 366 of file stm8.c.
References DM_CSR1, ERROR_OK, STE, stm8_read_dm_csrx(), and stm8_write_u8().
Referenced by stm8_debug_entry(), stm8_single_step_core(), and stm8_step().
|
static |
Definition at line 401 of file stm8.c.
References stm8_common::bp_scanned, ERROR_OK, stm8_common::hw_break_list, LOG_DEBUG, stm8_common::num_hw_bpoints, stm8_common::num_hw_bpoints_avail, stm8_comparator::reg_address, and target_to_stm8().
Referenced by stm8_target_create().
|
static |
Definition at line 458 of file stm8.c.
References buf_get_u32(), stm8_common::core_cache, ERROR_OK, LOG_DEBUG, reg_cache::reg_list, stm8_config_step(), stm8_enable_interrupts(), stm8_examine_debug_reason(), STM8_PC, stm8_save_context(), target_state_name(), target_to_stm8(), and reg::value.
Referenced by stm8_poll(), stm8_single_step_core(), and stm8_step().
|
static |
Definition at line 386 of file stm8.c.
References DM_CSR2, ERROR_OK, STALL, stm8_read_dm_csrx(), and stm8_write_u8().
Referenced by stm8_halt().
|
static |
Definition at line 1273 of file stm8.c.
References stm8_common::hw_break_list, stm8_free_reg_cache(), and target_to_stm8().
|
static |
Definition at line 1356 of file stm8.c.
References target::breakpoints, breakpoint::is_set, breakpoint::next, and stm8_set_breakpoint().
Referenced by stm8_resume().
|
static |
Definition at line 210 of file stm8.c.
References stm8_common::cc, CC_I0, CC_I1, stm8_common::cc_valid, DM_REG_CC, ERROR_OK, stm8_read_u8(), stm8_write_u8(), and target_to_stm8().
Referenced by stm8_debug_entry(), stm8_resume(), stm8_single_step_core(), and stm8_step().
|
static |
Definition at line 1613 of file stm8.c.
References watchpoint::is_set, watchpoint::next, stm8_set_watchpoint(), and target::watchpoints.
Referenced by stm8_resume().
|
static |
Definition at line 1669 of file stm8.c.
References ERROR_FAIL, ERROR_OK, jtag_get_reset_config(), jtag_reset_config, LOG_ERROR, LOG_INFO, LOG_WARNING, RESET_CNCT_UNDER_SRST, RESET_SRST_NO_GATING, stm8_read_dm_csrx(), stm8_reset_deassert(), stm8_common::swim_configured, swim_reconnect(), target_set_examined(), target_to_stm8(), and target_was_examined().
|
static |
Definition at line 426 of file stm8.c.
References BK1F, BK2F, DBG_REASON_BREAKPOINT, DBG_REASON_DBGRQ, DBG_REASON_SINGLESTEP, DBG_REASON_UNDEFINED, target::debug_reason, ERROR_OK, LOG_DEBUG, RST, stm8_read_dm_csrx(), and SWBKF.
Referenced by stm8_debug_entry().
|
static |
Definition at line 481 of file stm8.c.
References DM_CSR2, ERROR_OK, FLUSH, STALL, stm8_read_dm_csrx(), stm8_write_u8(), and SWBRK.
Referenced by stm8_reset_deassert(), stm8_resume(), stm8_single_step_core(), and stm8_step().
|
static |
Definition at line 1246 of file stm8.c.
References reg::arch_info, stm8_common::core_cache, reg::feature, NULL, reg_cache::num_regs, reg::reg_data_type, reg_cache::reg_list, target_to_stm8(), and reg::value.
Referenced by stm8_deinit().
|
static |
Definition at line 540 of file stm8.c.
References reg::arch_info, ERROR_TARGET_NOT_HALTED, stm8_core_reg::num, stm8_common::read_core_reg, target::state, stm8_core_reg::target, TARGET_HALTED, and target_to_stm8().
|
static |
|
static |
Definition at line 1166 of file stm8.c.
References stm8_common::core_cache, ERROR_OK, reg_cache::reg_list, STM8_NUM_REGS, and target_to_stm8().
|
static |
Definition at line 872 of file stm8.c.
References DBG_REASON_DBGRQ, target::debug_reason, ERROR_OK, LOG_DEBUG, LOG_WARNING, target::state, stm8_debug_stall(), TARGET_HALTED, TARGET_RESET, target_state_name(), and TARGET_UNKNOWN.
|
static |
Definition at line 808 of file stm8.c.
References adapter_speed, ERROR_OK, adapter_driver::speed, stm8_build_reg_cache(), and stm8_speed().
|
static |
Definition at line 1084 of file stm8.c.
References target::arch_info, stm8_common::blocksize, stm8_common::bp_scanned, stm8_common::common_magic, stm8_common::eepromend, stm8_common::eepromstart, target::endianness, ERROR_OK, stm8_common::fast_data_area, stm8_common::flashend, stm8_common::flashstart, stm8_common::hw_break_list, NULL, stm8_common::optionend, stm8_common::optionstart, stm8_common::read_core_reg, STM8_COMMON_MAGIC, stm8_init_flash_regs(), stm8_read_core_reg(), stm8_write_core_reg(), TARGET_BIG_ENDIAN, and stm8_common::write_core_reg.
Referenced by stm8_target_create().
|
static |
Definition at line 1064 of file stm8.c.
References stm8_common::enable_stm8l, ERROR_OK, stm8_common::flash_cr2, FLASH_CR2_STM8L, FLASH_CR2_STM8S, stm8_common::flash_dukr, FLASH_DUKR_STM8L, FLASH_DUKR_STM8S, stm8_common::flash_iapsr, FLASH_IAPSR_STM8L, FLASH_IAPSR_STM8S, stm8_common::flash_ncr2, FLASH_NCR2_STM8L, FLASH_NCR2_STM8S, stm8_common::flash_pukr, FLASH_PUKR_STM8L, and FLASH_PUKR_STM8S.
Referenced by COMMAND_HANDLER(), stm8_init_arch_info(), and stm8_jim_configure().
|
static |
Definition at line 1935 of file stm8.c.
References jim_getopt_info::argc, jim_getopt_info::argv, stm8_common::blocksize, stm8_common::eepromend, stm8_common::eepromstart, stm8_common::enable_step_irq, stm8_common::enable_stm8l, stm8_common::flashend, stm8_common::flashstart, jim_getopt_info::interp, jim_getopt_string(), jim_getopt_wide(), LOG_DEBUG, NULL, stm8_common::optionend, stm8_common::optionstart, stm8_init_flash_regs(), and target_to_stm8().
|
static |
Definition at line 824 of file stm8.c.
References ERROR_OK, ERROR_TARGET_FAILURE, LOG_DEBUG, STALL, target::state, stm8_debug_entry(), stm8_read_dm_csrx(), target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_HALTED, TARGET_EVENT_HALTED, TARGET_HALTED, TARGET_RUNNING, and TARGET_UNKNOWN.
|
static |
Definition at line 1123 of file stm8.c.
References buf_set_u32(), stm8_common::core_cache, stm8_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, reg_cache::reg_list, STM8_NUM_REGS, target_to_stm8(), reg::valid, and reg::value.
Referenced by stm8_init_arch_info().
|
static |
Definition at line 349 of file stm8.c.
References DM_CSR1, ERROR_OK, and stm8_adapter_read_memory().
Referenced by stm8_config_step(), stm8_debug_stall(), stm8_examine(), stm8_examine_debug_reason(), stm8_exit_debug(), and stm8_poll().
|
static |
Definition at line 770 of file stm8.c.
References buffer, count, ERROR_OK, ERROR_TARGET_FAILURE, LOG_DEBUG, LOG_WARNING, size, target::state, stm8_adapter_read_memory(), TARGET_HALTED, and TARGET_PRIxADDR.
|
static |
Definition at line 502 of file stm8.c.
References be_to_h_u16(), be_to_h_u24(), DM_REG_A, DM_REG_CC, DM_REG_PC, DM_REG_SP, DM_REG_X, DM_REG_Y, DM_REGS, ERROR_OK, regs, and stm8_adapter_read_memory().
Referenced by stm8_save_context().
|
static |
Definition at line 192 of file stm8.c.
References addr, and swim_read_mem().
Referenced by stm8_enable_interrupts(), stm8_unlock_eeprom(), stm8_unlock_flash(), and stm8_write_flash().
|
static |
Definition at line 1514 of file stm8.c.
References BKPT_HARD, ERROR_OK, ERROR_TARGET_NOT_HALTED, breakpoint::is_set, LOG_TARGET_ERROR, stm8_common::num_hw_bpoints_avail, target::state, stm8_unset_breakpoint(), TARGET_HALTED, target_to_stm8(), and breakpoint::type.
|
static |
Definition at line 1650 of file stm8.c.
References ERROR_OK, ERROR_TARGET_NOT_HALTED, watchpoint::is_set, LOG_TARGET_ERROR, stm8_common::num_hw_bpoints_avail, target::state, stm8_unset_watchpoint(), TARGET_HALTED, and target_to_stm8().
|
static |
Definition at line 902 of file stm8.c.
References adapter_assert_reset(), stm8_common::core_cache, DBG_REASON_NOTHALTED, target::debug_reason, ERROR_COMMAND_NOTFOUND, ERROR_OK, jtag_get_reset_config(), jtag_reset_config, LOG_DEBUG, register_cache_invalidate(), target::reset_halt, RESET_HAS_SRST, target::state, swim_system_reset(), target_halt(), TARGET_RESET, and target_to_stm8().
|
static |
Definition at line 942 of file stm8.c.
References adapter_deassert_reset(), ERROR_COMMAND_NOTFOUND, ERROR_OK, jtag_get_reset_config(), jtag_reset_config, target::reset_halt, RESET_HAS_SRST, target::state, stm8_exit_debug(), and TARGET_RUNNING.
Referenced by stm8_examine().
|
static |
Definition at line 589 of file stm8.c.
References stm8_common::core_cache, stm8_common::core_regs, reg::dirty, ERROR_OK, reg_cache::reg_list, STM8_NUM_REGS, stm8_write_regs(), target_to_stm8(), and stm8_common::write_core_reg.
Referenced by stm8_resume(), and stm8_step().
|
static |
Definition at line 985 of file stm8.c.
References breakpoint::address, breakpoint_find(), buf_get_u32(), buf_set_u32(), stm8_common::core_cache, DBG_REASON_NOTHALTED, target::debug_reason, reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, stm8_common::hw_break_list, LOG_DEBUG, LOG_TARGET_ERROR, NULL, reg_cache::reg_list, register_cache_invalidate(), target::state, stm8_enable_breakpoints(), stm8_enable_interrupts(), stm8_enable_watchpoints(), stm8_exit_debug(), STM8_PC, stm8_restore_context(), stm8_set_breakpoint(), stm8_set_hwbreak(), stm8_single_step_core(), stm8_unset_breakpoint(), TARGET_ADDR_FMT, target_call_event_callbacks(), TARGET_DEBUG_RUNNING, TARGET_EVENT_DEBUG_RESUMED, TARGET_EVENT_RESUMED, target_free_all_working_areas(), TARGET_HALTED, TARGET_RUNNING, target_to_stm8(), reg::valid, and reg::value.
|
static |
Definition at line 1819 of file stm8.c.
References buf_get_u32(), buf_set_u32(), stm8_common::common_magic, stm8_common::core_cache, direction, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_INVALID, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, reg::name, PARAM_IN, PARAM_OUT, stm8_common::read_core_reg, reg_cache::reg_list, reg_param::reg_name, register_get_by_name(), size, target::state, STM8_COMMON_MAGIC, STM8_NUM_REGS, stm8_run_and_wait(), stm8_set_core_reg(), TARGET_HALTED, target_read_buffer(), target_to_stm8(), target_write_buffer(), reg::valid, and reg::value.
|
static |
Definition at line 1786 of file stm8.c.
References buf_get_u32(), stm8_common::core_cache, ERROR_OK, ERROR_TARGET_TIMEOUT, LOG_DEBUG, reg_cache::reg_list, target::state, STM8_PC, target_halt(), TARGET_HALTED, target_resume(), target_wait_state(), and reg::value.
Referenced by stm8_run_algorithm().
|
static |
Definition at line 571 of file stm8.c.
References stm8_common::core_cache, stm8_common::core_regs, ERROR_OK, stm8_common::read_core_reg, reg_cache::reg_list, STM8_NUM_REGS, stm8_read_regs(), target_to_stm8(), and reg::valid.
Referenced by stm8_debug_entry().
|
static |
Definition at line 1368 of file stm8.c.
References breakpoint::address, BKPT_HARD, BKPT_SOFT, stm8_comparator::bp_value, breakpoint_hw_set(), ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, stm8_common::hw_break_list, HWBRK_EXEC, breakpoint::is_set, breakpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, stm8_common::num_hw_bpoints, breakpoint::orig_instr, STM8_BREAK, stm8_set_hwbreak(), TARGET_ADDR_FMT, target_read_u8(), target_to_stm8(), target_write_u8(), breakpoint::type, stm8_comparator::type, breakpoint::unique_id, and stm8_comparator::used.
Referenced by stm8_add_breakpoint(), stm8_enable_breakpoints(), stm8_resume(), and stm8_step().
|
static |
Definition at line 555 of file stm8.c.
References reg::arch_info, buf_get_u32(), buf_set_u32(), reg::dirty, ERROR_OK, ERROR_TARGET_NOT_HALTED, reg::size, target::state, stm8_core_reg::target, TARGET_HALTED, reg::valid, and reg::value.
Referenced by stm8_run_algorithm().
|
static |
Definition at line 242 of file stm8.c.
References addr, stm8_comparator::bp_value, DM_BKR1E, DM_BKR2E, DM_CR1, ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, HWBRK_EXEC, HWBRK_RD, HWBRK_WR, LOG_DEBUG, LOG_ERROR, stm8_comparator::reg_address, stm8_adapter_write_memory(), stm8_write_u8(), type, and stm8_comparator::type.
Referenced by stm8_resume(), stm8_set_breakpoint(), stm8_set_watchpoint(), stm8_unset_breakpoint(), and stm8_unset_watchpoint().
|
static |
Definition at line 1534 of file stm8.c.
References watchpoint::address, stm8_comparator::bp_value, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, ERROR_TARGET_UNALIGNED_ACCESS, stm8_common::hw_break_list, HWBRK_ACC, HWBRK_RD, HWBRK_WR, watchpoint::is_set, watchpoint::length, LOG_DEBUG, LOG_ERROR, LOG_WARNING, stm8_common::num_hw_bpoints, watchpoint::rw, stm8_set_hwbreak(), target_to_stm8(), stm8_comparator::type, stm8_comparator::used, watchpoint_set(), WPT_ACCESS, WPT_READ, and WPT_WRITE.
Referenced by stm8_add_watchpoint(), and stm8_enable_watchpoints().
|
static |
Definition at line 966 of file stm8.c.
References stm8_common::enable_step_irq, ERROR_OK, stm8_config_step(), stm8_debug_entry(), stm8_enable_interrupts(), stm8_exit_debug(), and target_to_stm8().
Referenced by stm8_resume().
|
static |
Definition at line 790 of file stm8.c.
References adapter_speed, csr, ERROR_OK, HS, LOG_DEBUG, NULL, SAFE_MASK, stm8_write_u8(), SWIM_CSR, SWIM_DM, and SWIM_FREQ_HIGH.
Referenced by stm8_init().
|
static |
Definition at line 1295 of file stm8.c.
References breakpoint::address, breakpoint_find(), buf_get_u32(), buf_set_u32(), stm8_common::core_cache, DBG_REASON_SINGLESTEP, target::debug_reason, reg::dirty, stm8_common::enable_step_irq, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_TARGET_ERROR, NULL, reg_cache::reg_list, register_cache_invalidate(), target::state, stm8_config_step(), stm8_debug_entry(), stm8_enable_interrupts(), stm8_exit_debug(), STM8_PC, stm8_restore_context(), stm8_set_breakpoint(), stm8_unset_breakpoint(), TARGET_ADDR_FMT, target_call_event_callbacks(), TARGET_EVENT_HALTED, TARGET_EVENT_RESUMED, TARGET_HALTED, target_to_stm8(), reg::valid, and reg::value.
|
static |
Definition at line 1111 of file stm8.c.
References ERROR_OK, stm8_configure_break_unit(), stm8_init_arch_info(), and target::tap.
|
static |
Definition at line 627 of file stm8.c.
References DUL, ERROR_FAIL, ERROR_OK, stm8_common::flash_dukr, stm8_common::flash_iapsr, stm8_read_u8(), stm8_write_u8(), and target_to_stm8().
Referenced by stm8_write_flash().
|
static |
Definition at line 607 of file stm8.c.
References ERROR_FAIL, ERROR_OK, stm8_common::flash_iapsr, stm8_common::flash_pukr, PUL, stm8_read_u8(), stm8_write_u8(), and target_to_stm8().
Referenced by stm8_write_flash().
|
static |
Definition at line 1460 of file stm8.c.
References breakpoint::address, BKPT_HARD, ERROR_FAIL, ERROR_OK, stm8_common::hw_break_list, breakpoint::is_set, breakpoint::length, LOG_DEBUG, LOG_WARNING, stm8_common::num_hw_bpoints, breakpoint::number, breakpoint::orig_instr, STM8_BREAK, stm8_set_hwbreak(), target_read_memory(), target_to_stm8(), target_write_memory(), breakpoint::type, breakpoint::unique_id, and stm8_comparator::used.
Referenced by stm8_remove_breakpoint(), stm8_resume(), and stm8_step().
|
static |
Definition at line 1625 of file stm8.c.
References ERROR_OK, stm8_common::hw_break_list, watchpoint::is_set, LOG_DEBUG, LOG_WARNING, stm8_common::num_hw_bpoints, watchpoint::number, stm8_set_hwbreak(), target_to_stm8(), and stm8_comparator::used.
Referenced by stm8_remove_watchpoint().
|
static |
Definition at line 1142 of file stm8.c.
References buf_get_u32(), stm8_common::core_cache, stm8_common::core_regs, reg::dirty, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_DEBUG, reg_cache::reg_list, STM8_NUM_REGS, target_to_stm8(), reg::valid, and reg::value.
Referenced by stm8_init_arch_info().
|
static |
Definition at line 647 of file stm8.c.
References stm8_common::blocksize, buffer, count, EEPROM, EOP, ERROR_FAIL, ERROR_OK, FLASH, stm8_common::flash_cr2, stm8_common::flash_iapsr, stm8_common::flash_ncr2, LOG_ERROR, OPT, OPTION, PRG, size, stm8_adapter_write_memory(), stm8_read_u8(), stm8_unlock_eeprom(), stm8_unlock_flash(), stm8_write_u8(), target_to_stm8(), type, and WPRG.
Referenced by stm8_write_memory().
|
static |
Definition at line 736 of file stm8.c.
References stm8_common::blocksize, buffer, count, EEPROM, stm8_common::eepromend, stm8_common::eepromstart, ERROR_OK, ERROR_TARGET_FAILURE, FLASH, stm8_common::flashend, stm8_common::flashstart, LOG_DEBUG, LOG_WARNING, OPTION, stm8_common::optionend, stm8_common::optionstart, size, target::state, stm8_adapter_write_memory(), stm8_write_flash(), TARGET_HALTED, TARGET_PRIxADDR, and target_to_stm8().
|
static |
Definition at line 521 of file stm8.c.
References DM_REG_A, DM_REG_CC, DM_REG_PC, DM_REG_SP, DM_REG_X, DM_REG_Y, DM_REGS, ERROR_OK, h_u16_to_be(), h_u24_to_be(), regs, and stm8_adapter_write_memory().
Referenced by stm8_restore_context().
|
static |
Definition at line 183 of file stm8.c.
References addr, and swim_write_mem().
Referenced by stm8_config_step(), stm8_debug_stall(), stm8_enable_interrupts(), stm8_exit_debug(), stm8_set_hwbreak(), stm8_speed(), stm8_unlock_eeprom(), stm8_unlock_flash(), and stm8_write_flash().
|
extern |
Definition at line 26 of file adapter.c.
Referenced by swd_select().
|
static |
Definition at line 37 of file stm8.c.
Referenced by stm8_init(), and stm8_speed().
const char* feature |
Definition at line 46 of file stm8.c.
Referenced by stm8_build_reg_cache().
|
static |
|
static |
|
static |
Definition at line 1166 of file stm8.c.
Referenced by stm8_build_reg_cache().
const { ... } stm8_regs[] |
Referenced by stm8_build_reg_cache().
struct target_type stm8_target |
enum reg_type type |
Definition at line 43 of file stm8.c.
Referenced by stm8_set_hwbreak(), and stm8_write_flash().