[esp32_base_idf5_5] extends = common, core_esp32_IDF5_5_0__3_2_0_LittleFS upload_speed = 460800 upload_before_reset = default_reset upload_after_reset = hard_reset extra_scripts = pre:tools/pio/pre_esp32.py post:tools/pio/post_esp32.py ${extra_scripts_default.extra_scripts} post:tools/pio/copy_files.py ; 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 ; When using LTO, make sure NOT to use -mtext-section-literals ; -mtext-section-literals may be required when building large builds ; However LTO cannot optimize builds with text section literals and thus will result in quite a lot larger builds (80k - 140k larger) build_unflags = -Wall -fno-lto build_flags = ${core_esp32_IDF5_5_0__3_2_0_LittleFS.build_flags} ; ${mqtt_flags.build_flags} -DMQTT_MAX_PACKET_SIZE=2048 -DCONFIG_FREERTOS_ASSERT_DISABLE -DCONFIG_LWIP_ESP_GRATUITOUS_ARP -fno-strict-aliasing -flto=auto -Wswitch -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_NONE ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO ; -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE -DLWIP_IPV6=1 -DCONFIG_BT_NIMBLE_NVS_PERSIST=y monitor_filters = esp32_exception_decoder lib_ignore = ${core_esp32_IDF5_5_0__3_2_0_LittleFS.lib_ignore} [esp32_always] lib_ignore = ESP8266Ping ESP8266HTTPUpdateServer ESP8266WiFi ESP8266WebServer ESP8266mDNS ESPEasy_ESP8266Ping RABurton ESP8266 Mutex TinyWireM LittleFS_esp32 Adafruit NeoPixel ${esp32_base_idf5_5.lib_ignore} [esp32_common_LittleFS] extends = esp32_base_idf5_5 build_flags = ${esp32_base_idf5_5.build_flags} ; -mtext-section-literals -DESP32_CLASSIC -DUSE_LITTLEFS build_unflags = ${esp32_base_idf5_5.build_unflags} extra_scripts = ${esp32_base_idf5_5.extra_scripts} board_build.filesystem = littlefs lib_ignore = ${esp32_always.lib_ignore} ESP32_ping ESP32 BLE Arduino ${esp32_base_idf5_5.lib_ignore} [esp32_common_LittleFS_ETH] extends = esp32_common_LittleFS build_flags = ${esp32_common_LittleFS.build_flags} -DFEATURE_ETHERNET=1 [esp32_IRExt_LittleFS_ETH] extends = esp32_common_LittleFS_ETH lib_ignore = ${esp32_always.lib_ignore} ESP32_ping build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ETHERNET=1 -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_BUILD_NORMAL_IRext -DCOLLECTION_FEATURE_RTTTL=1 -DLIMIT_BUILD_SIZE extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts} pre:tools/pio/ir_build_check.py [esp32_custom_base_LittleFS] extends = esp32_common_LittleFS_ETH build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DPLUGIN_BUILD_CUSTOM extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts} pre:tools/pio/pre_custom_esp32.py [env:custom_ESP32_4M316k_LittleFS_ETH] extends = esp32_custom_base_LittleFS board = esp32_4M build_flags = ${esp32_custom_base_LittleFS.build_flags} -DFEATURE_ETHERNET=1 [env:custom_ESP32_16M8M_LittleFS_ETH] extends = env:custom_ESP32_4M316k_LittleFS_ETH board = esp32_16M8M board_upload.flash_size = 16MB build_flags = ${env:custom_ESP32_4M316k_LittleFS_ETH.build_flags} [env:custom_IR_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DPLUGIN_BUILD_CUSTOM -DPLUGIN_BUILD_IR lib_ignore = ${esp32_always.lib_ignore} ESP32_ping extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts} pre:tools/pio/pre_custom_esp32_IR.py pre:tools/pio/ir_build_check.py [env:custom_ESP32_4M2M_NO_OTA_LittleFS_ETH] extends = env:custom_ESP32_4M316k_LittleFS_ETH board = esp32_4M2M build_flags = ${env:custom_ESP32_4M316k_LittleFS_ETH.build_flags} -DNO_HTTP_UPDATER [env:collection_A_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_ESP32 -DPLUGIN_SET_COLLECTION_A_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_B_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_B_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_C_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_C_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_D_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_D_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_E_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_E_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_F_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_F_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_G_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_SET_COLLECTION_G_ESP32 -DCOLLECTION_FEATURE_RTTTL=1 [env:collection_A_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_ESP32 -DPLUGIN_SET_COLLECTION_A_ESP32 [env:collection_B_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_B_ESP32 [env:collection_C_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_C_ESP32 [env:collection_D_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_D_ESP32 [env:collection_E_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_E_ESP32 [env:collection_F_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_F_ESP32 [env:collection_G_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} -DPLUGIN_SET_COLLECTION_G_ESP32 [env:energy_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_ENERGY_COLLECTION [env:display_ESP32_4M316k_LittleFS] extends = esp32_common_LittleFS board = esp32_4M build_flags = ${esp32_common_LittleFS.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_DISPLAY_COLLECTION -D ST7789_EXTRA_INIT=1 -D P116_EXTRA_ST7789=1 [env:climate_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M lib_ignore = ${esp32_always.lib_ignore} ESP32_ping ${esp32_common_LittleFS_ETH.lib_ignore} ${no_ir.lib_ignore} build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DPLUGIN_CLIMATE_COLLECTION [env:neopixel_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DFEATURE_SD=1 -D PLUGIN_NEOPIXEL_COLLECTION [env:custom_IR_ESP32_16M8M_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_16M8M board_upload.flash_size = 16MB build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DPLUGIN_BUILD_CUSTOM -DPLUGIN_BUILD_IR lib_ignore = ${esp32_always.lib_ignore} ESP32_ping ${esp32_common_LittleFS_ETH.lib_ignore} extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts} pre:tools/pio/pre_custom_esp32_IR.py pre:tools/pio/ir_build_check.py [env:normal_ESP32_4M316k_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_4M lib_ignore = ${esp32_always.lib_ignore} ESP32_ping ${esp32_common_LittleFS_ETH.lib_ignore} ${no_ir.lib_ignore} build_flags = ${esp32_common_LittleFS_ETH.build_flags} [env:normal_ESP32_IRExt_4M316k_LittleFS_ETH] extends = esp32_IRExt_LittleFS_ETH board = esp32_4M build_flags = ${esp32_IRExt_LittleFS_ETH.build_flags} ; ESP32 MAX builds 16M flash ------------------------------ ; A Lolin D32 PRO with 16MB Flash, allowing 4MB sketch size, and file storage using LittleFS filesystem [env:max_ESP32_16M8M_LittleFS_ETH] extends = esp32_common_LittleFS_ETH board = esp32_16M8M board_upload.flash_size = 16MB lib_ignore = ${esp32_always.lib_ignore} ESP32_ping ${esp32_common_LittleFS_ETH.lib_ignore} build_flags = ${esp32_common_LittleFS_ETH.build_flags} -DFEATURE_ARDUINO_OTA=1 -DPLUGIN_BUILD_MAX_ESP32 -DPLUGIN_BUILD_IR_EXTENDED -D ST7789_EXTRA_INIT=1 -D P116_EXTRA_ST7789=1 extra_scripts = ${esp32_common_LittleFS_ETH.extra_scripts} board_build.filesystem = littlefs ; If you have a board with Ethernet integrated and 16MB Flash, then this configuration could be enabled, it's based on the max_ESP32_16M8M_LittleFS definition ; [env:max_ESP32_16M8M_LittleFS_ETH] ; extends = env:max_ESP32_16M8M_LittleFS ; board = ${env:max_ESP32_16M8M_LittleFS.board} ; build_flags = ${env:max_ESP32_16M8M_LittleFS.build_flags}