diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 000000000..552408790 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,122 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter, extra scripting +; Upload options: custom port, speed and extra flags +; Library options: dependencies, extra library storages +; +; Please visit documentation for the other options and examples +; http://docs.platformio.org/en/stable/projectconf.html + +[platformio] +src_dir = tasmota +build_dir = .pioenvs +build_cache_dir = .cache +extra_configs = platformio_tasmota_env.ini + platformio_override.ini + +; *** Build/upload environment +default_envs = +; *** Uncomment by deleting ";" in the line(s) below to select version(s) +; tasmota +; tasmota-ircustom ; alternative to 'tasmota' with full IR protocols activated, you will need to disable some features to keep code not too big +; tasmota-minimal +; tasmota-lite +; tasmota-knx +; tasmota-sensors +; tasmota-display +; tasmota-ir +; tasmota-BG +; tasmota-BR +; tasmota-CN +; tasmota-CZ +; tasmota-DE +; tasmota-ES +; tasmota-FR +; tasmota-GR +; tasmota-HE +; tasmota-HU +; tasmota-IT +; tasmota-KO +; tasmota-NL +; tasmota-PL +; tasmota-PT +; tasmota-RU +; tasmota-SE +; tasmota-SK +; tasmota-TR +; tasmota-TW +; tasmota-UK +; +; *** alternatively can be done in: platformio_override.ini +; *** See example: platformio_override_sample.ini +; ********************************************************************* + + +[common] +framework = arduino +board = esp01_1m +board_build.flash_mode = dout +board_build.ldscript = eagle.flash.1m.ld + +platform = ${core_active.platform} +platform_packages = ${core_active.platform_packages} +build_flags = ${core_active.build_flags} + +; ********************************************************************* +; *** Uncomment, by deleting ";" in line below, to use custom settings from file user_config_override.h +; -DUSE_CONFIG_OVERRIDE +; +; *** alternatively can be done in: platformio_override.ini +; *** See example: platformio_override_sample.ini +; ********************************************************************* + +; *** Fix espressif8266@1.7.0 induced undesired all warnings +build_unflags = -Wall + +board_build.f_cpu = 80000000L +monitor_speed = 115200 +upload_speed = 115200 +; *** Upload Serial reset method for Wemos and NodeMCU +upload_resetmethod = nodemcu +upload_port = COM5 +extra_scripts = ${scripts_defaults.extra_scripts} + +[scripts_defaults] +extra_scripts = pio/strip-floats.py + pio/name-firmware.py + +[esp82xx_defaults] +build_flags = -D NDEBUG + -mtarget-align + -Wl,-Map,firmware.map +; new mechanism to set the IRremoteESP8266 supported protocols: none except HASH, NEC, RC5, RC6 + -D_IR_ENABLE_DEFAULT_=false + -DDECODE_HASH=true -DDECODE_NEC=true -DSEND_NEC=true + -DDECODE_RC5=true -DSEND_RC5=true -DDECODE_RC6=true -DSEND_RC6=true + +[irremoteesp8266_full] +build_flags = -DUSE_IR_REMOTE_FULL + -U_IR_ENABLE_DEFAULT_ + -DDECODE_PRONTO=false -DSEND_PRONTO=false + +[core_active] +platform = ${core_2_6_1.platform} +platform_packages = ${core_2_6_1.platform_packages} +build_flags = ${core_2_6_1.build_flags} + +[core_2_6_1] +; *** Esp8266 core for Arduino version 2.6.1 +platform = espressif8266@2.3.0 +platform_packages = +build_flags = ${esp82xx_defaults.build_flags} + -Wl,-Teagle.flash.1m.ld + -DBEARSSL_SSL_BASIC +; NONOSDK22x_190703 = 2.2.2-dev(38a443e) + -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 +; lwIP 2 - Higher Bandwidth no Features + -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH +; VTABLES in Flash + -DVTABLES_IN_FLASH +; No exception code in firmware + -fno-exceptions + -lstdc++ diff --git a/platformio_override_sample.ini b/platformio_override_sample.ini index 9ac4084cd..814c1e75c 100644 --- a/platformio_override_sample.ini +++ b/platformio_override_sample.ini @@ -17,7 +17,7 @@ default_envs = ; *** Uncomment the line(s) below to select version(s) tasmota ; tasmota-debug -; tasmota-ircustom ; alternative to 'tasmota' with full IR protocols activated, you will need to disable some features to keep code not too big +; tasmota-ircustom ; tasmota-minimal ; tasmota-lite ; tasmota-knx @@ -54,24 +54,35 @@ build_flags = ${core_active.build_flags} upload_port = COM5 extra_scripts = ${scripts_defaults.extra_scripts} + pio/gzip-firmware.py pio/obj-dump.py ; *** Upload file to OTA server using SCP ;upload_port = user@host:/path ;extra_scripts = ${scripts_defaults.extra_scripts} -; pio/strip-floats.py, pio/sftp-uploader.py +; pio/strip-floats.py +; pio/sftp-uploader.py ; *** Upload file to OTA server in folder api/arduino using HTTP ;upload_port = domus1:80/api/upload-arduino.php ;extra_scripts = ${scripts_defaults.extra_scripts} -; pio/strip-floats.py, pio/http-uploader.py +; pio/strip-floats.py +; pio/http-uploader.py [core_active] ; Select one core set for platform and build_flags -platform = ${core_2_6_1.platform} -build_flags = ${core_2_6_1.build_flags} -;platform = ${core_2_6_2.platform} -;build_flags = ${core_2_6_2.build_flags} +;platform = ${core_2_6_1.platform} +;platform_packages = ${core_2_6_1.platform_packages} +;build_flags = ${core_2_6_1.build_flags} + +;platform = ${core_2_6_3.platform} +;platform_packages = ${core_2_6_3.platform_packages} +;build_flags = ${core_2_6_3.build_flags} + +platform = ${tasmota_core_stage.platform} +platform_packages = ${tasmota_core_stage.platform_packages} +build_flags = ${tasmota_core_stage.build_flags} + ;platform = ${core_stage.platform} ;platform_packages = ${core_stage.platform_packages} ;build_flags = ${core_stage.build_flags} @@ -80,6 +91,7 @@ build_flags = ${core_2_6_1.build_flags} [core_2_6_1] ; *** Esp8266 core for Arduino version 2.6.1 platform = espressif8266@2.3.0 +platform_packages = build_flags = ${esp82xx_defaults.build_flags} -Wl,-Teagle.flash.1m.ld -DBEARSSL_SSL_BASIC @@ -121,11 +133,11 @@ build_flags = ${esp82xx_defaults.build_flags} ; -fexceptions ; -lstdc++-exc -[core_2_6_2] -; *** Esp8266 core for Arduino version 2.6.2 -platform = espressif8266@2.3.1 +[core_2_6_3] +; *** Esp8266 core for Arduino version 2.6.3 +platform = espressif8266@2.3.3 +platform_packages = build_flags = ${esp82xx_defaults.build_flags} - -Wl,-Teagle.flash.1m.ld -DBEARSSL_SSL_BASIC ; NONOSDK221 ; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221 @@ -165,12 +177,55 @@ build_flags = ${esp82xx_defaults.build_flags} ; -fexceptions ; -lstdc++-exc +[tasmota_core_stage] +; *** Esp8266 core for Arduino version stable beta +platform = espressif8266@2.3.3 +platform_packages = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#abdd2bdbb6a5caf31807d82ebd7b447947a9c360 +build_flags = ${esp82xx_defaults.build_flags} + -DBEARSSL_SSL_BASIC +; NONOSDK221 +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221 +; NONOSDK22x_190313 +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190313 +; NONOSDK22x_190703 = 2.2.1+100-dev(38a443e) (Tasmota default) (Firmware 2K smaller than NONOSDK22x_191105) + -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 +; NONOSDK22x_191024 = 2.2.1+111-dev(5ab15d1) +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024 +; NONOSDK22x_191105 = 2.2.1+113-dev(bb83b9b) +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105 +; NONOSDK22x_191122 = 2.2.1+119-dev(a58da79) +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122 +; NONOSDK3V0 (known issues) +; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3 +; lwIP 1.4 +; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH +; lwIP 2 - Low Memory +; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY +; lwIP 2 - Higher Bandwidth +; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH +; lwIP 2 - Higher Bandwidth Low Memory no Features +; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH +; lwIP 2 - Higher Bandwidth no Features (Tasmota default) + -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH +; VTABLES in Flash (Tasmota default) + -DVTABLES_IN_FLASH +; VTABLES in Heap +; -DVTABLES_IN_DRAM +; VTABLES in IRAM +; -DVTABLES_IN_IRAM +; enable one option set -> No exception recommended +; No exception code in firmware + -fno-exceptions + -lstdc++ +; Exception code in firmware /needs much space! 90k +; -fexceptions +; -lstdc++-exc + [core_stage] ; *** Esp8266 core for Arduino version latest beta -platform = espressif8266@2.3.1 +platform = espressif8266@2.3.3 platform_packages = framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git build_flags = ${esp82xx_defaults.build_flags} - -Wl,-Teagle.flash.1m.ld -DBEARSSL_SSL_BASIC ; NONOSDK221 ; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221 diff --git a/platformio_tasmota_env.ini b/platformio_tasmota_env.ini index fd0571125..cfcd53686 100644 --- a/platformio_tasmota_env.ini +++ b/platformio_tasmota_env.ini @@ -3,6 +3,7 @@ platform = ${common.platform} platform_packages = ${common.platform_packages} framework = ${common.framework} board = ${common.board} +board_build.ldscript = ${common.board_build.ldscript} board_build.flash_mode = ${common.board_build.flash_mode} board_build.f_cpu = ${common.board_build.f_cpu} build_unflags = ${common.build_unflags} @@ -31,10 +32,10 @@ build_flags = ${common.build_flags} -DFIRMWARE_SENSORS build_flags = ${common.build_flags} -DFIRMWARE_DISPLAYS [env:tasmota-ir] -build_flags = ${common.build_flags} -DUSE_IR_REMOTE_FULL -DFIRMWARE_IR +build_flags = ${common.build_flags} ${irremoteesp8266_full.build_flags} -DFIRMWARE_IR [env:tasmota-ircustom] -build_flags = ${common.build_flags} -DUSE_IR_REMOTE_FULL +build_flags = ${common.build_flags} ${irremoteesp8266_full.build_flags} [env:tasmota-BG] build_flags = ${common.build_flags} -DMY_LANGUAGE=bg-BG @@ -97,4 +98,4 @@ build_flags = ${common.build_flags} -DMY_LANGUAGE=tr-TR build_flags = ${common.build_flags} -DMY_LANGUAGE=zh-TW [env:tasmota-UK] -build_flags = ${common.build_flags} -DMY_LANGUAGE=uk-UK +build_flags = ${common.build_flags} -DMY_LANGUAGE=uk-UA