diff --git a/esp32_partition_16M.csv b/esp32_partition_16M.csv index 413266921..879ae512a 100644 --- a/esp32_partition_16M.csv +++ b/esp32_partition_16M.csv @@ -1,6 +1,7 @@ # Name, Type, SubType, Offset, Size, Flags -nvs, data, nvs, 0x9000, 0x035000, +nvs, data, nvs, 0x9000, 0x005000, otadata, data, ota, , 0x002000, app0, app, ota_0, , 0x6E0000, app1, app, ota_1, , 0x6E0000, +nvs1, data, nvs, , 0x030000, spiffs, data, spiffs, , 0x200000, \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 55c236899..f4d2734c7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -33,7 +33,7 @@ build_flags = -D ARDUINOTRACE_ENABLE=0 -D CONFIG_ETH_ENABLED -D CONFIG_UART_ISR_IN_IRAM - -D CONFIG_ASYNC_TCP_STACK_SIZE=8192 + -D CONFIG_ASYNC_TCP_STACK_SIZE=5120 unbuild_flags = ${common.core_unbuild_flags} diff --git a/src/emsesp.cpp b/src/emsesp.cpp index ff0727a80..cd4645a89 100644 --- a/src/emsesp.cpp +++ b/src/emsesp.cpp @@ -1496,7 +1496,9 @@ void EMSESP::start() { esp8266React.begin(); // loads core system services settings (network, mqtt, ap, ntp etc) - nvs_.begin("ems-esp", false, "nvs"); + if (!nvs_.begin("ems-esp", false, "nvs1")) { // try new partition on 16M flash first + nvs_.begin("ems-esp", false, "nvs"); // fallback to first nvs + } LOG_INFO("Starting EMS-ESP version %s", EMSESP_APP_VERSION); // welcome message LOG_DEBUG("System is running in Debug mode");