OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | str7x_flash_bank |
struct | str7x_mem_layout |
Macros | |
#define | FLASH_10ER 0x00000008 |
#define | FLASH_AR 0x00000010 |
#define | FLASH_B0F0 0x00000001 |
#define | FLASH_B0F1 0x00000002 |
#define | FLASH_B0F2 0x00000004 |
#define | FLASH_B0F3 0x00000008 |
#define | FLASH_B0F4 0x00000010 |
#define | FLASH_B0F5 0x00000020 |
#define | FLASH_B0F6 0x00000040 |
#define | FLASH_B0F7 0x00000080 |
#define | FLASH_B0S 0x01000000 |
#define | FLASH_B1F0 0x00010000 |
#define | FLASH_B1F1 0x00020000 |
#define | FLASH_B1S 0x02000000 |
#define | FLASH_BER 0x04000000 |
#define | FLASH_BSYA0 0x00000002 |
#define | FLASH_BSYA1 0x00000004 |
#define | FLASH_CR0 0x00000000 |
#define | FLASH_CR1 0x00000004 |
#define | FLASH_DR0 0x00000008 |
#define | FLASH_DR1 0x0000000C |
#define | FLASH_DWPG 0x10000000 |
#define | FLASH_ER 0x00000014 |
#define | FLASH_ERER 0x00000002 |
#define | FLASH_ERR 0x00000001 |
#define | FLASH_LOCK 0x00000010 |
#define | FLASH_MER 0x02000000 |
#define | FLASH_NVAPR0 0x0000DFB8 |
#define | FLASH_NVAPR1 0x0000DFBC |
#define | FLASH_NVWPAR 0x0000DFB0 |
#define | FLASH_PGER 0x00000004 |
#define | FLASH_RESER 0x00000080 |
#define | FLASH_SEQER 0x00000040 |
#define | FLASH_SER 0x08000000 |
#define | FLASH_SPR 0x01000000 |
#define | FLASH_SUSP 0x40000000 |
#define | FLASH_WMS 0x80000000 |
#define | FLASH_WPF 0x00000100 |
#define | FLASH_WPG 0x20000000 |
Enumerations | |
enum | str7x_status_codes { STR7X_CMD_SUCCESS = 0 , STR7X_INVALID_COMMAND = 1 , STR7X_SRC_ADDR_ERROR = 2 , STR7X_DST_ADDR_ERROR = 3 , STR7X_SRC_ADDR_NOT_MAPPED = 4 , STR7X_DST_ADDR_NOT_MAPPED = 5 , STR7X_COUNT_ERROR = 6 , STR7X_INVALID_SECTOR = 7 , STR7X_SECTOR_NOT_BLANK = 8 , STR7X_SECTOR_NOT_PREPARED = 9 , STR7X_COMPARE_ERROR = 10 , STR7X_BUSY = 11 } |
Functions | |
COMMAND_HANDLER (str7x_handle_disable_jtag_command) | |
FLASH_BANK_COMMAND_HANDLER (str7x_flash_bank_command) | |
static int | get_str7x_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | str7x_build_block_list (struct flash_bank *bank) |
static int | str7x_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | str7x_get_flash_adr (struct flash_bank *bank, uint32_t reg) |
static int | str7x_probe (struct flash_bank *bank) |
static int | str7x_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | str7x_protect_check (struct flash_bank *bank) |
static int | str7x_result (struct flash_bank *bank) |
static int | str7x_waitbusy (struct flash_bank *bank) |
static int | str7x_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | str7x_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static const struct str7x_mem_layout | mem_layout_str7bank0 [] |
static const struct str7x_mem_layout | mem_layout_str7bank1 [] |
static const struct command_registration | str7x_command_handlers [] |
static const struct command_registration | str7x_exec_command_handlers [] |
const struct flash_driver | str7x_flash |
enum str7x_status_codes |
COMMAND_HANDLER | ( | str7x_handle_disable_jtag_command | ) |
Definition at line 703 of file str7x.c.
References bank, CALL_COMMAND_HANDLER, CMD_ARGC, str7x_flash_bank::disable_bit, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_AR, FLASH_CR0, FLASH_DR0, FLASH_NVAPR0, FLASH_NVAPR1, FLASH_SPR, FLASH_WMS, LOG_ERROR, NULL, target::state, str7x_get_flash_adr(), TARGET_HALTED, target_read_u32(), and target_write_u32().
FLASH_BANK_COMMAND_HANDLER | ( | str7x_flash_bank_command | ) |
Definition at line 186 of file str7x.c.
References bank, str7x_flash_bank::busy_bits, CMD_ARGC, CMD_ARGV, str7x_flash_bank::disable_bit, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FLASH_BANK_INVALID, ERROR_OK, FLASH_BSYA0, FLASH_BSYA1, FLASH_LOCK, LOG_ERROR, str7x_flash_bank::register_base, and str7x_build_block_list().
|
static |
Definition at line 691 of file str7x.c.
References cmd, command_print_sameline(), and ERROR_OK.
|
static |
Definition at line 125 of file str7x.c.
References bank, ERROR_OK, LOG_ERROR, mem_layout_str7bank0, mem_layout_str7bank1, str7x_mem_layout::sector_bit, str7x_flash_bank::sector_bits, str7x_mem_layout::sector_size, and str7x_mem_layout::sector_start.
Referenced by FLASH_BANK_COMMAND_HANDLER().
|
static |
Definition at line 320 of file str7x.c.
References bank, cmd, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_CR0, FLASH_CR1, FLASH_ER, FLASH_SER, FLASH_WMS, LOG_DEBUG, LOG_ERROR, str7x_flash_bank::sector_bits, str7x_get_flash_adr(), str7x_result(), str7x_waitbusy(), TARGET_HALTED, and target_write_u32().
|
static |
Definition at line 119 of file str7x.c.
References bank, and str7x_flash_bank::register_base.
Referenced by COMMAND_HANDLER(), str7x_erase(), str7x_protect(), str7x_protect_check(), str7x_result(), str7x_waitbusy(), str7x_write(), and str7x_write_block().
|
static |
|
static |
Definition at line 371 of file str7x.c.
References bank, cmd, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_AR, FLASH_CR0, FLASH_DR0, FLASH_ER, FLASH_NVWPAR, FLASH_SPR, FLASH_WMS, LOG_ERROR, str7x_flash_bank::sector_bits, str7x_get_flash_adr(), str7x_result(), str7x_waitbusy(), TARGET_HALTED, and target_write_u32().
|
static |
Definition at line 293 of file str7x.c.
References bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_NVWPAR, LOG_ERROR, str7x_flash_bank::sector_bits, str7x_get_flash_adr(), TARGET_HALTED, and target_read_u32().
|
static |
Definition at line 252 of file str7x.c.
References bank, ERROR_FAIL, ERROR_OK, FLASH_10ER, FLASH_ER, FLASH_ERER, FLASH_ERR, FLASH_PGER, FLASH_RESER, FLASH_WPF, LOG_ERROR, str7x_get_flash_adr(), and target_read_u32().
Referenced by str7x_erase(), str7x_protect(), str7x_write(), and str7x_write_block().
|
static |
Definition at line 229 of file str7x.c.
References alive_sleep(), bank, str7x_flash_bank::busy_bits, ERROR_FAIL, ERROR_OK, FLASH_CR0, LOG_ERROR, str7x_get_flash_adr(), and target_read_u32().
Referenced by str7x_erase(), str7x_protect(), and str7x_write().
|
static |
Definition at line 545 of file str7x.c.
References bank, buffer, cmd, count, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_DST_OUT_OF_BANK, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_AR, FLASH_CR0, FLASH_DR0, FLASH_DR1, FLASH_DWPG, FLASH_ER, FLASH_WMS, LOG_ERROR, LOG_WARNING, offset, str7x_get_flash_adr(), str7x_result(), str7x_waitbusy(), str7x_write_block(), TARGET_HALTED, target_write_memory(), and target_write_u32().
|
static |
Definition at line 428 of file str7x.c.
References working_area::address, ARM_COMMON_MAGIC, ARM_MODE_SVC, ARM_STATE_ARM, ARRAY_SIZE, bank, buf_get_u32(), buf_set_u32(), buffer, str7x_flash_bank::busy_bits, arm_algorithm::common_magic, arm_algorithm::core_mode, arm_algorithm::core_state, count, destroy_reg_param(), ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, FLASH_CR0, init_reg_param(), LOG_WARNING, NULL, offset, PARAM_IN, PARAM_OUT, source, str7x_get_flash_adr(), str7x_result(), target_alloc_working_area_try(), target_buffer_set_u32_array(), target_free_working_area(), target_run_algorithm(), and target_write_buffer().
Referenced by str7x_write().
|
static |
Definition at line 1 of file str7x.c.
Referenced by str7x_build_block_list().
|
static |
Definition at line 1 of file str7x.c.
Referenced by str7x_build_block_list().
|
static |
|
static |
const struct flash_driver str7x_flash |