OpenOCD
|
Go to the source code of this file.
Functions | |
void | flash_bank_add (struct flash_bank *bank) |
Adds a new NOR bank to the global list of banks. More... | |
struct flash_bank * | flash_bank_list (void) |
int | flash_driver_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
int | flash_driver_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
int | flash_driver_read (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
int | flash_driver_verify (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
int | flash_driver_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
int | flash_write_unlock_verify (struct target *target, struct image *image, uint32_t *written, bool erase, bool unlock, bool write, bool verify) |
void flash_bank_add | ( | struct flash_bank * | bank | ) |
Adds a new NOR bank to the global list of banks.
bank | The bank that should be added. |
Definition at line 164 of file flash/nor/core.c.
References bank, flash_banks, and flash_bank::next.
Referenced by COMMAND_HANDLER(), kinetis_create_missing_banks(), and msp432_probe().
struct flash_bank* flash_bank_list | ( | void | ) |
Definition at line 183 of file flash/nor/core.c.
References flash_banks.
Referenced by COMMAND_HANDLER(), FLASH_BANK_COMMAND_HANDLER(), flash_init_drivers(), flash_set_dirty(), jim_flash_list(), kinetis_get_chip(), nrf5_get_chip(), and rsl10_get_chip().
int flash_driver_erase | ( | struct flash_bank * | bank, |
unsigned int | first, | ||
unsigned int | last | ||
) |
Definition at line 29 of file flash/nor/core.c.
References bank, ERROR_OK, and LOG_ERROR.
Referenced by COMMAND_HANDLER(), and flash_erase_address_range().
int flash_driver_protect | ( | struct flash_bank * | bank, |
int | set, | ||
unsigned int | first, | ||
unsigned int | last | ||
) |
Definition at line 41 of file flash/nor/core.c.
References bank, ERROR_FAIL, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, and LOG_ERROR.
Referenced by COMMAND_HANDLER(), flash_driver_unprotect(), and virtual_protect().
int flash_driver_read | ( | struct flash_bank * | bank, |
uint8_t * | buffer, | ||
uint32_t | offset, | ||
uint32_t | count | ||
) |
Definition at line 102 of file flash/nor/core.c.
References bank, buffer, count, ERROR_OK, LOG_DEBUG, LOG_ERROR, offset, and TARGET_ADDR_FMT.
Referenced by COMMAND_HANDLER().
int flash_driver_verify | ( | struct flash_bank * | bank, |
const uint8_t * | buffer, | ||
uint32_t | offset, | ||
uint32_t | count | ||
) |
Definition at line 127 of file flash/nor/core.c.
References bank, buffer, count, default_flash_verify(), ERROR_OK, LOG_ERROR, offset, and TARGET_ADDR_FMT.
Referenced by flash_write_unlock_verify().
int flash_driver_write | ( | struct flash_bank * | bank, |
const uint8_t * | buffer, | ||
uint32_t | offset, | ||
uint32_t | count | ||
) |
Definition at line 85 of file flash/nor/core.c.
References bank, buffer, count, ERROR_OK, LOG_ERROR, offset, and TARGET_ADDR_FMT.
Referenced by COMMAND_HANDLER(), and flash_write_unlock_verify().
int flash_write_unlock_verify | ( | struct target * | target, |
struct image * | image, | ||
uint32_t * | written, | ||
bool | erase, | ||
bool | unlock, | ||
bool | write, | ||
bool | verify | ||
) |
Definition at line 730 of file flash/nor/core.c.
References flash_bank::base, imagesection::base_address, buffer, compare_section(), flash_bank::default_padded_value, ERROR_FAIL, ERROR_OK, flash_driver_verify(), flash_driver_write(), flash_erase_address_range(), flash_set_dirty(), flash_unlock_address_range(), flash_write_align_end(), flash_write_align_start(), flash_write_check_gap(), get_flash_bank_by_addr(), image_read_section(), LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, flash_bank::name, image::num_sections, flash_bank::num_sectors, flash_sector::offset, image::sections, flash_bank::sectors, flash_sector::size, flash_bank::size, size, imagesection::size, TARGET_ADDR_FMT, flash_bank::write_end_alignment, and flash_bank::write_start_alignment.
Referenced by COMMAND_HANDLER(), and flash_write().