flash_sector is only used within OpenOCD.
 
Symbols
loading...
Files
loading...

flash_sector struct

Describes the geometry and status of a single flash sector within a flash bank. A single bank typically consists of multiple sectors, each of which can be erased and protected independently.

Syntax

struct flash_sector {     uint32_t offset;     uint32_t size;     int is_erased;     int is_protected; };

Fields

offset

Bus offset from start of the flash chip (in bytes). Read more...

size

Number of bytes in this flash sector. Read more...

is_erased

Indication of erasure status: 0 = not erased, 1 = erased, other = unknown. Set by @c flash_driver::erase_check only. This information must be considered stale immediately. Don't set it in flash_driver::erase or a device mass_erase Don't clear it in flash_driver::write The flag is not used in a protection block. Read more...

is_protected

Indication of protection status: 0 = unprotected/unlocked, 1 = protected/locked, other = unknown. Set by @c flash_driver::protect_check. This information must be considered stale immediately. A million things could make it stale: power cycle, reset of target, code running on target, etc. If a flash_bank uses an extra array of protection blocks, protection flag is not valid in sector array. Read more...

References

LocationReferrerScopeText
core.h:28
struct flash_sector {
FLASHPlugin.c:642plugin_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
FLASHPlugin.c:643plugin_probe()
memset(bank->sectors, 0, sizeof(struct flash_sector) * bank->num_sectors);
aduc702x.c:53aduc702x_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
aducm360.c:81aducm360_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
ambiqmicro.c:645ambiqmicro_probe()
free(bank->sectors);
ambiqmicro.c:650ambiqmicro_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
at91sam3.c:3167_sam3_probe()
bank->sectors = calloc(private->nsectors, (sizeof((bank->sectors)[0])));
at91sam4.c:2676sam4_probe()
bank->sectors = calloc(private->nsectors, (sizeof((bank->sectors)[0])));
at91sam4l.c:322sam4l_probe()
bank->sectors = calloc(bank->num_sectors, (sizeof((bank->sectors)[0])));
at91sam7.c:592at91sam7_read_part_info()
t_bank->sectors = malloc(sectors_num * sizeof(struct flash_sector));
at91sam7.c:780at91sam7_flash_bank_command()
t_bank->sectors = malloc(num_sectors * sizeof(struct flash_sector));
ath79.c:655ath79_write()
struct flash_sector *bs = &bank->sectors[sector];
ath79.c:758ath79_probe()
struct flash_sector *sectors;
ath79.c:765ath79_probe()
free(bank->sectors);
ath79.c:817ath79_probe()
sectors = calloc(1, sizeof(struct flash_sector) * bank->num_sectors);
ath79.c:829ath79_probe()
free(sectors);
atsamv.c:343samv_probe()
bank->sectors = calloc(bank->num_sectors, sizeof(struct flash_sector));
avrf.c:326avrf_probe()
free(bank->sectors);
avrf.c:332avrf_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * avr_info->flash_page_num);
bluenrg-x.c:418bluenrgx_probe()
bank->sectors = realloc(bank->sectors, sizeof(struct flash_sector) * bank->num_sectors);
cc26xx.c:464cc26xx_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
cc3220sf.c:435cc3220sf_probe()
free(bank->sectors);
cc3220sf.c:437cc3220sf_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
cfi.c:2551cfi_probe()
free(bank->sectors);
cfi.c:2824cfi_probe()
bank->sectors = malloc(sizeof(struct flash_sector));
cfi.c:2837cfi_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
core.c:232flash_free_all_banks()
free(bank->sectors);
core.c:233flash_free_all_banks()
free(bank->prot_blocks);
core.c:455flash_iterate_address_range_inner()
struct flash_sector *block_array;
core.c:501flash_iterate_address_range_inner()
struct flash_sector *f = &block_array[i];
core.c:1015alloc_block_array()
struct flash_sector *alloc_block_array(uint32_t offset, uint32_t size,
core.c:1018alloc_block_array()
struct flash_sector *array = calloc(num_blocks, sizeof(struct flash_sector));
core.h:116flash_bank::sectorsflash_bank
struct flash_sector *sectors;
core.h:126flash_bank::prot_blocksflash_bank
struct flash_sector *prot_blocks;
core.h:291alloc_block_array()
struct flash_sector *alloc_block_array(uint32_t offset, uint32_t size,
dsp5680xx_flash.c:37dsp5680xx_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
efm32.c:1071efm32x_probe()
free(bank->sectors);
efm32.c:1087efm32x_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
em357.c:714em357_probe()
free(bank->sectors);
em357.c:719em357_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
eneispif.c:332eneispif_probe()
struct flash_sector *sectors;
eneispif.c:338eneispif_probe()
free(bank->sectors);
eneispif.c:370eneispif_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
faux.c:50faux_flash_bank_command()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
fespi.c:727fespi_probe()
struct flash_sector *sectors;
fespi.c:734fespi_probe()
free(bank->sectors);
fespi.c:802fespi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
fm3.c:650fm3_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
fm4.c:373mb9bf_probe()
fm4.c:374mb9bf_probe()
sizeof(struct flash_sector));
fm4.c:393s6e2cc_init_sector()
static void s6e2cc_init_sector(struct flash_sector *sector, int sa)
fm4.c:440s6e2cc_probe()
fm4.c:441s6e2cc_probe()
sizeof(struct flash_sector));
fm4.c:472s6e2dh_probe()
fm4.c:473s6e2dh_probe()
sizeof(struct flash_sector));
jtagspi.c:213jtagspi_handle_set()
struct flash_sector *sectors = NULL;
jtagspi.c:242jtagspi_handle_set()
free(bank->sectors);
jtagspi.c:334jtagspi_handle_set()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
jtagspi.c:439jtagspi_probe()
struct flash_sector *sectors;
jtagspi.c:445jtagspi_probe()
free(bank->sectors);
jtagspi.c:490jtagspi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
kinetis.c:3009kinetis_probe()
free(bank->sectors);
kinetis.c:3012kinetis_probe()
kinetis_ke.c:1117kinetis_ke_probe()
free(bank->sectors);
kinetis_ke.c:1120kinetis_ke_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:342lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * 16);
lpc2000.c:352lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * 18);
lpc2000.c:422lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:484lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:514lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:558lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:589lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:619lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc2000.c:647lpc2000_build_sector_list()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpc288x.c:139lpc288x_read_part_info()
bank->sectors = malloc(sizeof(struct flash_sector) * 23);
lpc2900.c:1476lpc2900_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
lpcspifi.c:833lpcspifi_probe()
struct flash_sector *sectors;
lpcspifi.c:885lpcspifi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
max32xxx.c:639max32xxx_probe()
free(bank->sectors);
max32xxx.c:644max32xxx_probe()
bank->sectors = calloc(bank->num_sectors, sizeof(struct flash_sector));
mdr.c:563mdr_probe()
free(bank->sectors);
mdr.c:566mdr_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * page_count);
mrvlqspi.c:824mrvlqspi_probe()
struct flash_sector *sectors;
mrvlqspi.c:873mrvlqspi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
msp432.c:910msp432_probe()
free(bank->sectors);
msp432.c:914msp432_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
msp432p4.c:541msp432p4_probe()
free(bank->sectors);
msp432p4.c:548msp432p4_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * number_sectors);
niietcm4.c:1669niietcm4_probe()
free(bank->sectors);
niietcm4.c:1687niietcm4_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * page_total);
npcx.c:258npcx_probe()
bank->sectors = calloc(num_sectors, sizeof(struct flash_sector));
nrf5.c:1066nrf5_erase_page()
struct flash_sector *sector)
nrf5.c:1254nrf5_write()
struct flash_sector *bs = &bank->sectors[sector];
numicro.c:1089numicro_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
ocl.c:258ocl_probe()
bank->sectors = realloc(bank->sectors, sizeof(struct flash_sector)*bank->num_sectors);
pic32mm.c:859pic32mm_probe()
free(bank->sectors);
pic32mm.c:864pic32mm_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
pic32mx.c:764pic32mx_probe()
free(bank->sectors);
pic32mx.c:770pic32mx_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
psoc4.c:804psoc4_probe()
free(bank->sectors);
psoc5lp.c:777psoc5lp_nvl_probe()
psoc5lp.c:778psoc5lp_nvl_probe()
sizeof(struct flash_sector));
psoc5lp.c:953psoc5lp_eeprom_probe()
psoc5lp.c:954psoc5lp_eeprom_probe()
sizeof(struct flash_sector));
psoc5lp.c:1333psoc5lp_protect_check()
struct flash_sector *sector = &bank->sectors[sector_nr];
psoc5lp.c:1334psoc5lp_protect_check()
struct flash_sector *ecc_sector;
psoc5lp.c:1406psoc5lp_probe()
bank->sectors = calloc(bank->num_sectors * 2,
psoc5lp.c:1407psoc5lp_probe()
sizeof(struct flash_sector));
psoc6.c:570psoc6_probe()
free(bank->sectors);
psoc6.c:600psoc6_probe()
bank->sectors = calloc(num_sectors, sizeof(struct flash_sector));
rs14100.c:315rs14100_probe()
free(bank->sectors);
rs14100.c:322rs14100_probe()
bank->sectors = calloc(bank->num_sectors, sizeof(struct flash_sector));
rsl10.c:311rsl10_probe()
free(bank->sectors);
rsl10.c:318rsl10_probe()
sh_qspi.c:521sh_qspi_write()
struct flash_sector *bs = &bank->sectors[sector];
sh_qspi.c:753sh_qspi_probe()
struct flash_sector *sectors;
sh_qspi.c:760sh_qspi_probe()
free(bank->sectors);
sh_qspi.c:818sh_qspi_probe()
sectors = calloc(1, sizeof(*sectors) * bank->num_sectors);
sim3x.c:794sim3x_probe()
free(bank->sectors);
sim3x.c:799sim3x_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * sim3x_info->flash_size_kb);
stellaris.c:1233stellaris_probe()
free(bank->sectors);
stellaris.c:1238stellaris_probe()
bank->sectors = calloc(bank->num_sectors, sizeof(struct flash_sector));
stm32f1x.c:1021stm32x_probe()
free(bank->sectors);
stm32f1x.c:1024stm32x_probe()
stm32f2x.c:562stm32x_protect_check()
struct flash_sector *prot_blocks;
stm32f2x.c:1004stm32x_probe()
free(bank->sectors);
stm32f2x.c:1008stm32x_probe()
stm32f2x.c:1033stm32x_probe()
bank->sectors = calloc(num_sectors, sizeof(struct flash_sector));
stm32f2x.c:1186stm32x_probe()
bank->sectors = calloc(num_pages, sizeof(struct flash_sector));
stm32f2x.c:1199stm32x_probe()
bank->prot_blocks = malloc(sizeof(struct flash_sector) * num_prot_blocks);
stm32g0x.c:773stm32x_probe()
free(bank->sectors);
stm32g0x.c:778stm32x_probe()
stm32g4x.c:875stm32l4_probe()
free(bank->sectors);
stm32g4x.c:882stm32l4_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
stm32h7x.c:881stm32x_probe()
free(bank->sectors);
stm32h7x.c:898stm32x_probe()
stm32l4x.c:1634stm32l4_write()
struct flash_sector *head = &bank->sectors[0];
stm32l4x.c:1635stm32l4_write()
struct flash_sector *tail = &bank->sectors[bank->num_sectors - 1];
stm32l4x.c:1883stm32l4_probe()
free(bank->sectors);
stm32l4x.c:2131stm32l4_probe()
free(bank->sectors);
stm32l4x.c:2135stm32l4_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
stm32l5x.c:828stm32l4_probe()
free(bank->sectors);
stm32l5x.c:836stm32l4_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
stm32lx.c:840stm32lx_probe()
free(bank->sectors);
stm32lx.c:845stm32lx_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
stmqspi.c:612stmqspi_handle_set()
struct flash_sector *sectors = NULL;
stmqspi.c:633stmqspi_handle_set()
free(bank->sectors);
stmqspi.c:738stmqspi_handle_set()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
stmqspi.c:2071stmqspi_probe()
struct flash_sector *sectors = NULL;
stmqspi.c:2082stmqspi_probe()
free(bank->sectors);
stmqspi.c:2342stmqspi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
stmsmi.c:515stmsmi_probe()
struct flash_sector *sectors;
stmsmi.c:521stmsmi_probe()
free(bank->sectors);
stmsmi.c:591stmsmi_probe()
sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
str7x.c:154str7x_build_block_list()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
str9x.c:104str9x_build_block_list()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
str9xpec.c:236str9xpec_build_block_list()
bank->sectors = malloc(sizeof(struct flash_sector) * num_sectors);
swm050.c:148swm050_flash_bank_command()
free(bank->sectors);
tcl.c:82handle_flash_info_command()
struct flash_sector *block_array;
tms470.c:31tms470r1a256_sectors
static const struct flash_sector tms470r1a256_sectors[] = {
tms470.c:51tms470r1a288_bank0_sectors
static const struct flash_sector tms470r1a288_bank0_sectors[] = {
tms470.c:61tms470r1a288_bank1_sectors
static const struct flash_sector tms470r1a288_bank1_sectors[] = {
tms470.c:71tms470r1a384_bank0_sectors
static const struct flash_sector tms470r1a384_bank0_sectors[] = {
tms470.c:87tms470r1a384_bank1_sectors
static const struct flash_sector tms470r1a384_bank1_sectors[] = {
tms470.c:97tms470r1a384_bank2_sectors
static const struct flash_sector tms470r1a384_bank2_sectors[] = {
tms470.c:140tms470_read_part_info()
free(bank->sectors);
tms470.c:165tms470_read_part_info()
bank->sectors = malloc(sizeof(tms470r1a256_sectors));
tms470.c:179tms470_read_part_info()
tms470.c:189tms470_read_part_info()
tms470.c:209tms470_read_part_info()
tms470.c:219tms470_read_part_info()
tms470.c:229tms470_read_part_info()
w600.c:323w600_probe()
free(bank->sectors);
w600.c:331w600_probe()
bank->sectors = malloc(sizeof(struct flash_sector) * num_pages);
xcf.c:591xcf_probe()
free(bank->sectors);
xcf.c:620xcf_probe()
bank->sectors = malloc(bank->num_sectors * sizeof(struct flash_sector));
xmc1xxx.c:477xmc1xxx_probe()
xmc1xxx.c:478xmc1xxx_probe()
sizeof(struct flash_sector));
xmc4xxx.c:297xmc4xxx_load_bank_layout()
xmc4xxx.c:298xmc4xxx_load_bank_layout()
sizeof(struct flash_sector));

Type Use

Variables of flash_sector type
ath79_write()::bs
ath79_probe()::sectors
flash_iterate_address_range_inner()::block_array
flash_iterate_address_range_inner()::f
alloc_block_array()::array
jtagspi_handle_set()::sectors
jtagspi_probe()::sectors
lpcspifi_probe()::sectors
mrvlqspi_probe()::sectors
nrf5_write()::bs
stm32x_protect_check()::prot_blocks
stm32l4_write()::head
stm32l4_write()::tail
stmqspi_handle_set()::sectors
stmqspi_probe()::sectors
stmsmi_probe()::sectors
handle_flash_info_command()::block_array
psoc5lp_protect_check()::sector
psoc5lp_protect_check()::ecc_sector
fespi_probe()::sectors
sh_qspi_write()::bs
sh_qspi_probe()::sectors
eneispif_probe()::sectors
all items filtered out
flash_sector
Allocators of flash_sector
Deletors of flash_sector
flash_sector