More refactor Platformio

This commit is contained in:
Jason2866 2021-06-22 18:38:54 +02:00
parent 213e49e998
commit 9fdb86abe9
6 changed files with 146 additions and 169 deletions

View File

@ -25,15 +25,14 @@ extra_configs = platformio_tasmota32.ini
platformio_override.ini platformio_override.ini
[common] [common]
framework = arduino
board_build.filesystem = littlefs
custom_unpack_dir = unpacked_littlefs
board = esp8266_1M
platform = ${core.platform} platform = ${core.platform}
platform_packages = ${core.platform_packages} platform_packages = ${core.platform_packages}
framework = arduino
board = esp8266_1M
board_build.filesystem = littlefs
custom_unpack_dir = unpacked_littlefs
build_unflags = ${core.build_unflags} build_unflags = ${core.build_unflags}
build_flags = ${core.build_flags} build_flags = ${core.build_flags}
monitor_speed = 115200 monitor_speed = 115200
monitor_port = COM5 monitor_port = COM5
; *** Upload Serial reset method for Wemos and NodeMCU ; *** Upload Serial reset method for Wemos and NodeMCU

View File

@ -61,8 +61,8 @@ build_flags = ${common.build_flags}
; -DDEBUG_TASMOTA_SENSOR ; -DDEBUG_TASMOTA_SENSOR
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}
; *** Serial port used for erasing/flashing the ESP82xx ; *** Serial port used for erasing/flashing the ESP82xx
upload_port = ${common.upload_port} ;upload_port = ${common.upload_port}
;upload_port = COM5 upload_port = COM5
upload_resetmethod = ${common.upload_resetmethod} upload_resetmethod = ${common.upload_resetmethod}
extra_scripts = ${scripts_defaults.extra_scripts} extra_scripts = ${scripts_defaults.extra_scripts}
; pio-tools/obj-dump.py ; pio-tools/obj-dump.py
@ -90,27 +90,27 @@ lib_extra_dirs = ${library.lib_extra_dirs}
[env:tasmota32_base] [env:tasmota32_base]
framework = ${common.framework} framework = ${common.framework}
platform = ${common32.platform} platform = ${core32.platform}
platform_packages = ${common32.platform_packages} platform_packages = ${core32.platform_packages}
; Build variant ESP32 4M Flash, Tasmota 1856k Code/OTA, 320k LITTLEFS (default) ; Build variant ESP32 4M Flash, Tasmota 1856k Code/OTA, 320k LITTLEFS (default)
board = ${common32.board} board = esp32_4M
; Build variant ESP32 8M Flash, Tasmota 2944k Code/OTA, 2112k LITTLEFS ; Build variant ESP32 8M Flash, Tasmota 2944k Code/OTA, 2112k LITTLEFS
;board = esp32_8M ;board = esp32_8M
; Build variant ESP32 16M Flash, Tasmota 2944k Code/OTA, 10M LITTLEFS ; Build variant ESP32 16M Flash, Tasmota 2944k Code/OTA, 10M LITTLEFS
;board = esp32_16M ;board = esp32_16M
;board_build.f_cpu = 240000000L ;board_build.f_cpu = 240000000L
;board_build.f_flash = 40000000L ;board_build.f_flash = 40000000L
monitor_speed = ${common32.monitor_speed} monitor_speed = 115200
upload_resetmethod = ${common32.upload_resetmethod}
; *** Serial port used for erasing/flashing the ESP32 ; *** Serial port used for erasing/flashing the ESP32
upload_port = ${common32.upload_port} ;upload_port = ${common.upload_port}
;upload_port = COM4 upload_port = COM4
;upload_speed = 115200 ;upload_speed = 115200
extra_scripts = ${common32.extra_scripts} upload_resetmethod = ${common.upload_resetmethod}
build_unflags = ${common32.build_unflags} extra_scripts = ${common.extra_scripts}
build_flags = ${common32.build_flags} build_unflags = ${esp32_defaults.build_unflags}
lib_ldf_mode = ${common32.lib_ldf_mode} build_flags = ${esp32_defaults.build_flags}
lib_compat_mode = ${common32.lib_compat_mode} lib_ldf_mode = ${common.lib_ldf_mode}
lib_compat_mode = ${common.lib_compat_mode}
lib_ignore = lib_ignore =
ESP32 Azure IoT Arduino ESP32 Azure IoT Arduino
ESP32 Async UDP ESP32 Async UDP
@ -128,10 +128,11 @@ lib_extra_dirs = ${library.lib_extra_dirs}
lib/libesp32 lib/libesp32
; *** comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time ; *** comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time
lib/libesp32_lvgl lib/libesp32_lvgl
; *** comment the following line if you dont use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time ; *** uncomment the following line if you use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time
lib/libesp32_div ; lib/libesp32_div
; *** uncomment the following line if you dont use Epaper driver epidy in your Tasmota32 build. Reduces compile time ; *** uncomment the following line if you use Epaper driver epidy in your Tasmota32 build. Reduces compile time
lib/libesp32_epdiy ; lib/libesp32_epdiy
[library] [library]
shared_libdeps_dir = lib shared_libdeps_dir = lib
@ -150,7 +151,7 @@ lib_extra_dirs =
; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated ; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated
lib/lib_ssl lib/lib_ssl
; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable ; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable
lib/lib_audio ; lib/lib_audio
; *** RF 433 stuff (not RF Bridge). Recommended to disable ; *** RF 433 stuff (not RF Bridge). Recommended to disable
lib/lib_rf lib/lib_rf
; *** Mostly not used functions. Recommended to disable ; *** Mostly not used functions. Recommended to disable

View File

@ -1,37 +1,6 @@
; *** BETA ESP32 Tasmota version *** ; *** BETA ESP32 Tasmota version ***
; *** expect the unexpected. Some features not working!!! *** ; *** expect the unexpected. Some features not working!!! ***
[common32]
framework = ${common.framework}
platform = ${core32.platform}
platform_packages = ${core32.platform_packages}
build_unflags = ${core32.build_unflags}
build_flags = ${core32.build_flags}
board = esp32_4M
board_build.filesystem = ${common.board_build.filesystem}
custom_unpack_dir = ${common.custom_unpack_dir}
monitor_speed = 115200
upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod}
extra_scripts = ${common.extra_scripts}
lib_ldf_mode = ${common.lib_ldf_mode}
lib_compat_mode = ${common.lib_compat_mode}
shared_libdeps_dir = lib
lib_extra_dirs =
lib/libesp32
lib/libesp32_lvgl
; uncomment the following line if you need Bluetooth, Homekit or TTGO Watch libraries in your Tasmota32 build
; lib/libesp32_div
; uncomment the following line if you want to use Epaper driver epidy in your Tasmota32 build
; lib/libesp32_epdiy
lib/lib_basic
lib/lib_i2c
lib/lib_display
lib/lib_ssl
lib/lib_audio
lib/lib_rf
lib/lib_div
[esp32_defaults] [esp32_defaults]
build_unflags = ${esp_defaults.build_unflags} build_unflags = ${esp_defaults.build_unflags}
-fexceptions -fexceptions

View File

@ -38,7 +38,7 @@ platform = https://github.com/platformio/platform-espressif32
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/307/framework-arduinoespressif32-master-1d7068e4b.tar.gz platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/307/framework-arduinoespressif32-master-1d7068e4b.tar.gz
platformio/tool-mklittlefs @ ~1.203.200522 platformio/tool-mklittlefs @ ~1.203.200522
build_unflags = ${esp32_defaults.build_unflags} build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${common32.build_flags} -DFIRMWARE_LITE build_flags = ${esp32_defaults.build_flags} -DFIRMWARE_LITE
lib_extra_dirs = lib/libesp32 lib_extra_dirs = lib/libesp32
lib_ignore = lib_ignore =
NimBLE-Arduino NimBLE-Arduino

View File

@ -10,9 +10,9 @@ monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port} upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod} upload_resetmethod = ${common.upload_resetmethod}
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
lib_extra_dirs = ${common.lib_extra_dirs}
lib_ldf_mode = ${common.lib_ldf_mode} lib_ldf_mode = ${common.lib_ldf_mode}
lib_compat_mode = ${common.lib_compat_mode} lib_compat_mode = ${common.lib_compat_mode}
lib_extra_dirs = ${common.lib_extra_dirs}
lib_ignore = lib_ignore =
Servo(esp8266) Servo(esp8266)
ESP8266AVRISP ESP8266AVRISP
@ -31,6 +31,7 @@ lib_ignore =
; Disable next if you want to use ArduinoOTA in Tasmota (default disabled) ; Disable next if you want to use ArduinoOTA in Tasmota (default disabled)
ArduinoOTA ArduinoOTA
[env:tasmota] [env:tasmota]
[env:tasmota-minimal] [env:tasmota-minimal]

View File

@ -1,17 +1,23 @@
[env:tasmota32_base] [env:tasmota32_base]
framework = ${common.framework} framework = ${common.framework}
platform = ${common32.platform} platform = ${esp32_defaults.platform}
platform_packages = ${common32.platform_packages} platform_packages = ${esp32_defaults.platform_packages}
board = ${common32.board} board_build.filesystem = ${common.board_build.filesystem}
monitor_speed = ${common32.monitor_speed} custom_unpack_dir = ${common.custom_unpack_dir}
upload_port = ${common32.upload_port} board = esp32_4M
upload_resetmethod = ${common32.upload_resetmethod} monitor_speed = 115200
extra_scripts = ${common32.extra_scripts} upload_port = ${common.upload_port}
build_unflags = ${common32.build_unflags} upload_resetmethod = ${common.upload_resetmethod}
build_flags = ${common32.build_flags} extra_scripts = ${common.extra_scripts}
lib_extra_dirs = ${common32.lib_extra_dirs} build_unflags = ${esp32_defaults.build_unflags}
lib_ldf_mode = ${common32.lib_ldf_mode} build_flags = ${esp32_defaults.build_flags}
lib_compat_mode = ${common32.lib_compat_mode} lib_ldf_mode = ${common.lib_ldf_mode}
lib_compat_mode = ${common.lib_compat_mode}
lib_extra_dirs = ${common.lib_extra_dirs}
lib/libesp32
lib/libesp32_lvgl
lib/libesp32_div
lib/libesp32_epdiy
lib_ignore = lib_ignore =
ESP32 Azure IoT Arduino ESP32 Azure IoT Arduino
ESP32 Async UDP ESP32 Async UDP
@ -24,6 +30,7 @@ lib_ignore =
; Disable next if you want to use ArduinoOTA in Tasmota32 (default disabled) ; Disable next if you want to use ArduinoOTA in Tasmota32 (default disabled)
ArduinoOTA ArduinoOTA
[env:tasmota32] [env:tasmota32]
extends = env:tasmota32_base extends = env:tasmota32_base
build_flags = ${env:tasmota32_base.build_flags} -DFIRMWARE_TASMOTA32 build_flags = ${env:tasmota32_base.build_flags} -DFIRMWARE_TASMOTA32