OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | rsl10_info::rsl10_bank |
struct | rsl10_info |
Enumerations | |
enum | rsl10_flash_status { RSL10_FLASH_ERR_NONE = 0x0 , RSL10_FLASH_ERR_GENERAL_FAILURE = 0x1 , RSL10_FLASH_ERR_WRITE_NOT_ENABLED = 0x2 , RSL10_FLASH_ERR_BAD_ADDRESS = 0x3 , RSL10_FLASH_ERR_ERASE_FAILED = 0x4 , RSL10_FLASH_ERR_BAD_LENGTH = 0x5 , RSL10_FLASH_ERR_INACCESSIBLE = 0x6 , RSL10_FLASH_ERR_COPIER_BUSY = 0x7 , RSL10_FLASH_ERR_PROG_FAILED = 0x8 , RSL10_FLASH_MAX_ERR_CODES } |
Functions | |
COMMAND_HANDLER (rsl10_lock_command) | |
COMMAND_HANDLER (rsl10_mass_erase_command) | |
COMMAND_HANDLER (rsl10_unlock_command) | |
FLASH_BANK_COMMAND_HANDLER (rsl10_flash_bank_command) | |
static int | rsl10_auto_probe (struct flash_bank *bank) |
static bool | rsl10_bank_is_probed (const struct flash_bank *bank) |
static int | rsl10_check_device (struct flash_bank *bank) |
static int | rsl10_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
const char * | rsl10_error (enum rsl10_flash_status x) |
static void | rsl10_free_driver_priv (struct flash_bank *bank) |
static struct rsl10_info * | rsl10_get_chip (struct target *target) |
static int | rsl10_get_probed_chip_if_halted (struct flash_bank *bank, struct rsl10_info **chip) |
static int | rsl10_ll_flash_erase (struct rsl10_info *chip, uint32_t address) |
static int | rsl10_ll_flash_write (struct rsl10_info *chip, uint32_t address, const uint8_t *buffer, uint32_t bytes) |
static int | rsl10_mass_erase (struct target *target) |
static int | rsl10_probe (struct flash_bank *bank) |
static int | rsl10_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | rsl10_protect_check (struct flash_bank *bank) |
static int | rsl10_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static const struct command_registration | rsl10_command_handlers [] |
static const char *const | rsl10_error_list [] |
static const struct command_registration | rsl10_exec_command_handlers [] |
const struct flash_driver | rsl10_flash |
static const uint8_t | rsl10_rom_launcher_code [] |
#define RSL10_ROM_CMD_WRITE_BUFFER_MAX_SIZE FLASH_SECTOR_SIZE |
enum rsl10_flash_status |
COMMAND_HANDLER | ( | rsl10_lock_command | ) |
Definition at line 674 of file rsl10.c.
References bank, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), get_flash_bank_by_addr(), LOG_INFO, rsl10_erase(), RSL10_FLASH_ADDRESS_NVR3, RSL10_KEY_DEBUG_LOCK, RSL10_NVR3_USER_KEY_OFFSET, rsl10_protect(), rsl10_write(), target_buffer_set_u32(), and target_buffer_set_u32_array().
COMMAND_HANDLER | ( | rsl10_mass_erase_command | ) |
Definition at line 781 of file rsl10.c.
References CMD, CMD_ARGC, CMD_CTX, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), and rsl10_mass_erase().
COMMAND_HANDLER | ( | rsl10_unlock_command | ) |
Definition at line 721 of file rsl10.c.
References armv7m_common::arm, cortex_m_common::armv7m, bank, CMD, CMD_ARGC, CMD_ARGV, CMD_CTX, COMMAND_PARSE_NUMBER, command_print(), command_run_line(), arm::dap, adiv5_ap::dap, dap_get_ap(), dap_put_ap(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_current_target(), get_flash_bank_by_addr(), LOG_INFO, mem_ap_read_atomic_u32(), mem_ap_write_buf(), RSL10_FLASH_ADDRESS_LOCK_INFO_SETTING, RSL10_FLASH_ADDRESS_NVR3, RSL10_FLASH_REG_DEBUG_UNLOCK_KEY1, RSL10_KEY_DEBUG_LOCK, RSL10_NVR3_USER_KEY_OFFSET, rsl10_protect(), rsl10_write(), target_buffer_set_u32(), target_buffer_set_u32_array(), and target_to_cm().
FLASH_BANK_COMMAND_HANDLER | ( | rsl10_flash_bank_command | ) |
Definition at line 620 of file rsl10.c.
References rsl10_info::bank, bank, ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, NULL, rsl10_info::refcount, RSL10_FLASH_ADDRESS_MAIN, RSL10_FLASH_ADDRESS_NVR1, RSL10_FLASH_ADDRESS_NVR2, RSL10_FLASH_ADDRESS_NVR3, RSL10_FLASH_ADDRESS_NVR4, rsl10_get_chip(), rsl10_info::target, and TARGET_ADDR_FMT.
|
static |
Definition at line 332 of file rsl10.c.
References bank, ERROR_OK, rsl10_bank_is_probed(), and rsl10_probe().
|
static |
Definition at line 131 of file rsl10.c.
References bank.
Referenced by rsl10_auto_probe(), and rsl10_get_probed_chip_if_halted().
|
static |
Definition at line 260 of file rsl10.c.
References bank, ERROR_OK, ERROR_TARGET_INVALID, LOG_ERROR, RSL10_ID, RSL10_REG_ID, and target_read_u32().
Referenced by rsl10_probe().
|
static |
Definition at line 565 of file rsl10.c.
References bank, ERROR_OK, LOG_INFO, rsl10_get_probed_chip_if_halted(), and rsl10_ll_flash_erase().
Referenced by COMMAND_HANDLER().
const char* rsl10_error | ( | enum rsl10_flash_status | x | ) |
Definition at line 110 of file rsl10.c.
References rsl10_error_list, and RSL10_FLASH_MAX_ERR_CODES.
Referenced by rsl10_ll_flash_erase(), rsl10_ll_flash_write(), and rsl10_mass_erase().
|
static |
Definition at line 584 of file rsl10.c.
References bank, NULL, and rsl10_info::refcount.
|
static |
Definition at line 598 of file rsl10.c.
References flash_bank::driver, flash_bank::driver_priv, flash_bank_list(), flash_bank::next, NULL, rsl10_flash, and flash_bank::target.
Referenced by FLASH_BANK_COMMAND_HANDLER().
|
static |
Definition at line 140 of file rsl10.c.
References bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_ERROR, rsl10_bank_is_probed(), rsl10_probe(), and TARGET_HALTED.
Referenced by rsl10_erase(), rsl10_protect(), and rsl10_write().
|
static |
Definition at line 340 of file rsl10.c.
References working_area::address, ALGO_STACK_POINTER_ADDR, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), cmd, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), ERROR_FAIL, ERROR_FLASH_SECTOR_NOT_ERASED, ERROR_OK, init_reg_param(), LOG_DEBUG, LOG_ERROR, NULL, PARAM_IN_OUT, PARAM_OUT, rsl10_error(), RSL10_FLASH_ERR_NONE, RSL10_ROM_CMD_ERASE_SECTOR, rsl10_rom_launcher_code, rsl10_info::target, target_alloc_working_area(), target_free_working_area(), target_read_u32(), target_run_algorithm(), target_write_buffer(), and target::working_area_size.
Referenced by rsl10_erase().
|
static |
Definition at line 397 of file rsl10.c.
References working_area::address, ALGO_STACK_POINTER_ADDR, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), buffer, cmd, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), ERROR_FAIL, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, init_reg_param(), LOG_DEBUG, LOG_ERROR, MIN, NULL, PARAM_IN_OUT, PARAM_OUT, rsl10_error(), RSL10_FLASH_ERR_NONE, RSL10_ROM_CMD_WRITE_BUFFER, RSL10_ROM_CMD_WRITE_BUFFER_MAX_SIZE, rsl10_rom_launcher_code, source, rsl10_info::target, target_alloc_working_area(), target_free_working_area(), target_get_working_area_avail(), target_read_u32(), target_run_algorithm(), target_write_buffer(), and target::working_area_size.
Referenced by rsl10_write().
|
static |
Definition at line 501 of file rsl10.c.
References working_area::address, ALGO_STACK_POINTER_ADDR, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, buf_get_u32(), buf_set_u32(), cmd, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, destroy_reg_param(), ERROR_FAIL, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, init_reg_param(), LOG_ERROR, NULL, PARAM_IN_OUT, PARAM_OUT, rsl10_error(), RSL10_FLASH_ERR_NONE, RSL10_ROM_CMD_ERASE_ALL, rsl10_rom_launcher_code, target_alloc_working_area(), target_free_working_area(), target_read_u32(), target_run_algorithm(), target_write_buffer(), and target::working_area_size.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 274 of file rsl10.c.
References alloc_block_array(), rsl10_info::bank, bank, ERROR_FAIL, ERROR_OK, rsl10_info::flash_size_kb, NULL, rsl10_info::rsl10_bank::probed, rsl10_check_device(), RSL10_FLASH_ADDRESS_MAIN, RSL10_FLASH_ADDRESS_NVR1, RSL10_FLASH_ADDRESS_NVR2, and RSL10_FLASH_ADDRESS_NVR3.
Referenced by rsl10_auto_probe(), and rsl10_get_probed_chip_if_halted().
|
static |
Definition at line 194 of file rsl10.c.
References bank, bit(), ERROR_OK, RSL10_FLASH_ADDRESS_MAIN, RSL10_FLASH_ADDRESS_NVR1, RSL10_FLASH_ADDRESS_NVR2, RSL10_FLASH_ADDRESS_NVR3, RSL10_FLASH_KEY_MAIN, RSL10_FLASH_KEY_NVR, RSL10_FLASH_REG_MAIN_CTRL, RSL10_FLASH_REG_MAIN_WRITE_UNLOCK, RSL10_FLASH_REG_NVR_CTRL, RSL10_FLASH_REG_NVR_CTRL_NVR1_W_ENABLE, RSL10_FLASH_REG_NVR_CTRL_NVR2_W_ENABLE, RSL10_FLASH_REG_NVR_CTRL_NVR3_W_ENABLE, RSL10_FLASH_REG_NVR_WRITE_UNLOCK, rsl10_get_probed_chip_if_halted(), status, target_read_u32(), and target_write_u32().
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 156 of file rsl10.c.
References bank, ERROR_OK, RSL10_FLASH_ADDRESS_MAIN, RSL10_FLASH_ADDRESS_NVR1, RSL10_FLASH_ADDRESS_NVR2, RSL10_FLASH_ADDRESS_NVR3, RSL10_FLASH_REG_IF_STATUS, RSL10_FLASH_REG_STATUS_NVR1_W_UNLOCKED, RSL10_FLASH_REG_STATUS_NVR2_W_UNLOCKED, RSL10_FLASH_REG_STATUS_NVR3_W_UNLOCKED, status, target_read_u32(), and test_bit().
|
static |
Definition at line 554 of file rsl10.c.
References bank, buffer, count, ERROR_OK, offset, rsl10_get_probed_chip_if_halted(), and rsl10_ll_flash_write().
Referenced by COMMAND_HANDLER().
|
static |
|
static |
Definition at line 99 of file rsl10.c.
Referenced by rsl10_error().
|
static |
const struct flash_driver rsl10_flash |
Definition at line 110 of file rsl10.c.
Referenced by rsl10_get_chip().
|
static |
Definition at line 82 of file rsl10.c.
Referenced by rsl10_ll_flash_erase(), rsl10_ll_flash_write(), and rsl10_mass_erase().