I'm seeing a massive chunk taken from heap when initializing the "storage" nvs partition, but I'm not sure why.
Partition table:
Code: Select all
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, , 0x6000
phy_init, data, phy, , 0x1000
otadata, data, ota, , 0x2000
ota0, app, ota_0, , 2M
ota1, app, ota_1, , 2M
storage, data, nvs, , 0x3DF000
Code: Select all
// Initialize NVS
esp_err_t err = nvs_flash_init();
if (err == ESP_ERR_NVS_NO_FREE_PAGES) {
ESP_ERROR_CHECK(nvs_flash_erase());
err = nvs_flash_init();
}
ESP_ERROR_CHECK( err );
//storage nvs partition
err = nvs_flash_init_partition("storage");
if (err == ESP_ERR_NVS_NO_FREE_PAGES) {
ESP_ERROR_CHECK(nvs_flash_erase_partition("storage"));
err = nvs_flash_init_partition("storage");
}
ESP_ERROR_CHECK( err );