; ********************************************************************* ; **** Definition cheat sheet: ; board_build.flash_mode in terms of performance: QIO > QOUT > DIO > DOUT ; for lib_ldf_mode, see http://docs.platformio.org/en/latest/librarymanager/ldf.html;ldf ; **** Frequently used build flags: ; Use Custom.h file to override default settings for ESPeasy: -D USE_CUSTOM_H (set via python script when needed) ; Set VCC mode to measure Vcc of ESP chip : -D FEATURE_ADC_VCC=1 ; Build Flags: ; -DUSE_CONFIG_OVERRIDE ; lwIP 1.4 (Default) ; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH ; lwIP 2 - Low Memory ; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY ; lwIP 2 - Higher Bandwitdh ; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH ; VTABLES in Flash (default) ; -DVTABLES_IN_FLASH ; VTABLES in Heap ; -DVTABLES_IN_DRAM ; VTABLES in IRAM ; -DVTABLES_IN_IRAM ; NO_EXTRA_4K_HEAP - this forces the default NONOS-SDK user's heap location ; Default currently overlaps cont stack (Arduino) with sys stack (System) ; to save up-to 4 kB of heap. (starting core_2.4.2) ; ESP8266_DISABLE_EXTRA4K - Calls disable_extra4k_at_link_time() from setup ; to force the linker keep user's stack in user ram. ; CONT_STACKSIZE to set the 'cont' (Arduino) stack size. Default = 4096 ; -mtarget-align see: https://github.com/arendst/Sonoff-Tasmota/issues/3678#issuecomment-419712437 [esp82xx_defaults] build_flags = -D NDEBUG -DESP8266 -lstdc++ -lsupc++ -mtarget-align -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -DVTABLES_IN_FLASH -DPUYA_SUPPORT=1 -DDISABLE_SC16IS752_SPI -DCRON_USE_LOCAL_TIME -fno-strict-aliasing -I$PROJECT_DIR/src/include -include "ESPEasy_config.h" lib_ignore = ESP32_ping ESP32WebServer ESP32HTTPUpdateServer ServoESP32 IRremoteESP8266 HeatpumpIR TinyWireM ESP8266SdFat SD(esp8266) SD SDFS LittleFS(esp8266) LittleFS ArduinoOTA ESP8266mDNS I2C AXP192 Power management ; EspSoftwareSerial ; Keep optimization flag to -O2 ; See: https://github.com/platformio/platform-espressif8266/issues/288 ; For "-fno-strict-aliasing" ; See: https://github.com/esp8266/Arduino/issues/8261 ; Suggestion to go for -Os: https://www.youtube.com/watch?v=cqHH2NXcf5E [esp82xx_2_7_x] build_flags = -DNDEBUG -DESP8266 -mtarget-align -DVTABLES_IN_FLASH -fno-exceptions -lstdc++ ; NONOSDK22x_190703 = 2.2.2-dev(38a443e) -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH -DPUYA_SUPPORT=1 -DCORE_POST_2_5_0 -DDISABLE_SC16IS752_SPI -DCRON_USE_LOCAL_TIME -fno-strict-aliasing -DLIBRARIES_NO_LOG=1 -DNO_GLOBAL_I2S -I$PROJECT_DIR/src/include -include "ESPEasy_config.h" -Os -s -DBEARSSL_SSL_BASIC -DCORE_POST_2_6_0 -DPR_9453_FLUSH_TO_CLEAR=flush ; remove the 4-bytes alignment for PSTR() -DPSTR_ALIGN=1 -Werror=return-type build_unflags = ${esp82xx_common.build_unflags} lib_ignore = ${esp82xx_defaults.lib_ignore} EspSoftwareSerial [esp82xx_3_0_x] build_flags = ${esp82xx_2_7_x.build_flags} -DCORE_POST_3_0_0 -DESP8266 -Wno-deprecated-declarations ; -flto=auto ; -Wl,-flto build_unflags = -DDEBUG_ESP_PORT -fexceptions -Wall ; -fno-lto lib_ignore = ${esp82xx_defaults.lib_ignore} extra_scripts = pre:tools/pio/pre_custom_esp8266_toolchain.py ; See for SDK flags: https://github.com/esp8266/Arduino/blob/master/tools/platformio-build.py [core_2_7_4] extends = esp82xx_2_7_x platform = espressif8266@2.6.3 platform_packages = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#2.7.4 build_flags = ${esp82xx_2_7_x.build_flags} -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 -DUSES_LATEST_SOFTWARE_SERIAL_LIBRARY=0 -Wno-deprecated-declarations -DLIBRARIES_NO_LOG=1 lib_ignore = ${esp82xx_2_7_x.lib_ignore} build_unflags = ${esp82xx_2_7_x.build_unflags} extra_scripts = ${esp82xx_common.extra_scripts} [core_stage] extends = esp82xx_3_0_x platform = espressif8266@4.2.1 platform_packages = build_flags = ${esp82xx_3_0_x.build_flags} -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3 -DUSES_LATEST_SOFTWARE_SERIAL_LIBRARY=1 -DLIBRARIES_NO_LOG=1 -DFP_IN_IRAM -DPHASE_LOCKED_WAVEFORM build_unflags = ${esp82xx_3_0_x.build_unflags} lib_ignore = ${esp82xx_defaults.lib_ignore} extra_scripts = ${esp82xx_common.extra_scripts} ; See: https://arduino-esp8266.readthedocs.io/en/latest/mmu.html [core_stage_2ndheap] extends = esp82xx_3_0_x platform = espressif8266@4.2.1 platform_packages = build_flags = ${esp82xx_3_0_x.build_flags} -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3 -DUSES_LATEST_SOFTWARE_SERIAL_LIBRARY=1 -DLIBRARIES_NO_LOG=1 -DPHASE_LOCKED_WAVEFORM -DPIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48_SECHEAP_SHARED -DUSE_SECOND_HEAP build_unflags = ${esp82xx_3_0_x.build_unflags} lib_ignore = ${core_stage.lib_ignore} extra_scripts = ${esp82xx_common.extra_scripts} ; ESP_IDF 5.5.0 [core_esp32_IDF5_5_1__3_3_3_LittleFS] ;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc15 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/0410-1232-5.5/framework-arduinoespressif32-release_v5.5-2f303469.tar.xz ;platform = https://github.com/Jason2866/platform-espressif32.git#23aed73e4e570d3b6608c15677fea01d6a722d94 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1311-2008-5.5_orig/framework-arduinoespressif32-release_v5.5_orig-276436da.tar.xz ;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc15 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1002-1125-5.5_gcc151/framework-arduinoespressif32-release_v5.5_gcc151-7eede06a.tar.xz ;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc152 ;platform_packages = ;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc15 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/1002-1125-5.5_gcc151/framework-arduinoespressif32-release_v5.5_gcc151-7eede06a.tar.xz ;platform = https://github.com/Jason2866/platform-espressif32.git#IDF6 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2403-0020-6.0/framework-arduinoespressif32-release_v6.0-1a97ddaa.tar.xz ;platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc152 ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2904-2115-5.5/framework-arduinoespressif32-release_v5.5-f2a3fa2b.tar.xz platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF55_gcc152 platform_packages = ;platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/2805-1324-5.5/framework-arduinoespressif32-release_v5.5-f3cdb9d0.tar.xz custom_remove_include = true custom_component_remove = espressif/esp_wifi_remote espressif/esp-dsp espressif/esp32-camera espressif/libsodium espressif/esp-modbus espressif/qrcode espressif/esp_insights espressif/esp_diag_data_store espressif/esp_diagnostics espressif/esp_rainmaker espressif/rmaker_common build_flags = -DESP32_STAGE ; -DESP_IDF_VERSION_MAJOR=6 -DESP_IDF_VERSION_MAJOR=5 -DLIBRARIES_NO_LOG=1 -DDISABLE_SC16IS752_SPI ; -DCONFIG_PM_ENABLE=0 -DETH_TYPE_JL1101_SUPPORTED=1 -DETH_PHY_LAN867X_SUPPORTED=1 ; PR_9453_FLUSH_TO_CLEAR_REVERTED -DPR_9453_FLUSH_TO_CLEAR=clear ; -DCONFIG_LWIP_L2_TO_L3_COPY ; -DETH_SPI_SUPPORTS_NO_IRQ=1 -DCONFIG_FREERTOS_USE_TICKLESS_IDLE=1 -DCONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3 -DNEOPIXEL_ESP32_RMT_DEFAULT -DCRON_USE_LOCAL_TIME -I$PROJECT_DIR/src/include -include "sdkconfig.h" -include "ESPEasy_config.h" -include "esp32x_fixes.h" -DUPDATE_NOCRYPT -Os ; -Wnull-dereference -DNO_GLOBAL_ESP_NOW -DNO_GLOBAL_EEPROM -DNO_GLOBAL_INSIGHTS -DNO_GLOBAL_NETBIOS -DNO_GLOBAL_OPENTHREAD -DNO_GLOBAL_MATTER -DNO_GLOBAL_ZIGBEE -DNO_GLOBAL_SPIFFS -DNO_GLOBAL_OPENTHREADCLI -DNO_GLOBAL_WIFIPROV ; -Wsuggest-override -mstrict-align lib_ignore = BLE Zigbee ESP RainMaker ESP Insights Matter WiFiProv TFLite Micro ESP_SR NetBIOS lib_extra_dirs = lib/lib_ssl ; Regarding the define PR_9453_FLUSH_TO_CLEAR ; See: ; https://github.com/espressif/arduino-esp32/pull/8871/files ; https://github.com/espressif/arduino-esp32/pull/9453/files