OpenOCD
stm8.c File Reference
Include dependency graph for stm8.c:

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_cachestm8_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_driveradapter_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   id
 
   const char *   name
 
   enum reg_type   type
 
stm8_regs []
 
struct target_type stm8_target
 

Macro Definition Documentation

◆ BK1F

#define BK1F   0x02

Definition at line 88 of file stm8.c.

◆ BK2F

#define BK2F   0x04

Definition at line 87 of file stm8.c.

◆ BRW

#define BRW   0x08

Definition at line 86 of file stm8.c.

◆ CC_I0

#define CC_I0   0x8

Definition at line 65 of file stm8.c.

◆ CC_I1

#define CC_I1   0x20

Definition at line 66 of file stm8.c.

◆ DM_BKR1E

#define DM_BKR1E   0x7f90

Definition at line 76 of file stm8.c.

◆ DM_BKR2E

#define DM_BKR2E   0x7f93

Definition at line 77 of file stm8.c.

◆ DM_CR1

#define DM_CR1   0x7f96

Definition at line 78 of file stm8.c.

◆ DM_CR2

#define DM_CR2   0x7f97

Definition at line 79 of file stm8.c.

◆ DM_CSR1

#define DM_CSR1   0x7f98

Definition at line 80 of file stm8.c.

◆ DM_CSR2

#define DM_CSR2   0x7f99

Definition at line 81 of file stm8.c.

◆ DM_REG_A

#define DM_REG_A   0x7f00

Definition at line 69 of file stm8.c.

◆ DM_REG_CC

#define DM_REG_CC   0x7f0a

Definition at line 74 of file stm8.c.

◆ DM_REG_PC

#define DM_REG_PC   0x7f01

Definition at line 70 of file stm8.c.

◆ DM_REG_SP

#define DM_REG_SP   0x7f08

Definition at line 73 of file stm8.c.

◆ DM_REG_X

#define DM_REG_X   0x7f04

Definition at line 71 of file stm8.c.

◆ DM_REG_Y

#define DM_REG_Y   0x7f06

Definition at line 72 of file stm8.c.

◆ DM_REGS

#define DM_REGS   0x7f00

Definition at line 68 of file stm8.c.

◆ DUL

#define DUL   0x08

Definition at line 111 of file stm8.c.

◆ EOP

#define EOP   0x04

Definition at line 112 of file stm8.c.

◆ ERASE

#define ERASE   0x20

Definition at line 119 of file stm8.c.

◆ FLASH_CR1_STM8L

#define FLASH_CR1_STM8L   0x5050

Definition at line 102 of file stm8.c.

◆ FLASH_CR1_STM8S

#define FLASH_CR1_STM8S   0x505A

Definition at line 95 of file stm8.c.

◆ FLASH_CR2_STM8L

#define FLASH_CR2_STM8L   0x5051

Definition at line 103 of file stm8.c.

◆ FLASH_CR2_STM8S

#define FLASH_CR2_STM8S   0x505B

Definition at line 96 of file stm8.c.

◆ FLASH_DUKR_STM8L

#define FLASH_DUKR_STM8L   0x5053

Definition at line 106 of file stm8.c.

◆ FLASH_DUKR_STM8S

#define FLASH_DUKR_STM8S   0x5064

Definition at line 100 of file stm8.c.

◆ FLASH_IAPSR_STM8L

#define FLASH_IAPSR_STM8L   0x5054

Definition at line 107 of file stm8.c.

◆ FLASH_IAPSR_STM8S

#define FLASH_IAPSR_STM8S   0x505F

Definition at line 98 of file stm8.c.

◆ FLASH_NCR2_STM8L

#define FLASH_NCR2_STM8L   0

Definition at line 104 of file stm8.c.

◆ FLASH_NCR2_STM8S

#define FLASH_NCR2_STM8S   0x505C

Definition at line 97 of file stm8.c.

◆ FLASH_PUKR_STM8L

#define FLASH_PUKR_STM8L   0x5052

Definition at line 105 of file stm8.c.

◆ FLASH_PUKR_STM8S

#define FLASH_PUKR_STM8S   0x5062

Definition at line 99 of file stm8.c.

◆ FLUSH

#define FLUSH   0x01

Definition at line 93 of file stm8.c.

◆ FPRG

#define FPRG   0x10

Definition at line 120 of file stm8.c.

◆ HS

#define HS   0x10

Definition at line 127 of file stm8.c.

◆ HSIT

#define HSIT   0x02

Definition at line 130 of file stm8.c.

◆ HVOFF

#define HVOFF   0x40

Definition at line 110 of file stm8.c.

◆ NO_ACCESS

#define NO_ACCESS   0x40

Definition at line 125 of file stm8.c.

◆ OPT

#define OPT   0x80

Definition at line 117 of file stm8.c.

◆ OSCOFF

#define OSCOFF   0x08

Definition at line 128 of file stm8.c.

◆ PRG

#define PRG   0x01

Definition at line 121 of file stm8.c.

◆ PRI

#define PRI   0x01

Definition at line 131 of file stm8.c.

◆ PUL

#define PUL   0x02

Definition at line 113 of file stm8.c.

◆ RST

#define RST   0x10

Definition at line 85 of file stm8.c.

◆ SAFE_MASK

#define SAFE_MASK   0x80

Definition at line 124 of file stm8.c.

◆ STALL

#define STALL   0x08

Definition at line 92 of file stm8.c.

◆ STE

#define STE   0x40

Definition at line 83 of file stm8.c.

◆ STF

#define STF   0x20

Definition at line 84 of file stm8.c.

◆ STM8_A

#define STM8_A   1

Definition at line 59 of file stm8.c.

◆ STM8_BREAK

#define STM8_BREAK   0x8B

Definition at line 135 of file stm8.c.

◆ STM8_CC

#define STM8_CC   5

Definition at line 63 of file stm8.c.

◆ STM8_NUM_REGS

#define STM8_NUM_REGS   ARRAY_SIZE(stm8_regs)

Definition at line 57 of file stm8.c.

◆ STM8_PC

#define STM8_PC   0

Definition at line 58 of file stm8.c.

◆ STM8_SP

#define STM8_SP   4

Definition at line 62 of file stm8.c.

◆ STM8_X

#define STM8_X   2

Definition at line 60 of file stm8.c.

◆ STM8_Y

#define STM8_Y   3

Definition at line 61 of file stm8.c.

◆ SWBKF

#define SWBKF   0x10

Definition at line 91 of file stm8.c.

◆ SWBRK

#define SWBRK   0x20

Definition at line 90 of file stm8.c.

◆ SWIM_CSR

#define SWIM_CSR   0x7f80

Definition at line 133 of file stm8.c.

◆ SWIM_DM

#define SWIM_DM   0x20

Definition at line 126 of file stm8.c.

◆ SWIM_RST

#define SWIM_RST   0x04

Definition at line 129 of file stm8.c.

◆ WPRG

#define WPRG   0x40

Definition at line 118 of file stm8.c.

◆ WR_PG_DIS

#define WR_PG_DIS   0x01

Definition at line 114 of file stm8.c.

Enumeration Type Documentation

◆ hw_break_type

Enumerator
HWBRK_EXEC 
HWBRK_RD 
HWBRK_WR 
HWBRK_ACC 

Definition at line 153 of file stm8.c.

◆ mem_type

enum mem_type
Enumerator
RAM 
FLASH 
EEPROM 
OPTION 

Definition at line 137 of file stm8.c.

Function Documentation

◆ COMMAND_HANDLER() [1/2]

COMMAND_HANDLER ( stm8_handle_enable_step_irq_command  )

◆ COMMAND_HANDLER() [2/2]

COMMAND_HANDLER ( stm8_handle_enable_stm8l_command  )

◆ stm8_adapter_read_memory()

static int stm8_adapter_read_memory ( struct target target,
uint32_t  addr,
int  size,
int  count,
void *  buf 
)
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().

◆ stm8_adapter_write_memory()

static int stm8_adapter_write_memory ( struct target target,
uint32_t  addr,
int  size,
int  count,
const void *  buf 
)
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().

◆ stm8_add_breakpoint()

static int stm8_add_breakpoint ( struct target target,
struct breakpoint breakpoint 
)
static

◆ stm8_add_watchpoint()

static int stm8_add_watchpoint ( struct target target,
struct watchpoint watchpoint 
)
static

◆ stm8_arch_state()

static int stm8_arch_state ( struct target target)
static

◆ stm8_blank_check_memory()

◆ stm8_build_reg_cache()

◆ stm8_checksum_memory()

static int stm8_checksum_memory ( struct target target,
target_addr_t  address,
uint32_t  count,
uint32_t *  checksum 
)
static

Definition at line 1778 of file stm8.c.

References ERROR_TARGET_RESOURCE_NOT_AVAILABLE.

◆ stm8_config_step()

static int stm8_config_step ( struct target target,
int  enable 
)
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().

◆ stm8_configure_break_unit()

static int stm8_configure_break_unit ( struct target target)
static

◆ stm8_debug_entry()

◆ stm8_debug_stall()

static int stm8_debug_stall ( struct target target)
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().

◆ stm8_deinit()

static void stm8_deinit ( struct target target)
static

Definition at line 1273 of file stm8.c.

References stm8_common::hw_break_list, stm8_free_reg_cache(), and target_to_stm8().

◆ stm8_enable_breakpoints()

static void stm8_enable_breakpoints ( struct target target)
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().

◆ stm8_enable_interrupts()

static int stm8_enable_interrupts ( struct target target,
int  enable 
)
static

◆ stm8_enable_watchpoints()

static void stm8_enable_watchpoints ( struct target target)
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().

◆ stm8_examine()

◆ stm8_examine_debug_reason()

static int stm8_examine_debug_reason ( struct target target)
static

◆ stm8_exit_debug()

static int stm8_exit_debug ( struct target target)
static

◆ stm8_free_reg_cache()

static void stm8_free_reg_cache ( struct target target)
static

◆ stm8_get_core_reg()

static int stm8_get_core_reg ( struct reg reg)
static

◆ stm8_get_gdb_arch()

static const char* stm8_get_gdb_arch ( const struct target target)
static

Definition at line 1161 of file stm8.c.

◆ stm8_get_gdb_reg_list()

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

◆ stm8_halt()

static int stm8_halt ( struct target target)
static

◆ stm8_init()

static int stm8_init ( struct command_context cmd_ctx,
struct target target 
)
static

◆ stm8_init_arch_info()

◆ stm8_init_flash_regs()

◆ stm8_jim_configure()

◆ stm8_poll()

◆ stm8_read_core_reg()

static int stm8_read_core_reg ( struct target target,
unsigned int  num 
)
static

◆ stm8_read_dm_csrx()

static int stm8_read_dm_csrx ( struct target target,
uint8_t *  csr1,
uint8_t *  csr2 
)
static

◆ stm8_read_memory()

static int stm8_read_memory ( struct target target,
target_addr_t  address,
uint32_t  size,
uint32_t  count,
uint8_t *  buffer 
)
static

◆ stm8_read_regs()

static int stm8_read_regs ( struct target target,
uint32_t  regs[] 
)
static

◆ stm8_read_u8()

static int stm8_read_u8 ( struct target target,
uint32_t  addr,
uint8_t *  val 
)
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().

◆ stm8_remove_breakpoint()

static int stm8_remove_breakpoint ( struct target target,
struct breakpoint breakpoint 
)
static

◆ stm8_remove_watchpoint()

static int stm8_remove_watchpoint ( struct target target,
struct watchpoint watchpoint 
)
static

◆ stm8_reset_assert()

◆ stm8_reset_deassert()

static int stm8_reset_deassert ( struct target target)
static

◆ stm8_restore_context()

static int stm8_restore_context ( struct target target)
static

◆ stm8_resume()

◆ stm8_run_algorithm()

◆ stm8_run_and_wait()

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

◆ stm8_save_context()

static int stm8_save_context ( struct target target)
static

◆ stm8_set_breakpoint()

◆ stm8_set_core_reg()

static int stm8_set_core_reg ( struct reg reg,
uint8_t *  buf 
)
static

◆ stm8_set_hwbreak()

◆ stm8_set_watchpoint()

◆ stm8_single_step_core()

static int stm8_single_step_core ( struct target target)
static

◆ stm8_speed()

static int stm8_speed ( int  speed)
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().

◆ stm8_step()

◆ stm8_target_create()

static int stm8_target_create ( struct target target,
Jim_Interp *  interp 
)
static

Definition at line 1111 of file stm8.c.

References ERROR_OK, stm8_configure_break_unit(), stm8_init_arch_info(), and target::tap.

◆ stm8_unlock_eeprom()

static int stm8_unlock_eeprom ( struct target target)
static

◆ stm8_unlock_flash()

static int stm8_unlock_flash ( struct target target)
static

◆ stm8_unset_breakpoint()

◆ stm8_unset_watchpoint()

static int stm8_unset_watchpoint ( struct target target,
struct watchpoint watchpoint 
)
static

◆ stm8_write_core_reg()

static int stm8_write_core_reg ( struct target target,
unsigned int  num 
)
static

◆ stm8_write_flash()

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

◆ stm8_write_memory()

◆ stm8_write_regs()

static int stm8_write_regs ( struct target target,
uint32_t  regs[] 
)
static

◆ stm8_write_u8()

static int stm8_write_u8 ( struct target target,
uint32_t  addr,
uint8_t  val 
)
static

Variable Documentation

◆ adapter_driver

Definition at line 26 of file adapter.c.

Referenced by swd_select().

◆ adapter_speed

int(* adapter_speed) (int speed) ( int  speed)
static

Definition at line 37 of file stm8.c.

Referenced by stm8_init(), and stm8_speed().

◆ bits

const uint8_t bits

Definition at line 43 of file stm8.c.

◆ feature

const char* feature

Definition at line 46 of file stm8.c.

Referenced by stm8_build_reg_cache().

◆ flag

int flag

Definition at line 47 of file stm8.c.

◆ group

const char* group

Definition at line 45 of file stm8.c.

◆ id

unsigned id

Definition at line 41 of file stm8.c.

◆ name

const char* name

Definition at line 42 of file stm8.c.

◆ stm8_command_handlers

const struct command_registration stm8_command_handlers[]
static
Initial value:
= {
{
.name = "stm8",
.mode = COMMAND_ANY,
.help = "stm8 command group",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration stm8_exec_command_handlers[]
Definition: stm8.c:2131

Definition at line 2114 of file stm8.c.

◆ stm8_exec_command_handlers

const struct command_registration stm8_exec_command_handlers[]
static
Initial value:
= {
{
.name = "enable_step_irq",
.handler = stm8_handle_enable_step_irq_command,
.mode = COMMAND_ANY,
.help = "Enable/disable irq handling during step",
.usage = "[1/0]",
},
{
.name = "enable_stm8l",
.handler = stm8_handle_enable_stm8l_command,
.mode = COMMAND_ANY,
.help = "Enable/disable STM8L flash programming",
.usage = "[1/0]",
},
}

Definition at line 2114 of file stm8.c.

◆ stm8_reg_type

const struct reg_arch_type stm8_reg_type
static
Initial value:
= {
}
static int stm8_get_core_reg(struct reg *reg)
Definition: stm8.c:540
static int stm8_set_core_reg(struct reg *reg, uint8_t *buf)
Definition: stm8.c:555

Definition at line 1166 of file stm8.c.

Referenced by stm8_build_reg_cache().

◆ 

const { ... } stm8_regs[]
Initial value:
= {
{ 0, "pc", 32, REG_TYPE_UINT32, "general", "org.gnu.gdb.stm8.core", 0 },
{ 1, "a", 8, REG_TYPE_UINT8, "general", "org.gnu.gdb.stm8.core", 0 },
{ 2, "x", 16, REG_TYPE_UINT16, "general", "org.gnu.gdb.stm8.core", 0 },
{ 3, "y", 16, REG_TYPE_UINT16, "general", "org.gnu.gdb.stm8.core", 0 },
{ 4, "sp", 16, REG_TYPE_UINT16, "general", "org.gnu.gdb.stm8.core", 0 },
{ 5, "cc", 8, REG_TYPE_UINT8, "general", "org.gnu.gdb.stm8.core", 0 },
}
@ REG_TYPE_UINT16
Definition: register.h:29
@ REG_TYPE_UINT32
Definition: register.h:30
@ REG_TYPE_UINT8
Definition: register.h:28

Referenced by stm8_build_reg_cache().

◆ stm8_target

struct target_type stm8_target

Definition at line 2114 of file stm8.c.

◆ type

enum reg_type type

Definition at line 43 of file stm8.c.

Referenced by stm8_set_hwbreak(), and stm8_write_flash().