mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[ESP-IDF 5.1] Split ESP32 variant builds with LittleFS to use ESP-IDF5.1
This commit is contained in:
@@ -259,7 +259,7 @@ lib_ignore =
|
||||
|
||||
; ESP_IDF 5.1
|
||||
[core_esp32_IDF5_1__2_0_13]
|
||||
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
|
||||
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
|
||||
platform_packages =
|
||||
build_flags = -DESP32_STAGE
|
||||
-DMUSTFIX_CLIENT_TIMEOUT_IN_SECONDS
|
||||
|
||||
@@ -6,6 +6,34 @@
|
||||
|
||||
|
||||
[esp32_base]
|
||||
extends = common, core_esp32_IDF4_4__2_0_13
|
||||
upload_speed = 460800
|
||||
upload_before_reset = default_reset
|
||||
upload_after_reset = hard_reset
|
||||
extra_scripts = post:tools/pio/post_esp32.py
|
||||
${extra_scripts_default.extra_scripts}
|
||||
; you can disable debug linker flag to reduce binary size (comment out line below), but the backtraces will become less readable
|
||||
; tools/pio/extra_linker_flags.py
|
||||
; fix the platform package to use gcc-ar and gcc-ranlib to enable lto linker plugin
|
||||
; more detail: https://embeddedartistry.com/blog/2020/04/13/prefer-gcc-ar-to-ar-in-your-buildsystems/
|
||||
; pre:tools/pio/apply_patches.py
|
||||
build_unflags = -Wall
|
||||
; -fno-lto
|
||||
build_flags = ${core_esp32_IDF4_4__2_0_13.build_flags}
|
||||
; ${mqtt_flags.build_flags}
|
||||
-DMQTT_MAX_PACKET_SIZE=2048
|
||||
-DCONFIG_FREERTOS_ASSERT_DISABLE
|
||||
-DCONFIG_LWIP_ESP_GRATUITOUS_ARP
|
||||
-fno-strict-aliasing
|
||||
; -flto
|
||||
-Wswitch
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
monitor_filters = esp32_exception_decoder
|
||||
lib_ignore =
|
||||
${core_esp32_IDF4_4__2_0_13.lib_ignore}
|
||||
|
||||
|
||||
[esp32_base_idf5]
|
||||
extends = common, core_esp32_IDF5_1__2_0_13
|
||||
upload_speed = 460800
|
||||
upload_before_reset = default_reset
|
||||
@@ -71,10 +99,26 @@ build_unflags = ${esp32_base.build_unflags}
|
||||
|
||||
[esp32_common_LittleFS]
|
||||
extends = esp32_common
|
||||
build_flags = ${esp32_common.build_flags}
|
||||
build_flags = ${core_esp32_IDF5_1__2_0_13.build_flags}
|
||||
; ${mqtt_flags.build_flags}
|
||||
-DMQTT_MAX_PACKET_SIZE=2048
|
||||
-DCONFIG_FREERTOS_ASSERT_DISABLE
|
||||
-DCONFIG_LWIP_ESP_GRATUITOUS_ARP
|
||||
-fno-strict-aliasing
|
||||
; -flto
|
||||
-Wswitch
|
||||
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE
|
||||
-DESP32_CLASSIC
|
||||
-DUSE_LITTLEFS
|
||||
extra_scripts = ${esp32_common.extra_scripts}
|
||||
board_build.filesystem = littlefs
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
IRremoteESP8266
|
||||
HeatpumpIR
|
||||
ESP32 BLE Arduino
|
||||
${core_esp32_IDF5_1__2_0_13.lib_ignore}
|
||||
platform = ${core_esp32_IDF5_1__2_0_13.platform}
|
||||
|
||||
|
||||
[esp32_IRExt]
|
||||
@@ -287,10 +331,10 @@ build_flags = ${env:custom_ESP32_4M316k.build_flags}
|
||||
extra_scripts = ${env:custom_ESP32_4M316k.extra_scripts}
|
||||
|
||||
[env:custom_IR_ESP32_16M8M_LittleFS_ETH]
|
||||
extends = esp32_common
|
||||
extends = esp32_common_LittleFS
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
build_flags = ${esp32_common.build_flags}
|
||||
build_flags = ${esp32_common_LittleFS.build_flags}
|
||||
-DPLUGIN_BUILD_CUSTOM
|
||||
-DPLUGIN_BUILD_IR
|
||||
-DFEATURE_ETHERNET=1
|
||||
@@ -473,13 +517,12 @@ build_flags = ${env:max_ESP32_16M1M.build_flags}
|
||||
|
||||
; A Lolin D32 PRO with 16MB Flash, allowing 4MB sketch size, and file storage using LittleFS filesystem
|
||||
[env:max_ESP32_16M8M_LittleFS]
|
||||
extends = esp32_common
|
||||
extends = esp32_common_LittleFS
|
||||
board = esp32_16M8M
|
||||
board_upload.flash_size = 16MB
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
build_flags = ${esp32_common.build_flags}
|
||||
-DUSE_LITTLEFS
|
||||
build_flags = ${esp32_common_LittleFS.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DPLUGIN_BUILD_MAX_ESP32
|
||||
-DPLUGIN_BUILD_IR_EXTENDED
|
||||
|
||||
@@ -16,9 +16,14 @@ build_unflags = ${esp32_base.build_unflags}
|
||||
-fexceptions
|
||||
|
||||
[esp32c3_common_LittleFS]
|
||||
extends = esp32c3_common
|
||||
build_flags = ${esp32c3_common.build_flags}
|
||||
extends = esp32_base_idf5
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DUSE_LITTLEFS
|
||||
-DESP32C3
|
||||
extra_scripts = ${esp32_base_idf5.extra_scripts}
|
||||
build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
-fexceptions
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
@@ -49,6 +54,10 @@ extra_scripts = ${esp32c3_common.extra_scripts}
|
||||
extends = esp32c3_common
|
||||
board = esp32c3cdc
|
||||
|
||||
[env:normal_ESP32c3_4M316k_LittleFS_CDC]
|
||||
extends = esp32c3_common_LittleFS
|
||||
board = esp32c3cdc
|
||||
|
||||
|
||||
[env:collection_A_ESP32c3_4M316k_CDC]
|
||||
extends = esp32c3_common
|
||||
|
||||
@@ -17,9 +17,14 @@ build_unflags = ${esp32_base.build_unflags}
|
||||
-fexceptions
|
||||
|
||||
[esp32s2_common_LittleFS]
|
||||
extends = esp32s2_common
|
||||
build_flags = ${esp32s2_common.build_flags}
|
||||
extends = esp32_base_idf5
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DUSE_LITTLEFS
|
||||
-DESP32S2
|
||||
extra_scripts = ${esp32_base_idf5.extra_scripts}
|
||||
build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
-fexceptions
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
@@ -59,6 +64,12 @@ extra_scripts = ${esp32s2_common.extra_scripts}
|
||||
extends = esp32s2_common
|
||||
board = esp32s2_cdc
|
||||
|
||||
|
||||
[env:normal_ESP32s2_4M316k_LittleFS_CDC]
|
||||
extends = esp32s2_common_LittleFS
|
||||
board = esp32s2_cdc
|
||||
|
||||
|
||||
[env:collection_A_ESP32s2_4M316k_CDC]
|
||||
extends = esp32s2_common
|
||||
board = esp32s2_cdc
|
||||
|
||||
@@ -17,9 +17,14 @@ build_unflags = ${esp32_base.build_unflags}
|
||||
-fexceptions
|
||||
|
||||
[esp32s3_common_LittleFS]
|
||||
extends = esp32s3_common
|
||||
build_flags = ${esp32s3_common.build_flags}
|
||||
extends = esp32_base_idf5
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DUSE_LITTLEFS
|
||||
-DESP32S3
|
||||
extra_scripts = ${esp32_base_idf5.extra_scripts}
|
||||
build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
-fexceptions
|
||||
board_build.filesystem = littlefs
|
||||
|
||||
|
||||
@@ -128,7 +133,7 @@ build_flags = ${esp32s3_common.build_flags}
|
||||
|
||||
|
||||
[env:custom_ESP32s3_8M1M_LittleFS_CDC]
|
||||
extends = esp32s3_common
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-8M
|
||||
build_flags = ${esp32s3_common_LittleFS.build_flags}
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
@@ -143,7 +148,7 @@ board = esp32s3cdc-qio_opi-8M
|
||||
|
||||
|
||||
[env:max_ESP32s3_8M1M_LittleFS_CDC]
|
||||
extends = esp32s3_common
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-8M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
@@ -160,7 +165,7 @@ board = esp32s3cdc-qio_opi-8M
|
||||
|
||||
|
||||
[env:custom_ESP32s3_16M8M_LittleFS_CDC]
|
||||
extends = esp32s3_common
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-16M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
@@ -178,7 +183,7 @@ board = esp32s3cdc-qio_opi-16M
|
||||
|
||||
|
||||
[env:max_ESP32s3_16M8M_LittleFS_CDC]
|
||||
extends = esp32s3_common
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_qspi-16M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
@@ -191,7 +196,7 @@ extra_scripts = ${esp32_common.extra_scripts}
|
||||
|
||||
|
||||
[env:max_ESP32s3_16M8M_LittleFS_OPI_PSRAM_CDC]
|
||||
extends = esp32s3_common
|
||||
extends = esp32s3_common_LittleFS
|
||||
board = esp32s3cdc-qio_opi-16M
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
ESP32_ping
|
||||
|
||||
@@ -405,6 +405,8 @@ void addHtmlInt(int16_t int_val) {
|
||||
addHtml(String(int_val));
|
||||
}
|
||||
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
#if defined(ESP32_CLASSIC) || defined(ESP32S2)|| defined(ESP32S3)
|
||||
void addHtmlInt(int int_val) {
|
||||
addHtml(String(int_val));
|
||||
}
|
||||
@@ -412,6 +414,8 @@ void addHtmlInt(int int_val) {
|
||||
void addHtmlInt(unsigned int int_val) {
|
||||
addHtml(String(int_val));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void addHtmlInt(int32_t int_val) {
|
||||
addHtml(String(int_val));
|
||||
|
||||
@@ -125,8 +125,14 @@ void addHtml(String&& html);
|
||||
void addHtmlInt(int8_t int_val);
|
||||
void addHtmlInt(int16_t int_val);
|
||||
void addHtmlInt(uint8_t int_val);
|
||||
|
||||
// FIXME TD-er: ESP_IDF 5.1 for all non-RISC-V treat int as different from int32_t
|
||||
#if ESP_IDF_VERSION_MAJOR >= 5
|
||||
#if defined(ESP32_CLASSIC) || defined(ESP32S2)|| defined(ESP32S3)
|
||||
void addHtmlInt(int int_val);
|
||||
void addHtmlInt(unsigned int int_val);
|
||||
#endif
|
||||
#endif
|
||||
void addHtmlInt(int32_t int_val);
|
||||
void addHtmlInt(uint32_t int_val);
|
||||
void addHtmlInt(int64_t int_val);
|
||||
|
||||
Reference in New Issue
Block a user