@ -37,57 +37,80 @@ platform_2_3_0 = espressif8266@1.5.0
platform_latest = espressif8266@2.4.0
platform_latest = espressif8266@2.4.0
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# FLAGS: DEBUG
#
# FLASH SIZE:
# configurations for 512k/1m/... ESP's are different because we use Linker Scripts to adjust flash split
# board_512k, ldscript_512k ( 512 KB) = 487 KB sketch, 4 KB eeprom, 16 KB reserved
# board_512k, ldscript_1m0m (1024 KB) = 999 KB sketch, 4 KB eeprom, 16 KB reserved
# board_512k, ldscript_2m1m (2048 KB) = 1019 KB sketch, 16 KB eeprom, 992 KB spiffs, 16 KB reserved
# board_512k, ldscript_4m1m (4096 KB) = 1019 KB sketch, 16 KB eeprom, 992 KB spiffs, 16 KB reserved, 2048 KB empty/ota?
# board_512k, ldscript_4m3m (4096 KB) = 1019 KB sketch, 16 KB eeprom, 3040 KB spiffs, 16 KB reserved
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
board_512k = esp01
ldscript_512k = eagle.flash.512k0m1s.ld
board_1m = esp01_1m
ldscript_1m = eagle.flash.1m0m1s.ld
board_2m = esp_wroom_02
ldscript_2m = eagle.flash.2m1m4s.ld
debug_flags = -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
#if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h"
board_4m = esp12e
ldscript_4m = eagle.flash.4m1m4s.ld
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# FLAGS: build flags
# build flags for 512k/1m ESP's are different because we use Linker Scripts to adjust flash split
# build_flags_512k ( 512 KB) = 487 KB sketch, 4 KB eeprom, 16 KB reserved
# build_flags_1m0m (1024 KB) = 999 KB sketch, 4 KB eeprom, 16 KB reserved
# build_flags_2m1m (2048 KB) = 1019 KB sketch, 16 KB eeprom, 992 KB spiffs, 16 KB reserved
# build_flags_4m1m (4096 KB) = 1019 KB sketch, 16 KB eeprom, 992 KB spiffs, 16 KB reserved, 2048 KB empty/ota?
# build_flags_4m3m (4096 KB) = 1019 KB sketch, 16 KB eeprom, 3040 KB spiffs, 16 KB reserved
# GLOBAL BUILD FLAGS:
#
#
# Available lwIP variants (macros):
# Available lwIP variants (macros):
# -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (default)
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY = v2 Lower Memory
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH = v2 Higher Bandwidth
#
# BearSSL performance:
# When building with -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL, please add `board_build.f_cpu = 160000000` to the environment configuration
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH = v2 Higher Bandwidth (default)
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY = v2 Lower Memory (TCP MSS set to 536, MSS * 2 send buffer)
# -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (deprecated, **not recommended**)
#
#
# BearSSL ciphers :
# When building on core >= 2.5 , you can add the build flag -DBEARSSL_SSL_BASIC in order to build BearSSL with a limited set of ciphers:
# BearSSL:
# When building with -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL, you can add the build flag -DBEARSSL_SSL_BASIC in order to build BearSSL with a limited set of ciphers:
# TLS_RSA_WITH_AES_128_CBC_SHA256 / AES128-SHA256
# TLS_RSA_WITH_AES_128_CBC_SHA256 / AES128-SHA256
# TLS_RSA_WITH_AES_256_CBC_SHA256 / AES256-SHA256
# TLS_RSA_WITH_AES_256_CBC_SHA256 / AES256-SHA256
# TLS_RSA_WITH_AES_128_CBC_SHA / AES128-SHA
# TLS_RSA_WITH_AES_128_CBC_SHA / AES128-SHA
# TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA
# TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA
# This reduces the OTA size with ~45KB, so it's especially useful on low memory boards (512k/1m).
# This reduces total .bin size by about ~45KB, so it's especially useful on low memory boards (512k/1m).
#
# It is **recommended** to add `board_build.f_cpu = 160000000` to the environment configuration
# (either in `[env]` to set globally or `[env:...]` to use with the specific environment).
#
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
build_flags = -g -w -DNO_GLOBAL_EEPROM -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
build_flags = -g -w -DNO_GLOBAL_EEPROM -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
board_512k = esp01
ldscript_512k = eagle.flash.512k0m1s.ld
board_1m = esp01_1m
ldscript_1m = eagle.flash.1m0m1s.ld
board_2m = esp_wroom_02
ldscript_2m = eagle.flash.2m1m4s.ld
# ------------------------------------------------------------------------------
# DEBUG BUILD FLAGS
# build flags for the Core, must be set as global build_flag
# (src_build_flags would not work)
#
# [env:nodemcu-lolin-debug]
# extends = env:nodemcu-lolin
# build_flags = ${common.build_flags} ${common.debug_flags}
#
# ------------------------------------------------------------------------------
debug_flags =
-DDEBUG_ESP_CORE
-DDEBUG_ESP_WIFI
-DDEBUG_ESP_HTTP_CLIENT
-DDEBUG_ESP_HTTP_SERVER
-DDEBUG_ESP_HTTP_UPDATE
-DDEBUG_ESP_UPDATER
-DDEBUG_ESP_OTA
-DDEBUG_ESP_SSL
-DDEBUG_ESP_UPDATER
-DDEBUG_TLS_MEM
-DDEBUG_ESP_MDNS
# For memleaks etc, add:
# -DDEBUG_ESP_OOM
# -DDEBUG_ESP_TLS_MEM
board_4m = esp12e
ldscript_4m = eagle.flash.4m1m4s.ld
shared_libdeps_dir = libraries/
shared_libdeps_dir = libraries/
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# COMMON SETTINGS:
# COMMON ENVIRONMENT SETTINGS:
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
[env]
[env]
platform = ${common.platform_2_3_0}
platform = ${common.platform_2_3_0}
@ -137,6 +160,13 @@ lib_deps =
lib_ignore =
lib_ignore =
AsyncTCP
AsyncTCP
# ------------------------------------------------------------------------------
# Base enrivonments, -DMANUFACTURER=..., -DDEVICE=... must be set:
# - by using specific hardware.h entry, like -DITEAD_SONOFF_BASIC
# - by setting PLATFORMIO_SRC_BUILD_FLAGS=... environment variable
# - by setting ESPURNA_FLAGS=... environment variable
# ------------------------------------------------------------------------------
[env:esp8266-512k-base]
[env:esp8266-512k-base]
board = ${common.board_512k}
board = ${common.board_512k}
board_build.ldscript = ${common.ldscript_512k}
board_build.ldscript = ${common.ldscript_512k}
@ -153,36 +183,36 @@ board_build.ldscript = ${common.ldscript_2m}
board = ${common.board_4m}
board = ${common.board_4m}
board_build.ldscript = ${common.ldscript_4m}
board_build.ldscript = ${common.ldscript_4m}
[env:esp8266-latest-1m -base]
[env:esp8266-1m- latest-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_1m}
board = ${common.board_1m}
board_build.ldscript = ${common.ldscript_1m}
board_build.ldscript = ${common.ldscript_1m}
[env:esp8266-latest-2m -base]
[env:esp8266-2m- latest-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_2m}
board = ${common.board_2m}
board_build.ldscript = ${common.ldscript_2m}
board_build.ldscript = ${common.ldscript_2m}
[env:esp8266-latest-4m -base]
[env:esp8266-4m- latest-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_4m}
board = ${common.board_4m}
board_build.ldscript = ${common.ldscript_4m}
board_build.ldscript = ${common.ldscript_4m}
[env:esp8266-git-1m -base]
[env:esp8266-1m- git-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_1m}
board = ${common.board_1m}
platform_packages =
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
board_build.ldscript = ${common.ldscript_1m}
board_build.ldscript = ${common.ldscript_1m}
[env:esp8266-git-2m -base]
[env:esp8266-2m- git-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_2m}
board = ${common.board_2m}
platform_packages =
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
board_build.ldscript = ${common.ldscript_2m}
board_build.ldscript = ${common.ldscript_2m}
[env:esp8266-git-4m -base]
[env:esp8266-4m- git-base]
platform = ${common.platform_latest}
platform = ${common.platform_latest}
board = ${common.board_4m}
board = ${common.board_4m}
platform_packages =
platform_packages =
@ -190,7 +220,7 @@ platform_packages =
board_build.ldscript = ${common.ldscript_4m}
board_build.ldscript = ${common.ldscript_4m}
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# ESPURNA CORE BUILDS
# ESPURNA CORE BUILDS (2-step OTA)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
[env:espurna-core-1MB]
[env:espurna-core-1MB]
@ -236,12 +266,20 @@ src_build_flags = -DESPURNA_CORE
build_flags = ${common.build_flags} -DJUSTWIFI_ENABLE_WPS=1
build_flags = ${common.build_flags} -DJUSTWIFI_ENABLE_WPS=1
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# ESPURNA BASE BUILD ( CORE with WebUI, tuya-convert)
# ESPURNA CORE with WebUI
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
[env:espurna-base -1MB]
[env:espurna-core-webui -1MB]
extends = env:esp8266-1m-base
extends = env:esp8266-1m-base
src_build_flags = -DESPURNA_BASE
src_build_flags = -DESPURNA_CORE_WEB
[env:espurna-core-webui-2MB]
extends = env:esp8266-2m-base
src_build_flags = -DESPURNA_CORE_WEB
[env:espurna-core-webui-4MB]
extends = env:esp8266-4m-base
src_build_flags = -DESPURNA_CORE_WEB
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# DEVELOPMENT BOARDS
# DEVELOPMENT BOARDS
@ -262,16 +300,16 @@ extends = env:esp8266-4m-base
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
[env:nodemcu-lolin-latest]
[env:nodemcu-lolin-latest]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
[env:nodemcu-lolin-secure-client-asynctcp]
[env:nodemcu-lolin-secure-client-asynctcp]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
build_flags = ${common.build_flags} -DASYNC_TCP_SSL_ENABLED=1
build_flags = ${common.build_flags} -DASYNC_TCP_SSL_ENABLED=1
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
src_build_flags = -DNODEMCU_LOLIN -DNOWSAUTH
[env:nodemcu-lolin-secure-client]
[env:nodemcu-lolin-secure-client]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
board_build.f_cpu = 160000000
board_build.f_cpu = 160000000
src_build_flags =
src_build_flags =
-DNODEMCU_LOLIN -DNOWSAUTH
-DNODEMCU_LOLIN -DNOWSAUTH
@ -284,23 +322,23 @@ src_build_flags =
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
[env:tinkerman-espurna-h06]
[env:tinkerman-espurna-h06]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DTINKERMAN_ESPURNA_H06
src_build_flags = -DTINKERMAN_ESPURNA_H06
[env:tinkerman-espurna-h08]
[env:tinkerman-espurna-h08]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DTINKERMAN_ESPURNA_H08
src_build_flags = -DTINKERMAN_ESPURNA_H08
[env:tinkerman-espurna-switch]
[env:tinkerman-espurna-switch]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DTINKERMAN_ESPURNA_SWITCH
src_build_flags = -DTINKERMAN_ESPURNA_SWITCH
[env:wemos-d1-tarpunashield]
[env:wemos-d1-tarpunashield]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DWEMOS_D1_TARPUNA_SHIELD
src_build_flags = -DWEMOS_D1_TARPUNA_SHIELD
[env:tinkerman-rfm69gw]
[env:tinkerman-rfm69gw]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
board = esp12e
board = esp12e
src_build_flags = -DTINKERMAN_RFM69GW -DNOWSAUTH
src_build_flags = -DTINKERMAN_RFM69GW -DNOWSAUTH
@ -339,11 +377,11 @@ extends = env:esp8266-1m-base
src_build_flags = -DGENERIC_ESP01S_DS18B20_V10
src_build_flags = -DGENERIC_ESP01S_DS18B20_V10
[env:generic-esp01s-pzem004t]
[env:generic-esp01s-pzem004t]
extends = env:esp8266-latest-1m -base
extends = env:esp8266-1m- latest-base
src_build_flags = -DGENERIC_PZEM004T -DDISABLE_POSTMORTEM_STACKDUMP
src_build_flags = -DGENERIC_PZEM004T -DDISABLE_POSTMORTEM_STACKDUMP
[env:generic-esp12e-pzem004t]
[env:generic-esp12e-pzem004t]
extends = env:esp8266-latest-4m -base
extends = env:esp8266-4m- latest-base
src_build_flags = -DGENERIC_PZEM004T -DDISABLE_POSTMORTEM_STACKDUMP
src_build_flags = -DGENERIC_PZEM004T -DDISABLE_POSTMORTEM_STACKDUMP
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------