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 configuration
pull/910/head
Guillaume Revaillot 2020-04-03 16:13:35 +02:00
rodzic 89fa73499b
commit 46bf0abf77
3 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

@ -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;

Wyświetl plik

@ -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;