OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | avrf_flash_bank |
struct | avrf_type |
Macros | |
#define | AVR_JTAG_INS_AVR_RESET 0x0C |
#define | AVR_JTAG_INS_BYPASS 0x0F |
#define | AVR_JTAG_INS_EXTEST 0x00 |
#define | AVR_JTAG_INS_IDCODE 0x01 |
#define | AVR_JTAG_INS_LEN 4 |
#define | AVR_JTAG_INS_PROG_COMMANDS 0x05 |
#define | AVR_JTAG_INS_PROG_ENABLE 0x04 |
#define | AVR_JTAG_INS_PROG_PAGELOAD 0x06 |
#define | AVR_JTAG_INS_PROG_PAGEREAD 0x07 |
#define | AVR_JTAG_INS_SAMPLE_PRELOAD 0x02 |
#define | AVR_JTAG_REG_BYPASS_LEN 1 |
#define | AVR_JTAG_REG_DEVICEID_LEN 32 |
#define | AVR_JTAG_REG_FLASH_DATA_BYTE_LEN 16 |
#define | AVR_JTAG_REG_JTAGID_LEN 32 |
#define | AVR_JTAG_REG_PROGRAMMING_COMMAND_LEN 15 |
#define | AVR_JTAG_REG_PROGRAMMING_ENABLE_LEN 16 |
#define | AVR_JTAG_REG_RESET_LEN 1 |
#define | EXTRACT_MFG(X) (((X) & 0xffe) >> 1) |
#define | EXTRACT_PART(X) (((X) & 0xffff000) >> 12) |
#define | EXTRACT_VER(X) (((X) & 0xf0000000) >> 28) |
Functions | |
static int | avr_jtag_read_jtagid (struct avr_common *avr, uint32_t *id) |
static int | avr_jtag_reset (struct avr_common *avr, uint32_t reset) |
static int | avr_jtagprg_chiperase (struct avr_common *avr) |
static int | avr_jtagprg_enterprogmode (struct avr_common *avr) |
static int | avr_jtagprg_leaveprogmode (struct avr_common *avr) |
static int | avr_jtagprg_writeflashpage (struct avr_common *avr, const bool ext_addressing, const uint8_t *page_buf, uint32_t buf_size, uint32_t addr, uint32_t page_size) |
static int | avrf_auto_probe (struct flash_bank *bank) |
static int | avrf_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | avrf_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | avrf_mass_erase (struct flash_bank *bank) |
static int | avrf_probe (struct flash_bank *bank) |
static int | avrf_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
COMMAND_HANDLER (avrf_handle_mass_erase_command) | |
FLASH_BANK_COMMAND_HANDLER (avrf_flash_bank_command) | |
Variables | |
static const struct avrf_type | avft_chips_info [] |
const struct flash_driver | avr_flash |
static const struct command_registration | avrf_command_handlers [] |
static const struct command_registration | avrf_exec_command_handlers [] |
|
static |
Definition at line 79 of file avrf.c.
References AVR_JTAG_INS_IDCODE, AVR_JTAG_REG_JTAGID_LEN, avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_OK, avr_common::jtag_info, NULL, and mcu_jtag::tap.
Referenced by avrf_info(), and avrf_probe().
|
static |
Definition at line 71 of file avrf.c.
References AVR_JTAG_INS_AVR_RESET, AVR_JTAG_REG_RESET_LEN, avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_OK, avr_common::jtag_info, NULL, and mcu_jtag::tap.
Referenced by avr_jtagprg_enterprogmode(), and avr_jtagprg_leaveprogmode().
|
static |
Definition at line 111 of file avrf.c.
References AVR_JTAG_INS_PROG_COMMANDS, AVR_JTAG_REG_PROGRAMMING_COMMAND_LEN, avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_FAIL, ERROR_OK, avr_common::jtag_info, LOG_DEBUG, mcu_execute_queue(), NULL, and mcu_jtag::tap.
Referenced by avrf_erase(), and avrf_mass_erase().
|
static |
Definition at line 87 of file avrf.c.
References AVR_JTAG_INS_PROG_ENABLE, AVR_JTAG_REG_PROGRAMMING_ENABLE_LEN, avr_jtag_reset(), avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_OK, avr_common::jtag_info, NULL, and mcu_jtag::tap.
Referenced by avrf_erase(), avrf_mass_erase(), and avrf_write().
|
static |
Definition at line 97 of file avrf.c.
References AVR_JTAG_INS_PROG_COMMANDS, AVR_JTAG_INS_PROG_ENABLE, AVR_JTAG_REG_PROGRAMMING_COMMAND_LEN, AVR_JTAG_REG_PROGRAMMING_ENABLE_LEN, avr_jtag_reset(), avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_OK, avr_common::jtag_info, NULL, and mcu_jtag::tap.
Referenced by avrf_erase(), avrf_mass_erase(), and avrf_write().
|
static |
Definition at line 135 of file avrf.c.
References addr, AVR_JTAG_INS_PROG_COMMANDS, AVR_JTAG_INS_PROG_PAGELOAD, AVR_JTAG_REG_PROGRAMMING_COMMAND_LEN, avr_jtag_senddat(), avr_jtag_sendinstr(), ERROR_FAIL, ERROR_OK, avr_common::jtag_info, LOG_DEBUG, mcu_execute_queue(), NULL, and mcu_jtag::tap.
Referenced by avrf_write().
|
static |
Definition at line 352 of file avrf.c.
References avrf_info(), avrf_probe(), bank, and ERROR_OK.
|
static |
Definition at line 211 of file avrf.c.
References target::arch_info, avr_jtagprg_chiperase(), avr_jtagprg_enterprogmode(), avr_jtagprg_leaveprogmode(), bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, target::state, status, and TARGET_HALTED.
|
static |
Definition at line 360 of file avrf.c.
References target::arch_info, ARRAY_SIZE, avft_chips_info, avr_jtag_read_jtagid(), bank, avrf_type::chip_id, cmd, command_print_sameline(), ERROR_FAIL, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, EXTRACT_MFG, EXTRACT_PART, EXTRACT_VER, LOG_ERROR, LOG_INFO, mcu_execute_queue(), avrf_type::name, NULL, and TARGET_HALTED.
Referenced by avrf_auto_probe(), avrf_probe(), and FLASH_BANK_COMMAND_HANDLER().
|
static |
Definition at line 403 of file avrf.c.
References target::arch_info, avr_jtagprg_chiperase(), avr_jtagprg_enterprogmode(), avr_jtagprg_leaveprogmode(), bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, target::state, and TARGET_HALTED.
|
static |
Definition at line 292 of file avrf.c.
References target::arch_info, ARRAY_SIZE, avft_chips_info, avr_jtag_read_jtagid(), avrf_info(), bank, avrf_type::chip_id, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, EXTRACT_MFG, EXTRACT_PART, avrf_type::flash_page_num, avrf_type::flash_page_size, LOG_ERROR, LOG_INFO, mcu_execute_queue(), avrf_type::name, NULL, and TARGET_HALTED.
Referenced by avrf_auto_probe().
|
static |
Definition at line 236 of file avrf.c.
References target::arch_info, avr_jtagprg_enterprogmode(), avr_jtagprg_leaveprogmode(), avr_jtagprg_writeflashpage(), bank, buffer, count, ERROR_FAIL, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_OK, ERROR_TARGET_NOT_HALTED, keep_alive(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, offset, and TARGET_HALTED.
FLASH_BANK_COMMAND_HANDLER | ( | avrf_flash_bank_command | ) |
Definition at line 196 of file avrf.c.
References avrf_info(), bank, CMD_ARGC, ERROR_COMMAND_SYNTAX_ERROR, and ERROR_OK.
|
static |
Definition at line 1 of file avrf.c.
Referenced by avrf_info(), and avrf_probe().
const struct flash_driver avr_flash |
|
static |
|
static |