OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | str9x_flash_bank |
Macros | |
#define | FLASH_BBADR 0x5400000C /* Boot Bank Base Address Register */ |
#define | FLASH_BBSR 0x54000000 /* Boot Bank Size Register */ |
#define | FLASH_BCE5ADDR 0x54000020 /* BC Fifth Entry Target Address Register */ |
#define | FLASH_CR 0x54000018 /* Control Register */ |
#define | FLASH_NBBADR 0x54000010 /* Non-Boot Bank Base Address Register */ |
#define | FLASH_NBBSR 0x54000004 /* Non-Boot Bank Size Register */ |
#define | FLASH_SR 0x5400001C /* Status Register */ |
Enumerations | |
enum | str9x_status_codes { STR9X_CMD_SUCCESS = 0 , STR9X_INVALID_COMMAND = 1 , STR9X_SRC_ADDR_ERROR = 2 , STR9X_DST_ADDR_ERROR = 3 , STR9X_SRC_ADDR_NOT_MAPPED = 4 , STR9X_DST_ADDR_NOT_MAPPED = 5 , STR9X_COUNT_ERROR = 6 , STR9X_INVALID_SECTOR = 7 , STR9X_SECTOR_NOT_BLANK = 8 , STR9X_SECTOR_NOT_PREPARED = 9 , STR9X_COMPARE_ERROR = 10 , STR9X_BUSY = 11 } |
Functions | |
COMMAND_HANDLER (str9x_handle_flash_config_command) | |
FLASH_BANK_COMMAND_HANDLER (str9x_flash_bank_command) | |
static int | str9x_build_block_list (struct flash_bank *bank) |
static int | str9x_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | str9x_probe (struct flash_bank *bank) |
static int | str9x_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | str9x_protect_check (struct flash_bank *bank) |
static int | str9x_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | str9x_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static uint32_t | bank1start = 0x00080000 |
static const struct command_registration | str9x_command_handlers [] |
static const struct command_registration | str9x_config_command_handlers [] |
const struct flash_driver | str9x_flash |
#define FLASH_BBADR 0x5400000C /* Boot Bank Base Address Register */ |
#define FLASH_BCE5ADDR 0x54000020 /* BC Fifth Entry Target Address Register */ |
#define FLASH_NBBADR 0x54000010 /* Non-Boot Bank Base Address Register */ |
#define FLASH_NBBSR 0x54000004 /* Non-Boot Bank Size Register */ |
enum str9x_status_codes |
COMMAND_HANDLER | ( | str9x_handle_flash_config_command | ) |
Definition at line 591 of file str9x.c.
References arm966e_write_cp15(), bank, CALL_COMMAND_HANDLER, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_NOT_HALTED, FLASH_BBADR, FLASH_BBSR, FLASH_CR, FLASH_NBBADR, FLASH_NBBSR, LOG_ERROR, NULL, TARGET_HALTED, and target_write_u32().
FLASH_BANK_COMMAND_HANDLER | ( | str9x_flash_bank_command | ) |
Definition at line 135 of file str9x.c.
References bank, CMD_ARGC, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and str9x_build_block_list().
|
static |
Definition at line 55 of file str9x.c.
References bank, str9x_flash_bank::bank1, bank1start, ERROR_OK, LOG_ERROR, offset, str9x_flash_bank::sector_bits, and str9x_flash_bank::variant.
Referenced by FLASH_BANK_COMMAND_HANDLER().
|
static |
Definition at line 212 of file str9x.c.
References alive_sleep(), bank, ERROR_FAIL, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, status, TARGET_HALTED, target_read_u8(), and target_write_u16().
|
static |
|
static |
Definition at line 295 of file str9x.c.
References bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, status, TARGET_HALTED, target_read_u8(), and target_write_u16().
|
static |
Definition at line 150 of file str9x.c.
References bank, str9x_flash_bank::bank1, bank1start, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, str9x_flash_bank::sector_bits, status, TARGET_HALTED, target_read_u16(), target_read_u32(), target_write_u16(), and str9x_flash_bank::variant.
|
static |
Definition at line 443 of file str9x.c.
References alive_sleep(), bank, buffer, count, ERROR_FAIL, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_DST_OUT_OF_BANK, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_ERROR, LOG_WARNING, offset, status, str9x_write_block(), TARGET_HALTED, target_read_u8(), target_write_memory(), and target_write_u16().
|
static |
Definition at line 331 of file str9x.c.
References working_area::address, ARM_COMMON_MAGIC, ARM_MODE_SVC, ARM_STATE_ARM, ARRAY_SIZE, bank, buf_get_u32(), buf_set_u32(), buffer, arm_algorithm::common_magic, arm_algorithm::core_mode, arm_algorithm::core_state, count, destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_ERROR, LOG_WARNING, NULL, offset, PARAM_IN, PARAM_OUT, source, target_alloc_working_area(), target_alloc_working_area_try(), target_buffer_set_u32_array(), target_free_working_area(), target_run_algorithm(), and target_write_buffer().
Referenced by str9x_write().
|
static |
Definition at line 53 of file str9x.c.
Referenced by str9x_build_block_list(), and str9x_protect_check().
|
static |
|
static |
const struct flash_driver str9x_flash |