Merge pull request #9706 from Jason2866/patch-3

Refactor PlatformIO
This commit is contained in:
Theo Arends 2020-11-02 09:22:22 +01:00 committed by GitHub
commit 2e795c1459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 475 additions and 438 deletions

View File

@ -107,12 +107,12 @@ build_flags = -Wno-deprecated-declarations
-DDECODE_HASH=true -DDECODE_NEC=true -DSEND_NEC=true
-DDECODE_RC5=true -DSEND_RC5=true -DDECODE_RC6=true -DSEND_RC6=true
; new mechanism to set the IRremoteESP8266 supported protocols: none except HASH, NEC, RC5, RC6
; *********************************************************************
; *** Use custom settings from file user_config_override.h
-DUSE_CONFIG_OVERRIDE
; *********************************************************************
[esp82xx_defaults]
build_flags = ${esp_defaults.build_flags}
-Wl,-Map,firmware.map
@ -137,6 +137,7 @@ build_flags = -DUSE_IR_REMOTE_FULL
-U_IR_ENABLE_DEFAULT_
-DDECODE_PRONTO=false -DSEND_PRONTO=false
[core]
; *** Esp8266 Tasmota modified Arduino core based on core 2.7.4
platform = espressif8266@2.6.2

View File

@ -72,29 +72,8 @@ extra_scripts = ${scripts_defaults.extra_scripts}
; pio/strip-floats.py
; pio/http-uploader.py
lib_ldf_mode = chain+
shared_libdeps_dir = lib
; *** Library disable / enable for variant Tasmota. Disable reduces compile time
; *** !!! Disabling needed libs will generate compile errors !!!
; *** The resulting firmware will NOT be different if you leave all libs enabled
; *** Disabling by putting a ";" in front of the lib name
; *** If you dont know what it is all about, do not change
lib_extra_dirs =
; *** Only disabled for Tasmota minimal and Tasmota light. For all other variants needed!
lib/lib_basic
; **** I2C devices. Most sensors. Disable only if you dont have ANY I2C device enabled
lib/lib_i2c
; *** Displays. Disable if you dont have any Display activated
lib/lib_display
; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated
lib/lib_ssl
; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable
lib/lib_audio
; *** RF 433 stuff (not RF Bridge). Recommended to disable
lib/lib_rf
; *** Mostly not used functions. Recommended to disable
lib/lib_div
lib_ldf_mode = ${library.lib_ldf_mode}
shared_libdeps_dir = ${library.shared_libdeps_dir}
[core]
; Activate only (one set) if you want to override the standard core defined in platformio.ini !!!
@ -180,21 +159,78 @@ build_flags = ${esp82xx_defaults.build_flags}
; -fexceptions
; -lstdc++-exc
[common32]
platform = ${core32.platform}
platform_packages = ${core32.platform_packages}
build_unflags = ${core32.build_unflags}
build_flags = ${core32.build_flags}
board = esp32dev
board_build.ldscript = esp32_out.ld
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_flash = ${common.board_build.f_flash}
board_build.f_cpu = ${common.board_build.f_cpu}
monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = 921600
extra_scripts = ${common.extra_scripts}
lib_ldf_mode = ${library.lib_ldf_mode}
shared_libdeps_dir = ${library.shared_libdeps_dir}
; *** ESP32 lib. ALWAYS needed for ESP32 !!!
lib/libesp32
[core32]
; Activate Stage Core32 by removing ";" in next lines, if you want to override the standard core32
; Activate Stage Core32 by removing ";" in next 4 lines, if you want to override the standard core32
;platform = ${core32_stage.platform}
;platform_packages = ${core32_stage.platform_packages}
;build_unflags = ${core32_stage.build_unflags}
;build_flags = ${core32_stage.build_flags}
[core32_stage]
platform = espressif32@2.0.0
platform_packages = tool-esptoolpy@1.20800.0
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#f7fb00632e04d74a7890a77fa7dbbb8ae572e866
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
-D ESP32_STAGE=true
[library]
lib_ldf_mode = chain+
shared_libdeps_dir = lib
; *** Library disable / enable for variant Tasmota(32). Disable reduces compile time
; *** !!! Disabling needed libs will generate compile errors !!!
; *** The resulting firmware will NOT be different if you leave all libs enabled
; *** Disabling by putting a ";" in front of the lib name
; *** If you dont know what it is all about, do not change
lib_extra_dirs =
; *** Only disabled for Tasmota minimal and Tasmota light. For all other variants needed!
lib/lib_basic
; **** I2C devices. Most sensors. Disable only if you dont have ANY I2C device enabled
lib/lib_i2c
; *** Displays. Disable if you dont have any Display activated
lib/lib_display
; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated
lib/lib_ssl
; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable
lib/lib_audio
; *** RF 433 stuff (not RF Bridge). Recommended to disable
lib/lib_rf
; *** Mostly not used functions. Recommended to disable
lib/lib_div
; *** Debug version used for PlatformIO Home Project Inspection
[env:tasmota-debug]
build_type = debug
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
-Wstack-usage=300
; -Wstack-usage=300
[env:tasmota32-debug]
extends = env:tasmota32
build_type = debug
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
; -Wstack-usage=300

View File

@ -40,25 +40,21 @@ default_envs = ${build_envs.default_envs}
; tasmota32-VN
[common32]
board = esp32dev
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.ldscript = esp32_out.ld
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
platform = ${core32.platform}
platform_packages = ${core32.platform_packages}
build_unflags = ${esp_defaults.build_unflags}
-Wpointer-arith
build_unflags = ${core32.build_unflags}
build_flags = ${core32.build_flags}
board_build.f_cpu = ${common.board_build.f_cpu}
board = esp32dev
board_build.ldscript = esp32_out.ld
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_flash = ${common.board_build.f_flash}
board_build.f_cpu = ${common.board_build.f_cpu}
monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = 921600
extra_scripts = ${common.extra_scripts}
lib_ldf_mode = chain+
shared_libdeps_dir = lib
lib_extra_dirs =
@ -72,6 +68,8 @@ lib_extra_dirs =
lib/lib_div
[esp32_defaults]
build_unflags = ${esp_defaults.build_unflags}
-Wpointer-arith
build_flags = ${esp_defaults.build_flags}
-D CORE_DEBUG_LEVEL=0
-D BUFFER_LENGTH=128
@ -85,8 +83,10 @@ build_flags = ${esp_defaults.build_flags}
-D memcpy_P=memcpy
-D memcmp_P=memcmp
[core32]
platform = espressif32@2.0.0
platform_packages = tool-esptoolpy@1.20800.0
platformio/framework-arduinoespressif32 @ 3.10004.201016
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}