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

Go to the source code of this file.

Macros

#define AVR_JTAG_INS_LEN   4
 

Functions

static int avr_arch_state (struct target *target)
 
static int avr_assert_reset (struct target *target)
 
static int avr_deassert_reset (struct target *target)
 
static int avr_halt (struct target *target)
 
static int avr_init_target (struct command_context *cmd_ctx, struct target *target)
 
int avr_jtag_senddat (struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out, int len)
 
int avr_jtag_sendinstr (struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out)
 
static int avr_poll (struct target *target)
 
static int avr_resume (struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
 
static int avr_step (struct target *target, int current, target_addr_t address, int handle_breakpoints)
 
static int avr_target_create (struct target *target, Jim_Interp *interp)
 
int mcu_execute_queue (void)
 
static int mcu_write_dr (struct jtag_tap *tap, uint8_t *dr_in, uint8_t *dr_out, int dr_len, int rti)
 
static int mcu_write_dr_u32 (struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int dr_len, int rti)
 
static int mcu_write_ir (struct jtag_tap *tap, uint8_t *ir_in, uint8_t *ir_out, int ir_len, int rti)
 
static int mcu_write_ir_u8 (struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out, int ir_len, int rti)
 

Variables

struct target_type avr_target
 

Macro Definition Documentation

◆ AVR_JTAG_INS_LEN

#define AVR_JTAG_INS_LEN   4

Definition at line 16 of file avrt.c.

Function Documentation

◆ avr_arch_state()

static int avr_arch_state ( struct target target)
static

Definition at line 87 of file avrt.c.

References ERROR_OK, and LOG_DEBUG.

◆ avr_assert_reset()

static int avr_assert_reset ( struct target target)
static

Definition at line 121 of file avrt.c.

References ERROR_OK, LOG_DEBUG, target::state, and TARGET_RESET.

◆ avr_deassert_reset()

static int avr_deassert_reset ( struct target target)
static

Definition at line 129 of file avrt.c.

References ERROR_OK, LOG_DEBUG, target::state, and TARGET_RUNNING.

◆ avr_halt()

static int avr_halt ( struct target target)
static

Definition at line 102 of file avrt.c.

References ERROR_OK, and LOG_DEBUG.

◆ avr_init_target()

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

Definition at line 81 of file avrt.c.

References ERROR_OK, and LOG_DEBUG.

◆ avr_jtag_senddat()

int avr_jtag_senddat ( struct jtag_tap tap,
uint32_t *  dr_in,
uint32_t  dr_out,
int  len 
)

◆ avr_jtag_sendinstr()

int avr_jtag_sendinstr ( struct jtag_tap tap,
uint8_t *  ir_in,
uint8_t  ir_out 
)

◆ avr_poll()

static int avr_poll ( struct target target)
static

Definition at line 93 of file avrt.c.

References ERROR_OK, LOG_DEBUG, target::state, TARGET_DEBUG_RUNNING, TARGET_HALTED, and TARGET_RUNNING.

◆ avr_resume()

static int avr_resume ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints,
int  debug_execution 
)
static

Definition at line 108 of file avrt.c.

References ERROR_OK, and LOG_DEBUG.

◆ avr_step()

static int avr_step ( struct target target,
int  current,
target_addr_t  address,
int  handle_breakpoints 
)
static

Definition at line 115 of file avrt.c.

References ERROR_OK, and LOG_DEBUG.

◆ avr_target_create()

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

Definition at line 71 of file avrt.c.

References target::arch_info, ERROR_OK, avr_common::jtag_info, mcu_jtag::tap, and target::tap.

◆ mcu_execute_queue()

int mcu_execute_queue ( void  )

Definition at line 209 of file avrt.c.

References jtag_execute_queue().

Referenced by avr_jtagprg_chiperase(), avr_jtagprg_writeflashpage(), avrf_info(), and avrf_probe().

◆ mcu_write_dr()

static int mcu_write_dr ( struct jtag_tap tap,
uint8_t *  dr_in,
uint8_t *  dr_out,
int  dr_len,
int  rti 
)
static

Definition at line 168 of file avrt.c.

References ERROR_FAIL, ERROR_OK, jtag_add_plain_dr_scan(), LOG_ERROR, and TAP_IDLE.

Referenced by mcu_write_dr_u32().

◆ mcu_write_dr_u32()

static int mcu_write_dr_u32 ( struct jtag_tap tap,
uint32_t *  ir_in,
uint32_t  ir_out,
int  dr_len,
int  rti 
)
static

Definition at line 196 of file avrt.c.

References ERROR_FAIL, ERROR_OK, LOG_ERROR, and mcu_write_dr().

Referenced by avr_jtag_senddat().

◆ mcu_write_ir()

static int mcu_write_ir ( struct jtag_tap tap,
uint8_t *  ir_in,
uint8_t *  ir_out,
int  ir_len,
int  rti 
)
static

Definition at line 149 of file avrt.c.

References ERROR_FAIL, ERROR_OK, jtag_tap::ir_length, jtag_add_plain_ir_scan(), LOG_ERROR, and TAP_IDLE.

Referenced by mcu_write_ir_u8().

◆ mcu_write_ir_u8()

static int mcu_write_ir_u8 ( struct jtag_tap tap,
uint8_t *  ir_in,
uint8_t  ir_out,
int  ir_len,
int  rti 
)
static

Definition at line 183 of file avrt.c.

References ERROR_FAIL, ERROR_OK, LOG_ERROR, and mcu_write_ir().

Referenced by avr_jtag_sendinstr().

Variable Documentation

◆ avr_target

struct target_type avr_target
Initial value:
= {
.name = "avr",
.poll = avr_poll,
.arch_state = avr_arch_state,
.halt = avr_halt,
.resume = avr_resume,
.step = avr_step,
.assert_reset = avr_assert_reset,
.deassert_reset = avr_deassert_reset,
.target_create = avr_target_create,
.init_target = avr_init_target,
}
static int avr_arch_state(struct target *target)
Definition: avrt.c:87
static int avr_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
Definition: avrt.c:115
static int avr_poll(struct target *target)
Definition: avrt.c:93
static int avr_init_target(struct command_context *cmd_ctx, struct target *target)
Definition: avrt.c:81
static int avr_halt(struct target *target)
Definition: avrt.c:102
static int avr_assert_reset(struct target *target)
Definition: avrt.c:121
static int avr_target_create(struct target *target, Jim_Interp *interp)
Definition: avrt.c:71
static int avr_resume(struct target *target, int current, target_addr_t address, int handle_breakpoints, int debug_execution)
Definition: avrt.c:108
static int avr_deassert_reset(struct target *target)
Definition: avrt.c:129

Definition at line 37 of file avrt.c.