|
OpenOCD
|

Go to the source code of this file.
Data Structures | |
| struct | am13_algo_params |
| struct | am13_flash_bank |
Functions | |
| static int | am13_algo_init (struct flash_bank *bank) |
| static int | am13_algo_quit (struct flash_bank *bank) |
| static int | am13_algo_wait_done (struct flash_bank *bank, uint32_t params_addr) |
| static int | am13_auto_probe (struct flash_bank *bank) |
| static int | am13_clear_gsc_semaphore (struct flash_bank *bank) |
| static int | am13_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
| static int | am13_fctl_clear_status (struct flash_bank *bank) |
| static int | am13_fctl_erase (struct flash_bank *bank, uint32_t addr, uint32_t cmd_size) |
| static const char * | am13_fctl_strerror (uint32_t status) |
| static int | am13_fctl_unprotect (struct flash_bank *bank) |
| static int | am13_fctl_wait_done (struct flash_bank *bank) |
| static int | am13_probe (struct flash_bank *bank) |
| static int | am13_request_gsc_semaphore (struct flash_bank *bank) |
| static int | am13_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
| static int | am13_write_direct (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
| FLASH_BANK_COMMAND_HANDLER (am13_flash_bank_command) | |
| static int | get_am13_info (struct flash_bank *bank, struct command_invocation *cmd) |
Variables | |
| static const uint8_t | am13_algo [] |
| struct { | |
| unsigned char bit | |
| const char * name | |
| } | am13_fctl_errors [] |
| const struct flash_driver | am13_flash |
| #define AM13_ALGO_BASE 0x20000000 |
Definition at line 85 of file am13e230x.c.
| #define AM13_ALGO_BUFFER_0 0x20002100 |
Definition at line 92 of file am13e230x.c.
| #define AM13_ALGO_BUFFER_1 0x20002900 |
Definition at line 93 of file am13e230x.c.
| #define AM13_ALGO_PARAMS_0 0x20002000 |
Definition at line 88 of file am13e230x.c.
| #define AM13_ALGO_PARAMS_1 0x20002014 |
Definition at line 89 of file am13e230x.c.
| #define AM13_ALGO_WORKING_SIZE (AM13_ALGO_BUFFER_1 + 0x800 - AM13_ALGO_BASE) |
Definition at line 96 of file am13e230x.c.
| #define AM13_BUFFER_EMPTY 0x00000000 |
Definition at line 99 of file am13e230x.c.
| #define AM13_BUFFER_FULL 0xFFFFFFFF |
Definition at line 100 of file am13e230x.c.
| #define AM13_CMD_ERASE_AND_PROGRAM 2 |
Definition at line 108 of file am13e230x.c.
| #define AM13_CMD_ERASE_SECTORS 3 |
Definition at line 109 of file am13e230x.c.
| #define AM13_CMD_NO_ACTION 0 |
Definition at line 106 of file am13e230x.c.
| #define AM13_CMD_PROGRAM 1 |
Definition at line 107 of file am13e230x.c.
| #define AM13_DID (AM13_FACTORYREGION + 0x004) /* JTAGIDCODE */ |
Definition at line 44 of file am13e230x.c.
| #define AM13_FACTORYREGION 0x60111000 |
Definition at line 42 of file am13e230x.c.
| #define AM13_FLASH_BASE_MAIN 0x00000000 |
Definition at line 25 of file am13e230x.c.
| #define AM13_FLASH_BASE_NONMAIN 0x60100000 |
Definition at line 26 of file am13e230x.c.
| #define AM13_FLASH_TIMEOUT_MS 8000 |
Definition at line 80 of file am13e230x.c.
| #define AM13_FLASH_WORD_SIZE 16 |
Definition at line 78 of file am13e230x.c.
| #define AM13_NONMAIN_SIZE_PER_BANK 0x1000 |
Definition at line 27 of file am13e230x.c.
| #define AM13_SECTOR_SIZE_BYTES 0x800 |
Definition at line 81 of file am13e230x.c.
| #define AM13_SRAMFLASH (AM13_FACTORYREGION + 0x01C) |
Definition at line 45 of file am13e230x.c.
| #define AM13_STATUS_OFFSET 0x0C |
Definition at line 103 of file am13e230x.c.
| #define AM13_TRACEID (AM13_FACTORYREGION + 0x000) |
Definition at line 43 of file am13e230x.c.
| #define FCTL_CMDEXEC_EXECUTE 0x00000001 |
Definition at line 71 of file am13e230x.c.
| #define FCTL_CMDTYPE_CLEARSTATUS 0x00000005 |
Definition at line 74 of file am13e230x.c.
| #define FCTL_CMDTYPE_ERASE 0x00000002 |
Definition at line 73 of file am13e230x.c.
| #define FCTL_CMDTYPE_PROGRAM 0x00000001 |
Definition at line 72 of file am13e230x.c.
| #define FCTL_CMDTYPE_SIZE_ONEWORD 0x00000000 |
Definition at line 75 of file am13e230x.c.
| #define FCTL_CMDTYPE_SIZE_SECTOR 0x00000040 |
Definition at line 76 of file am13e230x.c.
| #define FCTL_REG_CMDADDR (FLASH_CONTROL_BASE + 0x1120) |
Definition at line 51 of file am13e230x.c.
| #define FCTL_REG_CMDBYTEN (FLASH_CONTROL_BASE + 0x1124) |
Definition at line 52 of file am13e230x.c.
| #define FCTL_REG_CMDDATA0 (FLASH_CONTROL_BASE + 0x1130) |
Definition at line 54 of file am13e230x.c.
| #define FCTL_REG_CMDDATAINDEX (FLASH_CONTROL_BASE + 0x112C) |
Definition at line 53 of file am13e230x.c.
| #define FCTL_REG_CMDEXEC (FLASH_CONTROL_BASE + 0x1100) |
Definition at line 49 of file am13e230x.c.
| #define FCTL_REG_CMDTYPE (FLASH_CONTROL_BASE + 0x1104) |
Definition at line 50 of file am13e230x.c.
| #define FCTL_REG_CMDWEPROTA (FLASH_CONTROL_BASE + 0x11D0) |
Definition at line 55 of file am13e230x.c.
| #define FCTL_REG_CMDWEPROTB (FLASH_CONTROL_BASE + 0x11D4) |
Definition at line 56 of file am13e230x.c.
| #define FCTL_REG_CMDWEPROTNM (FLASH_CONTROL_BASE + 0x1210) |
Definition at line 57 of file am13e230x.c.
| #define FCTL_REG_STATCMD (FLASH_CONTROL_BASE + 0x13D0) |
Definition at line 58 of file am13e230x.c.
| #define FCTL_STATCMD_CMDDONE 0x00000001 |
Definition at line 66 of file am13e230x.c.
| #define FCTL_STATCMD_CMDINPROGRESS 0x00000004 |
Definition at line 68 of file am13e230x.c.
| #define FCTL_STATCMD_CMDPASS 0x00000002 |
Definition at line 67 of file am13e230x.c.
| #define FLASH_CONTROL_BASE 0x40042000 |
Definition at line 48 of file am13e230x.c.
| #define GSC_BASE 0x40046000 |
Definition at line 61 of file am13e230x.c.
| #define GSC_REG_FPC_FLSEMCLR (GSC_BASE + 0x1804) |
Definition at line 63 of file am13e230x.c.
| #define GSC_REG_FPC_FLSEMREQ (GSC_BASE + 0x1800) |
Definition at line 62 of file am13e230x.c.
| #define TI_MANUFACTURER_ID 0x17 |
Definition at line 82 of file am13e230x.c.
|
static |
Definition at line 428 of file am13e230x.c.
References working_area::address, am13_algo, AM13_ALGO_BASE, AM13_ALGO_WORKING_SIZE, am13_clear_gsc_semaphore(), ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, am13_flash_bank::armv7m_info, bank, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, LOG_DEBUG, LOG_ERROR, NULL, target_alloc_working_area(), target_free_working_area(), TARGET_PRIxADDR, target_start_algorithm(), target_write_buffer(), and am13_flash_bank::working_area.
Referenced by am13_write().
|
static |
Definition at line 504 of file am13e230x.c.
References am13_clear_gsc_semaphore(), AM13_FLASH_TIMEOUT_MS, am13_flash_bank::armv7m_info, bank, ERROR_OK, NULL, target_free_working_area(), target_halt(), target_wait_algorithm(), and am13_flash_bank::working_area.
Referenced by am13_write().
|
static |
Definition at line 523 of file am13e230x.c.
References AM13_BUFFER_EMPTY, AM13_BUFFER_FULL, AM13_FLASH_TIMEOUT_MS, AM13_STATUS_OFFSET, bank, ERROR_FAIL, ERROR_OK, keep_alive(), LOG_ERROR, status, target_read_u32(), and timeval_ms().
Referenced by am13_write().
|
static |
Definition at line 722 of file am13e230x.c.
References am13_probe(), bank, am13_flash_bank::did, and ERROR_OK.
|
static |
Definition at line 155 of file am13e230x.c.
References bank, ERROR_OK, GSC_REG_FPC_FLSEMCLR, LOG_ERROR, and target_write_u32().
Referenced by am13_algo_init(), am13_algo_quit(), am13_erase(), and am13_write_direct().
|
static |
Definition at line 318 of file am13e230x.c.
References addr, am13_clear_gsc_semaphore(), am13_fctl_erase(), am13_request_gsc_semaphore(), bank, ERROR_OK, ERROR_TARGET_NOT_HALTED, FCTL_CMDTYPE_SIZE_SECTOR, LOG_ERROR, LOG_WARNING, am13_flash_bank::sector_size, TARGET_HALTED, and TARGET_PRIxADDR.
|
static |
Definition at line 215 of file am13e230x.c.
References AM13_FLASH_TIMEOUT_MS, bank, ERROR_FAIL, ERROR_OK, FCTL_CMDEXEC_EXECUTE, FCTL_CMDTYPE_CLEARSTATUS, FCTL_REG_CMDEXEC, FCTL_REG_CMDTYPE, FCTL_REG_STATCMD, FCTL_STATCMD_CMDINPROGRESS, keep_alive(), LOG_ERROR, status, target_read_u32(), target_write_u32(), and timeval_ms().
Referenced by am13_fctl_erase(), and am13_write_direct().
|
static |
Definition at line 263 of file am13e230x.c.
References addr, am13_fctl_clear_status(), am13_fctl_unprotect(), am13_fctl_wait_done(), bank, ERROR_OK, FCTL_CMDEXEC_EXECUTE, FCTL_CMDTYPE_ERASE, FCTL_REG_CMDADDR, FCTL_REG_CMDEXEC, FCTL_REG_CMDTYPE, and target_write_u32().
Referenced by am13_erase().
|
static |
Definition at line 177 of file am13e230x.c.
References am13_fctl_errors, ARRAY_SIZE, bit, BIT, name, and status.
Referenced by am13_fctl_wait_done().
|
static |
Definition at line 245 of file am13e230x.c.
References AM13_FLASH_BASE_MAIN, AM13_FLASH_BASE_NONMAIN, bank, ERROR_FLASH_BANK_INVALID, ERROR_OK, FCTL_REG_CMDWEPROTA, FCTL_REG_CMDWEPROTB, FCTL_REG_CMDWEPROTNM, and target_write_u32().
Referenced by am13_fctl_erase(), and am13_write_direct().
|
static |
Definition at line 186 of file am13e230x.c.
References am13_fctl_strerror(), AM13_FLASH_TIMEOUT_MS, bank, ERROR_FAIL, ERROR_OK, FCTL_REG_STATCMD, FCTL_STATCMD_CMDDONE, FCTL_STATCMD_CMDPASS, keep_alive(), LOG_ERROR, status, target_read_u32(), and timeval_ms().
Referenced by am13_fctl_erase(), and am13_write_direct().
|
static |
Definition at line 635 of file am13e230x.c.
References AM13_DID, AM13_FLASH_BASE_MAIN, AM13_FLASH_BASE_NONMAIN, AM13_NONMAIN_SIZE_PER_BANK, AM13_SRAMFLASH, AM13_TRACEID, bank, am13_flash_bank::did, ERROR_FAIL, ERROR_OK, GENMASK, LOG_ERROR, LOG_INFO, am13_flash_bank::main_flash_num_banks, am13_flash_bank::main_flash_size_kb, NULL, am13_flash_bank::sector_size, am13_flash_bank::sram_size_kb, TARGET_ADDR_FMT, target_read_u32(), TI_MANUFACTURER_ID, and am13_flash_bank::traceid.
Referenced by am13_auto_probe().
|
static |
Definition at line 147 of file am13e230x.c.
References bank, ERROR_OK, GSC_REG_FPC_FLSEMREQ, LOG_ERROR, and target_write_u32().
Referenced by am13_erase(), and am13_write_direct().
|
static |
Definition at line 560 of file am13e230x.c.
References address, AM13_ALGO_BUFFER_0, AM13_ALGO_BUFFER_1, am13_algo_init(), AM13_ALGO_PARAMS_0, AM13_ALGO_PARAMS_1, am13_algo_quit(), am13_algo_wait_done(), AM13_BUFFER_FULL, AM13_CMD_PROGRAM, AM13_SECTOR_SIZE_BYTES, am13_write_direct(), bank, am13_algo_params::buf_addr, buf_set_u32(), buffer, cmd, count, am13_algo_params::dest, ERROR_OK, ERROR_TARGET_NOT_HALTED, keep_alive(), am13_algo_params::len, LOG_ERROR, LOG_INFO, MIN, offset, size, target::state, status, TARGET_HALTED, target_write_buffer(), and timeval_ms().
|
static |
Definition at line 361 of file am13e230x.c.
References addr, am13_clear_gsc_semaphore(), am13_fctl_clear_status(), am13_fctl_unprotect(), am13_fctl_wait_done(), AM13_FLASH_WORD_SIZE, am13_request_gsc_semaphore(), bank, buffer, count, ERROR_OK, FCTL_CMDEXEC_EXECUTE, FCTL_CMDTYPE_PROGRAM, FCTL_CMDTYPE_SIZE_ONEWORD, FCTL_REG_CMDADDR, FCTL_REG_CMDBYTEN, FCTL_REG_CMDDATA0, FCTL_REG_CMDDATAINDEX, FCTL_REG_CMDEXEC, FCTL_REG_CMDTYPE, offset, target_write_buffer(), and target_write_u32().
Referenced by am13_write().
| FLASH_BANK_COMMAND_HANDLER | ( | am13_flash_bank_command | ) |
Definition at line 294 of file am13e230x.c.
References AM13_FLASH_BASE_MAIN, AM13_FLASH_BASE_NONMAIN, AM13_FLASH_WORD_SIZE, AM13_SECTOR_SIZE_BYTES, bank, ERROR_FAIL, ERROR_OK, LOG_ERROR, am13_flash_bank::sector_size, and TARGET_ADDR_FMT.
|
static |
Definition at line 732 of file am13e230x.c.
|
static |
| const { ... } am13_fctl_errors[] |
Referenced by am13_fctl_strerror().
| const struct flash_driver am13_flash |
Definition at line 732 of file am13e230x.c.
| unsigned char bit |
Definition at line 166 of file am13e230x.c.
Referenced by am13_fctl_strerror(), armjtagew_tap_append_step(), at91sam9_read_page(), ath79_spi_bitbang_codegen(), buspirate_tap_append(), cmsis_dap_add_tms_sequence(), COMMAND_HANDLER(), em357_protect(), ft232r_bit_number_to_name(), jtag_add_statemove(), nrf52_protect_check_bprot(), rsl10_protect(), usbprog_jtag_set_bit(), and vsllink_tap_append_step().
| const char* name |
Definition at line 167 of file am13e230x.c.
Referenced by __attribute__(), __register_commands(), am13_fctl_strerror(), arc_build_bcr_reg_cache(), arc_build_reg_cache(), arc_reg_get_by_name(), arm_tpiu_swo_handle_event(), command_find_from_name(), COMMAND_HANDLER(), COMMAND_HELPER(), create_default_signal(), create_signal(), cti_find_reg_offset(), cti_instance_by_jim_obj(), dap_instance_by_jim_obj(), dw_spi_spiflash_search(), find_signal_by_name(), find_target(), flash_driver_find_by_name(), flash_driver_name_matches(), fm4_get_info_command(), ft232r_bit_name_to_number(), gdb_generate_target_description(), gdb_get_register_packet(), gdb_get_registers_packet(), gdb_set_register_packet(), gdb_set_registers_packet(), get_flash_bank_by_name(), get_flash_bank_by_name_noprobe(), get_flash_name_index(), get_gpio_index(), get_nand_device_by_name(), get_pld_device_by_name(), hwthread_get_thread_reg_list(), init_reg_name(), ipdbg_allocate_hub(), ipdbg_create_hub(), ipdbg_get_hub_by_name(), jim_nvp_name2value(), jim_nvp_name2value_nocase(), jim_nvp_name2value_nocase_simple(), jim_nvp_name2value_simple(), jim_set_result_nvp_unknown(), jlink_open_device(), jtag_examine_chain_display(), kinetis_create_missing_banks(), kinetis_probe_chip(), msp432_probe(), nand_driver_find_by_name(), nvp_name2value(), nvp_unknown_command_print(), open_write_close(), or1k_create_reg_list(), parse_reg_ranges_impl(), pic32mx_info(), pic32mx_probe(), read_channel_name(), register_get_by_name(), remove_service(), riot_get_thread_reg_list(), riot_update_threads(), rtkernel_add_task(), rtos_create(), target_call_reset_callbacks(), target_wait_state(), telnet_auto_complete(), ublast_init(), unregister_command(), xtensa_build_reg_cache(), xtensa_fetch_all_regs(), xtensa_write_dirty_registers(), and zephyr_create().