From 3d079bff8ed515fbd99acebdc37079a1b6ee49cd Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 17 Aug 2022 14:00:08 +0200 Subject: [PATCH] update components, custom partition table with ota added --- components/WebGUIAppComponent | 2 +- main/main.c | 7 +++++++ partitions_user_ota.csv | 10 ++++++++++ sdkconfig | 14 +++++++------- sdkconfig.old | 10 +++++----- 5 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 partitions_user_ota.csv diff --git a/components/WebGUIAppComponent b/components/WebGUIAppComponent index 96143f9..b490738 160000 --- a/components/WebGUIAppComponent +++ b/components/WebGUIAppComponent @@ -1 +1 @@ -Subproject commit 96143f90423a11534a0079ae4f0b01d74db6629e +Subproject commit b49073877dbdaf321bf845713329c764906d9010 diff --git a/main/main.c b/main/main.c index a64b07e..ed8e5a8 100644 --- a/main/main.c +++ b/main/main.c @@ -64,7 +64,14 @@ void app_main(void) if (CONFIG_WEBGUIAPP_GPRS_ENABLE || CONFIG_WEBGUIAPP_ETHERNET_ENABLE || (CONFIG_WEBGUIAPP_WIFI_ENABLE && GetSysConf()->wifiSettings.Flags1.bIsAP)) + { StartTimeGet(); + if (GetSysConf()->mqttStation[0].Flags1.bIsGlobalEnabled + || GetSysConf()->mqttStation[1].Flags1.bIsGlobalEnabled) + { + MQTTRun(); + } + } /*Start web server*/ if (CONFIG_WEBGUIAPP_GPRS_ENABLE || diff --git a/partitions_user_ota.csv b/partitions_user_ota.csv new file mode 100644 index 0000000..eb35ef6 --- /dev/null +++ b/partitions_user_ota.csv @@ -0,0 +1,10 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, 0x9000, 0x8000 +otadata, data, ota, , 0x2000 +phy_init, data, phy, , 0x1000 +nvs_key, data, nvs_keys, , 0x1000 +ota_0, app, ota_0, 0x20000, 0x1D0000 +ota_1, app, ota_1, , 0x1D0000 +storage, data, fat, , 0x40000 + diff --git a/sdkconfig b/sdkconfig index 93748d9..96dc51f 100644 --- a/sdkconfig +++ b/sdkconfig @@ -91,11 +91,11 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="2MB" +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_ESPTOOLPY_BEFORE_RESET=y # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set @@ -118,12 +118,12 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # # Partition Table # -CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP is not set # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_ota.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_user_ota.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table diff --git a/sdkconfig.old b/sdkconfig.old index 23b3c2c..74767d8 100644 --- a/sdkconfig.old +++ b/sdkconfig.old @@ -118,12 +118,12 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # # Partition Table # -CONFIG_PARTITION_TABLE_SINGLE_APP=y +# CONFIG_PARTITION_TABLE_SINGLE_APP is not set # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set -# CONFIG_PARTITION_TABLE_CUSTOM is not set -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_user_ota.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_user_ota.csv" CONFIG_PARTITION_TABLE_OFFSET=0x8000 CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table @@ -1207,7 +1207,7 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y # # WebGuiApp configuration # -CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0000" +CONFIG_WEBGUIAPP_PROJECT_VER="0.0.0.0001" CONFIG_WEBGUIAPP_HOSTNAME="DEVICE_HOSTNAME" CONFIG_WEBGUIAPP_USERNAME="user" CONFIG_WEBGUIAPP_USERPASS="password"