OpenOCD
esirisc_jtag.h File Reference
Include dependency graph for esirisc_jtag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  esirisc_jtag
 

Macros

#define DEBUG_ASSERT_RESET   0xf4
 
#define DEBUG_BREAK   0xf8
 
#define DEBUG_CONTINUE   0xfa
 
#define DEBUG_DEASSERT_RESET   0xf6
 
#define DEBUG_DISABLE_DEBUG   0xf2
 
#define DEBUG_ENABLE_DEBUG   0xf0
 
#define DEBUG_FLUSH_CACHES   0xfc
 
#define DEBUG_NOP   0x00
 
#define DEBUG_READ_BYTE   0x10
 
#define DEBUG_READ_CSR   0xd0
 
#define DEBUG_READ_HWORD   0x20
 
#define DEBUG_READ_REG   0xb0
 
#define DEBUG_READ_WORD   0x30
 
#define DEBUG_WRITE_BYTE   0x60
 
#define DEBUG_WRITE_CSR   0xe0
 
#define DEBUG_WRITE_HWORD   0x70
 
#define DEBUG_WRITE_REG   0xc0
 
#define DEBUG_WRITE_WORD   0x80
 
#define EID_CANT_DEBUG   0x3e
 
#define EID_NONE   0x3f
 
#define EID_OVERFLOW   0x3d
 
#define INSTR_BYPASS   0xf
 
#define INSTR_DEBUG   0x9
 
#define INSTR_IDCODE   0x8
 
#define INSTR_LENGTH   4
 
#define PAD_BYTE   0xaa
 
#define STUFF_MARKER   0x55
 

Functions

int esirisc_jtag_assert_reset (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_break (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_continue (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_deassert_reset (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_disable_debug (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_enable_debug (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_flush_caches (struct esirisc_jtag *jtag_info)
 
uint8_t esirisc_jtag_get_eid (struct esirisc_jtag *jtag_info)
 
bool esirisc_jtag_is_debug_active (struct esirisc_jtag *jtag_info)
 
bool esirisc_jtag_is_stopped (struct esirisc_jtag *jtag_info)
 
int esirisc_jtag_read_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t *data)
 
int esirisc_jtag_read_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t *data)
 
int esirisc_jtag_read_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t *data)
 
int esirisc_jtag_read_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t *data)
 
int esirisc_jtag_read_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t *data)
 
int esirisc_jtag_write_byte (struct esirisc_jtag *jtag_info, uint32_t address, uint8_t data)
 
int esirisc_jtag_write_csr (struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t csr, uint32_t data)
 
int esirisc_jtag_write_hword (struct esirisc_jtag *jtag_info, uint32_t address, uint16_t data)
 
int esirisc_jtag_write_reg (struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t data)
 
int esirisc_jtag_write_word (struct esirisc_jtag *jtag_info, uint32_t address, uint32_t data)
 

Macro Definition Documentation

◆ DEBUG_ASSERT_RESET

#define DEBUG_ASSERT_RESET   0xf4

Definition at line 35 of file esirisc_jtag.h.

◆ DEBUG_BREAK

#define DEBUG_BREAK   0xf8

Definition at line 37 of file esirisc_jtag.h.

◆ DEBUG_CONTINUE

#define DEBUG_CONTINUE   0xfa

Definition at line 38 of file esirisc_jtag.h.

◆ DEBUG_DEASSERT_RESET

#define DEBUG_DEASSERT_RESET   0xf6

Definition at line 36 of file esirisc_jtag.h.

◆ DEBUG_DISABLE_DEBUG

#define DEBUG_DISABLE_DEBUG   0xf2

Definition at line 34 of file esirisc_jtag.h.

◆ DEBUG_ENABLE_DEBUG

#define DEBUG_ENABLE_DEBUG   0xf0

Definition at line 33 of file esirisc_jtag.h.

◆ DEBUG_FLUSH_CACHES

#define DEBUG_FLUSH_CACHES   0xfc

Definition at line 39 of file esirisc_jtag.h.

◆ DEBUG_NOP

#define DEBUG_NOP   0x00

Definition at line 22 of file esirisc_jtag.h.

◆ DEBUG_READ_BYTE

#define DEBUG_READ_BYTE   0x10

Definition at line 23 of file esirisc_jtag.h.

◆ DEBUG_READ_CSR

#define DEBUG_READ_CSR   0xd0

Definition at line 31 of file esirisc_jtag.h.

◆ DEBUG_READ_HWORD

#define DEBUG_READ_HWORD   0x20

Definition at line 24 of file esirisc_jtag.h.

◆ DEBUG_READ_REG

#define DEBUG_READ_REG   0xb0

Definition at line 29 of file esirisc_jtag.h.

◆ DEBUG_READ_WORD

#define DEBUG_READ_WORD   0x30

Definition at line 25 of file esirisc_jtag.h.

◆ DEBUG_WRITE_BYTE

#define DEBUG_WRITE_BYTE   0x60

Definition at line 26 of file esirisc_jtag.h.

◆ DEBUG_WRITE_CSR

#define DEBUG_WRITE_CSR   0xe0

Definition at line 32 of file esirisc_jtag.h.

◆ DEBUG_WRITE_HWORD

#define DEBUG_WRITE_HWORD   0x70

Definition at line 27 of file esirisc_jtag.h.

◆ DEBUG_WRITE_REG

#define DEBUG_WRITE_REG   0xc0

Definition at line 30 of file esirisc_jtag.h.

◆ DEBUG_WRITE_WORD

#define DEBUG_WRITE_WORD   0x80

Definition at line 28 of file esirisc_jtag.h.

◆ EID_CANT_DEBUG

#define EID_CANT_DEBUG   0x3e

Definition at line 43 of file esirisc_jtag.h.

◆ EID_NONE

#define EID_NONE   0x3f

Definition at line 44 of file esirisc_jtag.h.

◆ EID_OVERFLOW

#define EID_OVERFLOW   0x3d

Definition at line 42 of file esirisc_jtag.h.

◆ INSTR_BYPASS

#define INSTR_BYPASS   0xf

Definition at line 18 of file esirisc_jtag.h.

◆ INSTR_DEBUG

#define INSTR_DEBUG   0x9

Definition at line 17 of file esirisc_jtag.h.

◆ INSTR_IDCODE

#define INSTR_IDCODE   0x8

Definition at line 16 of file esirisc_jtag.h.

◆ INSTR_LENGTH

#define INSTR_LENGTH   4

Definition at line 19 of file esirisc_jtag.h.

◆ PAD_BYTE

#define PAD_BYTE   0xaa

Definition at line 48 of file esirisc_jtag.h.

◆ STUFF_MARKER

#define STUFF_MARKER   0x55

Definition at line 47 of file esirisc_jtag.h.

Function Documentation

◆ esirisc_jtag_assert_reset()

int esirisc_jtag_assert_reset ( struct esirisc_jtag jtag_info)

Definition at line 498 of file esirisc_jtag.c.

References DEBUG_ASSERT_RESET, and esirisc_jtag_send_ctrl().

Referenced by esirisc_assert_reset(), and esirisc_debug_reset().

◆ esirisc_jtag_break()

int esirisc_jtag_break ( struct esirisc_jtag jtag_info)

Definition at line 508 of file esirisc_jtag.c.

References DEBUG_BREAK, and esirisc_jtag_send_ctrl().

Referenced by esirisc_examine(), and esirisc_halt().

◆ esirisc_jtag_continue()

int esirisc_jtag_continue ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_deassert_reset()

int esirisc_jtag_deassert_reset ( struct esirisc_jtag jtag_info)

Definition at line 503 of file esirisc_jtag.c.

References DEBUG_DEASSERT_RESET, and esirisc_jtag_send_ctrl().

Referenced by esirisc_deassert_reset(), and esirisc_debug_reset().

◆ esirisc_jtag_disable_debug()

int esirisc_jtag_disable_debug ( struct esirisc_jtag jtag_info)

Definition at line 493 of file esirisc_jtag.c.

References DEBUG_DISABLE_DEBUG, and esirisc_jtag_send_ctrl().

◆ esirisc_jtag_enable_debug()

int esirisc_jtag_enable_debug ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_flush_caches()

int esirisc_jtag_flush_caches ( struct esirisc_jtag jtag_info)

Definition at line 518 of file esirisc_jtag.c.

References DEBUG_FLUSH_CACHES, and esirisc_jtag_send_ctrl().

Referenced by esirisc_flush_caches().

◆ esirisc_jtag_get_eid()

uint8_t esirisc_jtag_get_eid ( struct esirisc_jtag jtag_info)

Definition at line 224 of file esirisc_jtag.c.

References esirisc_jtag::status.

Referenced by esirisc_jtag_check_status().

◆ esirisc_jtag_is_debug_active()

bool esirisc_jtag_is_debug_active ( struct esirisc_jtag jtag_info)

◆ esirisc_jtag_is_stopped()

bool esirisc_jtag_is_stopped ( struct esirisc_jtag jtag_info)

Definition at line 219 of file esirisc_jtag.c.

References esirisc_jtag::status.

Referenced by esirisc_debug_enable(), esirisc_jtag_check_status(), and esirisc_poll().

◆ esirisc_jtag_read_byte()

int esirisc_jtag_read_byte ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint8_t *  data 
)

◆ esirisc_jtag_read_csr()

◆ esirisc_jtag_read_hword()

int esirisc_jtag_read_hword ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint16_t *  data 
)

◆ esirisc_jtag_read_reg()

int esirisc_jtag_read_reg ( struct esirisc_jtag jtag_info,
uint8_t  reg,
uint32_t *  data 
)

◆ esirisc_jtag_read_word()

int esirisc_jtag_read_word ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint32_t *  data 
)

◆ esirisc_jtag_write_byte()

int esirisc_jtag_write_byte ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint8_t  data 
)

◆ esirisc_jtag_write_csr()

◆ esirisc_jtag_write_hword()

int esirisc_jtag_write_hword ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint16_t  data 
)

◆ esirisc_jtag_write_reg()

int esirisc_jtag_write_reg ( struct esirisc_jtag jtag_info,
uint8_t  reg,
uint32_t  data 
)

◆ esirisc_jtag_write_word()

int esirisc_jtag_write_word ( struct esirisc_jtag jtag_info,
uint32_t  address,
uint32_t  data 
)