sysparam: reserve one more flash sector before placing the sysparams
This is to help work with recent SDKs that add a RF cal sector by default in the fifth last sector - just so the sysparam sectors do not jump around when using different SDK versions.
This commit is contained in:
parent
42ccb47eb3
commit
ec5dabd237
3 changed files with 7 additions and 5 deletions
|
@ -214,8 +214,8 @@ void IRAM sdk_user_start(void) {
|
|||
memcpy(&sdk_g_ic.s, buf32, sizeof(struct sdk_g_ic_saved_st));
|
||||
|
||||
// By default, put the sysparam region just below the config sectors at the
|
||||
// top of the flash space
|
||||
sysparam_addr = flash_size - (4 + DEFAULT_SYSPARAM_SECTORS) * sdk_flashchip.sector_size;
|
||||
// top of the flash space, and allowing one extra sector spare.
|
||||
sysparam_addr = flash_size - (5 + DEFAULT_SYSPARAM_SECTORS) * sdk_flashchip.sector_size;
|
||||
status = sysparam_init(sysparam_addr, flash_size);
|
||||
if (status == SYSPARAM_NOTFOUND) {
|
||||
status = sysparam_create_area(sysparam_addr, DEFAULT_SYSPARAM_SECTORS, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue