kopia lustrzana https://github.com/stlink-org/stlink
add dual bank flash configuration info to chipid database.
add a 'has_dual_bank' info to flash param, helping handling a couple of cases - selecting over dual bank specific code path without handling multiple chip id all over the code. - handling dual bank mode dynamic configurationpull/910/head
rodzic
89fa73499b
commit
46bf0abf77
|
@ -159,6 +159,8 @@ typedef struct flash_loader {
|
|||
int serial_size;
|
||||
|
||||
enum stlink_flash_type flash_type; // stlink_chipid_params.flash_type, set by stlink_load_device_params(), values: STLINK_FLASH_TYPE_xxx
|
||||
bool has_dual_bank;
|
||||
|
||||
stm32_addr_t flash_base; // STM32_FLASH_BASE, set by stlink_load_device_params()
|
||||
size_t flash_size; // calculated by stlink_load_device_params()
|
||||
size_t flash_pgsz; // stlink_chipid_params.flash_pagesize, set by stlink_load_device_params()
|
||||
|
|
|
@ -73,6 +73,7 @@ struct stlink_chipid_params {
|
|||
uint32_t chip_id;
|
||||
char *description;
|
||||
enum stlink_flash_type flash_type;
|
||||
bool has_dual_bank;
|
||||
uint32_t flash_size_reg;
|
||||
uint32_t flash_pagesize;
|
||||
uint32_t sram_size;
|
||||
|
|
|
@ -885,7 +885,9 @@ int stlink_load_device_params(stlink_t *sl) {
|
|||
} else {
|
||||
sl->flash_size = flash_size * 1024;
|
||||
}
|
||||
|
||||
sl->flash_type = params->flash_type;
|
||||
sl->has_dual_bank = params->has_dual_bank;
|
||||
sl->flash_pgsz = params->flash_pagesize;
|
||||
sl->sram_size = params->sram_size;
|
||||
sl->sys_base = params->bootrom_base;
|
||||
|
|
Ładowanie…
Reference in New Issue