kolban wrote: I am using esptool to upload the images and
esptool.py BAG in erased block. Erased area > write area
------
Flash header = 512k (4Mbits);
On startup (in call_user_start()) write flashchip->chip_size = 512*1024;
SDK will be limited in the 'sandbox' 512K.
All SDK write configs addres = flashchip->chip_size - 0x4000
flashchip->chip_size - 0x4000: esp_init_data_default.bin (https://github.com/pvvx/MinEspSDKLib/bl ... ys_const.h )
flashchip->chip_size - 0x3000: wifi_sdk_config 0 (struct s_wifi_store https://github.com/pvvx/MinEspSDKLib/bl ... /libmain.h)
flashchip->chip_size - 0x2000: wifi_sdk_config 1 (struct s_wifi_store https://github.com/pvvx/MinEspSDKLib/bl ... /libmain.h)
flashchip->chip_size - 0x1000: wifi_sdk_config_header + CRC blocks wifi_sdk_config 0 and 1 (struct ets_store_wifi_hdr).
User config uses only in AT SDK.
"Flash cache " limit 1024k from start addr flash (0x40200000).
full 16Mbytes spi_flash_rd/wr(xxxx)
{
flashchip->chip_size = 0x01000000;
spi_flash_xxx(xxxx);
flashchip->chip_size = 512*1024;
}