OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | avr32_jtag |
Macros | |
#define | AVR32_INST_IDCODE 0x01 |
#define | AVR32_INST_MB_ACCESS 0x12 |
#define | AVR32_INST_MW_ACCESS 0x11 |
#define | AVR32_INST_NEXUS_ACCESS 0x10 |
#define | AVR32_OCDREG_DC 0x02 |
#define | AVR32_OCDREG_DCCPU 0x44 |
#define | AVR32_OCDREG_DCEMU 0x45 |
#define | AVR32_OCDREG_DCSR 0x46 |
#define | AVR32_OCDREG_DID 0x00 |
#define | AVR32_OCDREG_DINST 0x41 |
#define | AVR32_OCDREG_DPC 0x42 |
#define | AVR32_OCDREG_DS 0x04 |
#define | AVR32NUMCOREREGS 17 |
#define | MFDR(reg, dreg) (0xe5b00044 | ((reg) << 16) | dreg) |
#define | MFSR(reg, sysreg) (0xe1b00002 | ((reg) << 16) | sysreg) |
#define | MODE_READ 0x01 |
#define | MODE_WRITE 0x00 |
#define | MTDR(dreg, reg) (0xe7b00044 | ((reg) << 16) | dreg) |
#define | MTSR(sysreg, reg) (0xe3b00002 | ((reg) << 16) | sysreg) |
#define | OCDREG_DC_ABORT (1 << 31) |
#define | OCDREG_DC_DBE (1 << 13) |
#define | OCDREG_DC_DBR (1 << 12) |
#define | OCDREG_DC_RES (1 << 30) |
#define | OCDREG_DC_SQA (1 << 22) |
#define | OCDREG_DC_SS (1 << 8) |
#define | OCDREG_DCSR_CPUD (1 << 0) |
#define | OCDREG_DCSR_EMUD (1 << 1) |
#define | OCDREG_DS_BOZ (1 << 25) |
#define | OCDREG_DS_BP_MASK 0xff |
#define | OCDREG_DS_BP_SHIFT 8 |
#define | OCDREG_DS_DBA (1 << 26) |
#define | OCDREG_DS_DBS (1 << 5) |
#define | OCDREG_DS_EXB (1 << 27) |
#define | OCDREG_DS_HWB (1 << 2) |
#define | OCDREG_DS_INC (1 << 24) |
#define | OCDREG_DS_NTBF (1 << 28) |
#define | OCDREG_DS_SSS (1 << 0) |
#define | OCDREG_DS_STP (1 << 4) |
#define | OCDREG_DS_SWB (1 << 1) |
#define | RETD 0xd703d623 |
#define | SLAVE_HSB_CACHED 0x04 |
#define | SLAVE_HSB_UNCACHED 0x05 |
#define | SLAVE_OCD 0x01 |
Functions | |
int | avr32_jtag_exec (struct avr32_jtag *jtag_info, uint32_t inst) |
int | avr32_jtag_mwa_read (struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t *value) |
int | avr32_jtag_mwa_write (struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t value) |
int | avr32_jtag_nexus_read (struct avr32_jtag *jtag_info, uint32_t addr, uint32_t *value) |
int | avr32_jtag_nexus_write (struct avr32_jtag *jtag_info, uint32_t addr, uint32_t value) |
int | avr32_ocd_clearbits (struct avr32_jtag *jtag, int reg, uint32_t bits) |
int | avr32_ocd_setbits (struct avr32_jtag *jtag, int reg, uint32_t bits) |
#define AVR32_INST_IDCODE 0x01 |
Definition at line 13 of file avr32_jtag.h.
#define AVR32_INST_MB_ACCESS 0x12 |
Definition at line 16 of file avr32_jtag.h.
#define AVR32_INST_MW_ACCESS 0x11 |
Definition at line 15 of file avr32_jtag.h.
#define AVR32_INST_NEXUS_ACCESS 0x10 |
Definition at line 14 of file avr32_jtag.h.
#define AVR32_OCDREG_DC 0x02 |
Definition at line 27 of file avr32_jtag.h.
#define AVR32_OCDREG_DCCPU 0x44 |
Definition at line 50 of file avr32_jtag.h.
#define AVR32_OCDREG_DCEMU 0x45 |
Definition at line 51 of file avr32_jtag.h.
#define AVR32_OCDREG_DCSR 0x46 |
Definition at line 52 of file avr32_jtag.h.
#define AVR32_OCDREG_DID 0x00 |
Definition at line 26 of file avr32_jtag.h.
#define AVR32_OCDREG_DINST 0x41 |
Definition at line 48 of file avr32_jtag.h.
#define AVR32_OCDREG_DPC 0x42 |
Definition at line 49 of file avr32_jtag.h.
#define AVR32_OCDREG_DS 0x04 |
Definition at line 34 of file avr32_jtag.h.
#define AVR32NUMCOREREGS 17 |
Definition at line 10 of file avr32_jtag.h.
Definition at line 68 of file avr32_jtag.h.
Definition at line 70 of file avr32_jtag.h.
#define MODE_READ 0x01 |
Definition at line 60 of file avr32_jtag.h.
#define MODE_WRITE 0x00 |
Definition at line 59 of file avr32_jtag.h.
Definition at line 67 of file avr32_jtag.h.
Definition at line 69 of file avr32_jtag.h.
#define OCDREG_DC_ABORT (1 << 31) |
Definition at line 33 of file avr32_jtag.h.
#define OCDREG_DC_DBE (1 << 13) |
Definition at line 30 of file avr32_jtag.h.
#define OCDREG_DC_DBR (1 << 12) |
Definition at line 29 of file avr32_jtag.h.
#define OCDREG_DC_RES (1 << 30) |
Definition at line 32 of file avr32_jtag.h.
#define OCDREG_DC_SQA (1 << 22) |
Definition at line 31 of file avr32_jtag.h.
#define OCDREG_DC_SS (1 << 8) |
Definition at line 28 of file avr32_jtag.h.
#define OCDREG_DCSR_CPUD (1 << 0) |
Definition at line 53 of file avr32_jtag.h.
#define OCDREG_DCSR_EMUD (1 << 1) |
Definition at line 54 of file avr32_jtag.h.
#define OCDREG_DS_BOZ (1 << 25) |
Definition at line 43 of file avr32_jtag.h.
#define OCDREG_DS_BP_MASK 0xff |
Definition at line 41 of file avr32_jtag.h.
#define OCDREG_DS_BP_SHIFT 8 |
Definition at line 40 of file avr32_jtag.h.
#define OCDREG_DS_DBA (1 << 26) |
Definition at line 44 of file avr32_jtag.h.
#define OCDREG_DS_DBS (1 << 5) |
Definition at line 39 of file avr32_jtag.h.
#define OCDREG_DS_EXB (1 << 27) |
Definition at line 45 of file avr32_jtag.h.
#define OCDREG_DS_HWB (1 << 2) |
Definition at line 37 of file avr32_jtag.h.
#define OCDREG_DS_INC (1 << 24) |
Definition at line 42 of file avr32_jtag.h.
#define OCDREG_DS_NTBF (1 << 28) |
Definition at line 46 of file avr32_jtag.h.
#define OCDREG_DS_SSS (1 << 0) |
Definition at line 35 of file avr32_jtag.h.
#define OCDREG_DS_STP (1 << 4) |
Definition at line 38 of file avr32_jtag.h.
#define OCDREG_DS_SWB (1 << 1) |
Definition at line 36 of file avr32_jtag.h.
#define RETD 0xd703d623 |
Definition at line 66 of file avr32_jtag.h.
#define SLAVE_HSB_CACHED 0x04 |
Definition at line 19 of file avr32_jtag.h.
#define SLAVE_HSB_UNCACHED 0x05 |
Definition at line 20 of file avr32_jtag.h.
#define SLAVE_OCD 0x01 |
Definition at line 18 of file avr32_jtag.h.
int avr32_jtag_exec | ( | struct avr32_jtag * | jtag_info, |
uint32_t | inst | ||
) |
Definition at line 310 of file avr32_jtag.c.
References avr32_jtag_nexus_read(), avr32_jtag_nexus_write(), AVR32_OCDREG_DINST, AVR32_OCDREG_DS, ERROR_OK, OCDREG_DS_DBA, and OCDREG_DS_INC.
Referenced by avr32_ap7k_resume(), avr32_jtag_read_reg(), avr32_jtag_read_regs(), avr32_jtag_write_reg(), and avr32_jtag_write_regs().
int avr32_jtag_mwa_read | ( | struct avr32_jtag * | jtag_info, |
int | slave, | ||
uint32_t | addr, | ||
uint32_t * | value | ||
) |
Definition at line 290 of file avr32_jtag.c.
References addr, AVR32_INST_MW_ACCESS, avr32_jtag_mwa_read_data(), avr32_jtag_mwa_set_address(), avr32_jtag_set_instr(), ERROR_OK, and MODE_READ.
Referenced by avr32_jtag_read_memory16(), avr32_jtag_read_memory32(), avr32_jtag_read_memory8(), avr32_jtag_write_memory16(), and avr32_jtag_write_memory8().
int avr32_jtag_mwa_write | ( | struct avr32_jtag * | jtag_info, |
int | slave, | ||
uint32_t | addr, | ||
uint32_t | value | ||
) |
Definition at line 300 of file avr32_jtag.c.
References addr, AVR32_INST_MW_ACCESS, avr32_jtag_mwa_set_address(), avr32_jtag_mwa_write_data(), avr32_jtag_set_instr(), ERROR_OK, and MODE_WRITE.
Referenced by avr32_jtag_write_memory16(), avr32_jtag_write_memory32(), and avr32_jtag_write_memory8().
int avr32_jtag_nexus_read | ( | struct avr32_jtag * | jtag_info, |
uint32_t | addr, | ||
uint32_t * | value | ||
) |
Definition at line 160 of file avr32_jtag.c.
References addr, AVR32_INST_NEXUS_ACCESS, avr32_jtag_nexus_read_data(), avr32_jtag_nexus_set_address(), avr32_jtag_set_instr(), and MODE_READ.
Referenced by avr32_ap7k_debug_entry(), avr32_ap7k_examine(), avr32_ap7k_poll(), avr32_jtag_exec(), avr32_jtag_read_reg(), avr32_jtag_write_reg(), avr32_ocd_clearbits(), and avr32_ocd_setbits().
int avr32_jtag_nexus_write | ( | struct avr32_jtag * | jtag_info, |
uint32_t | addr, | ||
uint32_t | value | ||
) |
Definition at line 168 of file avr32_jtag.c.
References addr, AVR32_INST_NEXUS_ACCESS, avr32_jtag_nexus_set_address(), avr32_jtag_nexus_write_data(), avr32_jtag_set_instr(), and MODE_WRITE.
Referenced by avr32_jtag_exec(), avr32_jtag_write_reg(), avr32_ocd_clearbits(), and avr32_ocd_setbits().
int avr32_ocd_clearbits | ( | struct avr32_jtag * | jtag, |
int | reg, | ||
uint32_t | bits | ||
) |
Definition at line 345 of file avr32_jtag.c.
References avr32_jtag_nexus_read(), avr32_jtag_nexus_write(), bits, and ERROR_OK.
Referenced by avr32_ap7k_resume().
int avr32_ocd_setbits | ( | struct avr32_jtag * | jtag, |
int | reg, | ||
uint32_t | bits | ||
) |
Definition at line 328 of file avr32_jtag.c.
References avr32_jtag_nexus_read(), avr32_jtag_nexus_write(), bits, and ERROR_OK.
Referenced by avr32_ap7k_examine(), and avr32_ap7k_halt().