Phase out of Tasmota espressif32 frameworks `solo1` and `ITEAD` (#22315)

* Step 1 of phase out of special frameworks solo1 and ITEAD
This commit is contained in:
Jason2866 2024-10-18 19:18:10 +02:00 committed by GitHub
parent 813dc27360
commit f320ca2982
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 40 deletions

View File

@ -25,7 +25,7 @@ jobs:
fail-fast: true fail-fast: true
matrix: matrix:
variant: variant:
- tasmota32solo1-safeboot - tasmota32-webcam
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
@ -53,7 +53,7 @@ jobs:
fail-fast: true fail-fast: true
matrix: matrix:
variant: variant:
- tasmota32-webcam - tasmota32solo1-safeboot
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up Python - name: Set up Python

View File

@ -43,30 +43,14 @@ variant = env.BoardConfig().get("build.variant", "")
sections = env.subst(env.get("FLASH_EXTRA_IMAGES")) sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
chip = env.get("BOARD_MCU") chip = env.get("BOARD_MCU")
mcu_build_variant = env.BoardConfig().get("build.variant", "").lower() mcu_build_variant = env.BoardConfig().get("build.variant", "").lower()
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
# Copy safeboots firmwares in place when running in Github # Copy safeboots firmwares in place when running in Github
github_actions = os.getenv('GITHUB_ACTIONS') github_actions = os.getenv('GITHUB_ACTIONS')
extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")]) if github_actions and os.path.exists("./firmware/firmware"):
build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")]) shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota", dirs_exist_ok=True)
if variants_dir:
if "CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags: shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota")
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
elif "CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota")
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
else:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")
if github_actions and os.path.exists("./firmware/firmware"):
shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota")
if variants_dir:
shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True)
# Copy pins_arduino.h to variants folder # Copy pins_arduino.h to variants folder
if variants_dir: if variants_dir:
@ -129,12 +113,6 @@ def patch_partitions_bin(size_string):
def esp32_create_chip_string(chip): def esp32_create_chip_string(chip):
tasmota_platform_org = env.subst("$BUILD_DIR").split(os.path.sep)[-1] tasmota_platform_org = env.subst("$BUILD_DIR").split(os.path.sep)[-1]
tasmota_platform = tasmota_platform_org.split('-')[0] tasmota_platform = tasmota_platform_org.split('-')[0]
if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and "tasmota32-safeboot" not in tasmota_platform_org and "tasmota32solo1" not in tasmota_platform_org:
print(Fore.YELLOW + "Unexpected naming convention in this build environment:" + Fore.RED, tasmota_platform_org)
print(Fore.YELLOW + "Expected build environment name like " + Fore.GREEN + "'tasmota32solo1-whatever-you-want'")
print(Fore.YELLOW + "Please correct your actual build environment, to avoid undefined behavior in build process!!")
tasmota_platform = "tasmota32solo1"
return tasmota_platform
if "tasmota" + chip[3:] not in tasmota_platform: # check + fix for a valid name like 'tasmota' + '32c3' if "tasmota" + chip[3:] not in tasmota_platform: # check + fix for a valid name like 'tasmota' + '32c3'
tasmota_platform = "tasmota" + chip[3:] tasmota_platform = "tasmota" + chip[3:]
if "-DUSE_USB_CDC_CONSOLE" not in env.BoardConfig().get("build.extra_flags"): if "-DUSE_USB_CDC_CONSOLE" not in env.BoardConfig().get("build.extra_flags"):

View File

@ -8,8 +8,8 @@ if "FIRMWARE_SAFEBOOT" in build_flags:
try: try:
link_flags.pop(link_flags.index("-Wl,--wrap=panicHandler")) link_flags.pop(link_flags.index("-Wl,--wrap=panicHandler"))
except: except:
do_nothing="" pass
try: try:
link_flags.pop(link_flags.index("-Wl,--wrap=xt_unhandled_exception")) link_flags.pop(link_flags.index("-Wl,--wrap=xt_unhandled_exception"))
except: except:
do_nothing="" pass

View File

@ -80,8 +80,6 @@ lib_extra_dirs = ${library.lib_extra_dirs}
;platform = https://github.com/Jason2866/platform-espressif32/releases/download/2024.07.22/platform-espressif32.zip ;platform = https://github.com/Jason2866/platform-espressif32/releases/download/2024.07.22/platform-espressif32.zip
;platform_packages = framework-arduinoespressif32 @ ;platform_packages = framework-arduinoespressif32 @
; framework-arduino-solo1 @
; framework-arduino-ITEAD @
;build_unflags = ${esp32_defaults.build_unflags} ;build_unflags = ${esp32_defaults.build_unflags}
;build_flags = ${esp32_defaults.build_flags} ;build_flags = ${esp32_defaults.build_flags}
;board = esp32 ;board = esp32

View File

@ -177,13 +177,14 @@ build_flags = ${env:tasmota32_base.build_flags}
[env:tasmota32solo1-ocd] [env:tasmota32solo1-ocd]
build_type = debug build_type = debug
extends = env:tasmota32solo1 extends = env:tasmota32solo1
board = esp32_solo1 board = esp32-solo1
debug_tool = esp-prog debug_tool = esp-prog
upload_protocol = esp-prog upload_protocol = esp-prog
debug_init_break = tbreak setup debug_init_break = tbreak setup
build_unflags = ${env:tasmota32_base.build_unflags} build_unflags = ${env:tasmota32_base.build_unflags}
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DOTA_URL='""' -DOTA_URL='""'
custom_sdkconfig = CONFIG_FREERTOS_UNICORE=y
[env:tasmota32s2-ocd] [env:tasmota32s2-ocd]
build_type = debug build_type = debug

View File

@ -28,24 +28,25 @@ custom_files_upload = no_files
[env:tasmota32-safeboot] [env:tasmota32-safeboot]
extends = env:tasmota32_base extends = env:tasmota32_base
board = esp32_solo1 board = esp32-solo1
board_build.app_partition_name = safeboot board_build.app_partition_name = safeboot
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DFRAMEWORK_ARDUINO_SOLO1
-DFIRMWARE_SAFEBOOT -DFIRMWARE_SAFEBOOT
-DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-safeboot.bin"' -DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-safeboot.bin"'
lib_extra_dirs = lib/lib_ssl, lib/libesp32 lib_extra_dirs = lib/lib_ssl, lib/libesp32
lib_ignore = ${safeboot_flags.lib_ignore} lib_ignore = ${safeboot_flags.lib_ignore}
custom_sdkconfig = CONFIG_FREERTOS_UNICORE=y
[env:tasmota32solo1-safeboot] [env:tasmota32solo1-safeboot]
extends = env:tasmota32_base extends = env:tasmota32_base
board = esp32_solo1 board = esp32-solo1
board_build.app_partition_name = safeboot board_build.app_partition_name = safeboot
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_SAFEBOOT -DFIRMWARE_SAFEBOOT
-DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32solo1-safeboot.bin"' -DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32solo1-safeboot.bin"'
lib_extra_dirs = lib/lib_ssl, lib/libesp32 lib_extra_dirs = lib/lib_ssl, lib/libesp32
lib_ignore = ${safeboot_flags.lib_ignore} lib_ignore = ${safeboot_flags.lib_ignore}
custom_sdkconfig = CONFIG_FREERTOS_UNICORE=y
[env:tasmota32s2-safeboot] [env:tasmota32s2-safeboot]
extends = env:tasmota32_base extends = env:tasmota32_base
@ -145,7 +146,7 @@ build_flags = ${env:tasmota32_base.build_flags}
[env:tasmota32solo1] [env:tasmota32solo1]
extends = env:tasmota32_base extends = env:tasmota32_base
board = esp32_solo1 board = esp32-solo1
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_TASMOTA32 -DFIRMWARE_TASMOTA32
-DCODE_IMAGE_STR='"solo1"' -DCODE_IMAGE_STR='"solo1"'
@ -153,6 +154,7 @@ build_flags = ${env:tasmota32_base.build_flags}
lib_ignore = ${env:tasmota32_base.lib_ignore} lib_ignore = ${env:tasmota32_base.lib_ignore}
Micro-RTSP Micro-RTSP
epdiy epdiy
custom_sdkconfig = CONFIG_FREERTOS_UNICORE=y
[env:tasmota32s2] [env:tasmota32s2]
extends = env:tasmota32_base extends = env:tasmota32_base
@ -262,7 +264,6 @@ board_build.partitions = partitions/esp32_partition_app1856k_fs1344k.csv
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-zbbrdgpro.bin"' -DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-zbbrdgpro.bin"'
-DFIRMWARE_ZBBRDGPRO -DFIRMWARE_ZBBRDGPRO
-DFRAMEWORK_ARDUINO_ITEAD
custom_files_upload = ${env:tasmota32_base.custom_files_upload} custom_files_upload = ${env:tasmota32_base.custom_files_upload}
tools/fw_SonoffZigbeeBridgePro_cc2652/Sonoff_ZBPro.autoconf tools/fw_SonoffZigbeeBridgePro_cc2652/Sonoff_ZBPro.autoconf
tasmota/berry/zigbee/cc2652_flasher.be tasmota/berry/zigbee/cc2652_flasher.be
@ -270,13 +271,16 @@ custom_files_upload = ${env:tasmota32_base.custom_files_upload}
tasmota/berry/zigbee/sonoff_zb_pro_flasher.be tasmota/berry/zigbee/sonoff_zb_pro_flasher.be
tools/fw_SonoffZigbeeBridgePro_cc2652/SonoffZBPro_coord_20220219.hex tools/fw_SonoffZigbeeBridgePro_cc2652/SonoffZBPro_coord_20220219.hex
lib_extra_dirs = lib/lib_basic, lib/lib_ssl, lib/libesp32 lib_extra_dirs = lib/lib_basic, lib/lib_ssl, lib/libesp32
custom_sdkconfig = CONFIG_D0WD_PSRAM_CLK_IO=5
CONFIG_D0WD_PSRAM_CS_IO=18
[env:tasmota32-nspanel] [env:tasmota32-nspanel]
extends = env:tasmota32_base extends = env:tasmota32_base
build_flags = ${env:tasmota32_base.build_flags} build_flags = ${env:tasmota32_base.build_flags}
-DFIRMWARE_NSPANEL -DFIRMWARE_NSPANEL
-DFRAMEWORK_ARDUINO_ITEAD
-DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-nspanel.bin"' -DOTA_URL='"http://ota.tasmota.com/tasmota32/release/tasmota32-nspanel.bin"'
custom_sdkconfig = CONFIG_D0WD_PSRAM_CLK_IO=5
CONFIG_D0WD_PSRAM_CS_IO=18
[env:tasmota32-AD] [env:tasmota32-AD]
extends = env:tasmota32_base extends = env:tasmota32_base