OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | psoc4_chip_family |
struct | psoc4_flash_bank |
Functions | |
COMMAND_HANDLER (psoc4_handle_flash_autoerase_command) | |
COMMAND_HANDLER (psoc4_handle_mass_erase_command) | |
FLASH_BANK_COMMAND_HANDLER (psoc4_flash_bank_command) | |
static int | get_psoc4_info (struct flash_bank *bank, struct command_invocation *cmd) |
static int | psoc4_auto_probe (struct flash_bank *bank) |
static const char * | psoc4_decode_chip_protection (uint8_t protection) |
static int | psoc4_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static const struct psoc4_chip_family * | psoc4_family_by_id (uint16_t family_id) |
static int | psoc4_flash_prepare (struct flash_bank *bank) |
static int | psoc4_get_family (struct target *target, uint16_t *family_id) |
static int | psoc4_get_silicon_id (struct flash_bank *bank, uint32_t *silicon_id, uint16_t *family_id, uint8_t *protection) |
static int | psoc4_mass_erase (struct flash_bank *bank) |
static int | psoc4_probe (struct flash_bank *bank) |
static int | psoc4_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | psoc4_protect_check (struct flash_bank *bank) |
static int | psoc4_sysreq (struct flash_bank *bank, uint8_t cmd, uint16_t cmd_param, uint32_t *sysreq_params, uint32_t sysreq_params_size, uint32_t *sysarg_out) |
static int | psoc4_test_flash_wounding (struct target *target, uint32_t flash_size) |
static int | psoc4_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
static const struct command_registration | psoc4_command_handlers [] |
static const struct command_registration | psoc4_exec_command_handlers [] |
static const struct psoc4_chip_family | psoc4_families [] |
const struct flash_driver | psoc4_flash |
COMMAND_HANDLER | ( | psoc4_handle_flash_autoerase_command | ) |
Definition at line 602 of file psoc4.c.
References bank, CALL_COMMAND_HANDLER, CMD_ARGC, CMD_ARGV, psoc4_flash_bank::cmd_program_row, COMMAND_PARSE_ON_OFF, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, LOG_INFO, PSOC4_CMD_PROGRAM_ROW, and PSOC4_CMD_WRITE_ROW.
COMMAND_HANDLER | ( | psoc4_handle_mass_erase_command | ) |
Definition at line 876 of file psoc4.c.
References bank, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, and psoc4_mass_erase().
FLASH_BANK_COMMAND_HANDLER | ( | psoc4_flash_bank_command | ) |
Definition at line 189 of file psoc4.c.
References bank, CMD_ARGC, psoc4_flash_bank::cmd_program_row, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, PSOC4_CMD_WRITE_ROW, and psoc4_flash_bank::user_bank_size.
|
static |
Definition at line 836 of file psoc4.c.
References bank, cmd, command_print_sameline(), ERROR_FAIL, ERROR_OK, psoc4_flash_bank::family_id, psoc4_chip_family::name, psoc4_flash_bank::probed, psoc4_decode_chip_protection(), psoc4_family_by_id(), psoc4_get_silicon_id(), target::state, and TARGET_HALTED.
|
static |
Definition at line 827 of file psoc4.c.
References bank, ERROR_OK, psoc4_flash_bank::probed, and psoc4_probe().
|
static |
Definition at line 169 of file psoc4.c.
References LOG_WARNING, PSOC4_CHIP_PROT_KILL, PSOC4_CHIP_PROT_OPEN, PSOC4_CHIP_PROT_PROTECTED, and PSOC4_CHIP_PROT_VIRGIN.
Referenced by get_psoc4_info().
|
static |
Definition at line 518 of file psoc4.c.
References bank, psoc4_flash_bank::cmd_program_row, ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, PSOC4_CMD_WRITE_ROW, and psoc4_mass_erase().
|
static |
Definition at line 160 of file psoc4.c.
References psoc4_chip_family::id, and psoc4_families.
Referenced by get_psoc4_info(), and psoc4_probe().
|
static |
Definition at line 433 of file psoc4.c.
References bank, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, psoc4_flash_bank::family_id, psoc4_flash_bank::legacy_family, LOG_ERROR, LOG_INFO, NULL, PSOC4_CMD_SET_IMO48, psoc4_get_silicon_id(), PSOC4_SROM_ERR_IMO_NOT_IMPLEM, PSOC4_SROM_STATUS_MASK, PSOC4_SROM_STATUS_SUCCEEDED, psoc4_sysreq(), target::state, and TARGET_HALTED.
Referenced by psoc4_mass_erase(), psoc4_protect(), and psoc4_write().
|
static |
Definition at line 401 of file psoc4.c.
References ERROR_FAIL, ERROR_OK, psoc4_flash_bank::family_id, LOG_ERROR, PSOC4_ROMTABLE_DESIGNER_CHECK, PSOC4_ROMTABLE_PID0, target_buffer_get_u32(), and target_read_memory().
Referenced by psoc4_probe().
|
static |
Definition at line 361 of file psoc4.c.
References bank, psoc4_flash_bank::cpuss_sysreq_addr, ERROR_FAIL, ERROR_OK, psoc4_flash_bank::family_id, LOG_ERROR, NULL, PSOC4_CMD_GET_SILICON_ID, PSOC4_SROM_STATUS_MASK, PSOC4_SROM_STATUS_SUCCEEDED, psoc4_sysreq(), and target_read_u32().
Referenced by get_psoc4_info(), and psoc4_flash_prepare().
|
static |
Definition at line 504 of file psoc4.c.
References bank, ERROR_OK, NULL, param, PSOC4_CMD_ERASE_ALL, psoc4_flash_prepare(), and psoc4_sysreq().
Referenced by COMMAND_HANDLER(), and psoc4_erase().
|
static |
Definition at line 719 of file psoc4.c.
References alloc_block_array(), bank, psoc4_flash_bank::cpuss_sysarg_addr, psoc4_flash_bank::cpuss_sysreq_addr, ERROR_FAIL, ERROR_OK, psoc4_flash_bank::family_id, psoc4_chip_family::flags, psoc4_chip_family::id, psoc4_flash_bank::legacy_family, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, psoc4_chip_family::name, psoc4_flash_bank::num_macros, psoc4_flash_bank::probed, PSOC4_CPUSS_SYSARG_LEGACY, PSOC4_CPUSS_SYSARG_NEW, PSOC4_CPUSS_SYSREQ_LEGACY, PSOC4_CPUSS_SYSREQ_NEW, psoc4_family_by_id(), PSOC4_FAMILY_FLAG_LEGACY, psoc4_get_family(), PSOC4_ROWS_PER_MACRO, PSOC4_SPCIF_GEOMETRY_LEGACY, PSOC4_SPCIF_GEOMETRY_NEW, psoc4_test_flash_wounding(), psoc4_flash_bank::row_size, psoc4_flash_bank::spcif_geometry_addr, target_read_u32(), and psoc4_flash_bank::user_bank_size.
Referenced by psoc4_auto_probe().
|
static |
Definition at line 536 of file psoc4.c.
References bank, ERROR_FAIL, ERROR_OK, LOG_ERROR, NULL, psoc4_flash_bank::num_macros, psoc4_flash_bank::probed, PSOC4_CHIP_PROT_OPEN, PSOC4_CMD_LOAD_LATCH, PSOC4_CMD_WRITE_PROTECTION, psoc4_flash_prepare(), psoc4_protect_check(), PSOC4_ROWS_PER_MACRO, psoc4_sysreq(), and target_buffer_set_u32().
|
static |
Definition at line 481 of file psoc4.c.
References bank, ERROR_OK, psoc4_flash_bank::num_macros, PSOC4_ROWS_PER_MACRO, PSOC4_SFLASH_MACRO0, PSOC4_SFLASH_MACRO_SIZE, and target_read_memory().
Referenced by psoc4_protect().
|
static |
Definition at line 214 of file psoc4.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_set_u32(), cmd, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, psoc4_flash_bank::cpuss_sysarg_addr, psoc4_flash_bank::cpuss_sysreq_addr, destroy_reg_param(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, PARAM_OUT, PSOC4_SROM_HMASTER_BIT, PSOC4_SROM_KEY1, PSOC4_SROM_KEY2, PSOC4_SROM_STATUS_MASK, PSOC4_SROM_STATUS_SUCCEEDED, PSOC4_SROM_SYSREQ_BIT, working_area::size, target_alloc_working_area(), target_buffer_set_u32(), target_free_working_area(), target_read_u32(), target_run_algorithm(), target_to_armv7m(), target_write_buffer(), and target_write_u32().
Referenced by psoc4_flash_prepare(), psoc4_get_silicon_id(), psoc4_mass_erase(), psoc4_protect(), and psoc4_write().
|
static |
Definition at line 705 of file psoc4.c.
References addr, dummy, ERROR_OK, and target_read_u32().
Referenced by psoc4_probe().
|
static |
Definition at line 630 of file psoc4.c.
References bank, buffer, psoc4_flash_bank::cmd_program_row, count, ERROR_FAIL, ERROR_OK, jtag_poll_mask(), jtag_poll_unmask(), LOG_DEBUG, LOG_ERROR, NULL, offset, PSOC4_CMD_LOAD_LATCH, psoc4_flash_prepare(), PSOC4_ROWS_PER_MACRO, psoc4_sysreq(), psoc4_flash_bank::row_size, and target_buffer_set_u32().
|
static |
|
static |
|
static |
Definition at line 1 of file psoc4.c.
Referenced by psoc4_family_by_id().
const struct flash_driver psoc4_flash |