|
43 | 43 | sections = env.subst(env.get("FLASH_EXTRA_IMAGES"))
|
44 | 44 | chip = env.get("BOARD_MCU")
|
45 | 45 | mcu_build_variant = env.BoardConfig().get("build.variant", "").lower()
|
| 46 | +FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32") |
46 | 47 |
|
47 | 48 | # Copy safeboots firmwares in place when running in Github
|
48 | 49 | github_actions = os.getenv('GITHUB_ACTIONS')
|
49 |
| -extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")]) |
50 |
| -build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")]) |
51 |
| - |
52 |
| -if "CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags: |
53 |
| - FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1") |
54 |
| - if github_actions and os.path.exists("./firmware/firmware"): |
55 |
| - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-solo1/variants/tasmota") |
56 |
| - if variants_dir: |
57 |
| - shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) |
58 |
| -elif "CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags: |
59 |
| - FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD") |
60 |
| - if github_actions and os.path.exists("./firmware/firmware"): |
61 |
| - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduino-ITEAD/variants/tasmota") |
62 |
| - if variants_dir: |
63 |
| - shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) |
64 |
| -else: |
65 |
| - FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32") |
66 |
| - if github_actions and os.path.exists("./firmware/firmware"): |
67 |
| - shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota") |
68 |
| - if variants_dir: |
69 |
| - shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) |
| 50 | +if github_actions and os.path.exists("./firmware/firmware"): |
| 51 | + shutil.copytree("./firmware/firmware", "/home/runner/.platformio/packages/framework-arduinoespressif32/variants/tasmota", dirs_exist_ok=True) |
| 52 | + if variants_dir: |
| 53 | + shutil.copytree("./firmware/firmware", variants_dir, dirs_exist_ok=True) |
70 | 54 |
|
71 | 55 | # Copy pins_arduino.h to variants folder
|
72 | 56 | if variants_dir:
|
@@ -129,12 +113,6 @@ def patch_partitions_bin(size_string):
|
129 | 113 | def esp32_create_chip_string(chip):
|
130 | 114 | tasmota_platform_org = env.subst("$BUILD_DIR").split(os.path.sep)[-1]
|
131 | 115 | tasmota_platform = tasmota_platform_org.split('-')[0]
|
132 |
| - 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: |
133 |
| - print(Fore.YELLOW + "Unexpected naming convention in this build environment:" + Fore.RED, tasmota_platform_org) |
134 |
| - print(Fore.YELLOW + "Expected build environment name like " + Fore.GREEN + "'tasmota32solo1-whatever-you-want'") |
135 |
| - print(Fore.YELLOW + "Please correct your actual build environment, to avoid undefined behavior in build process!!") |
136 |
| - tasmota_platform = "tasmota32solo1" |
137 |
| - return tasmota_platform |
138 | 116 | if "tasmota" + chip[3:] not in tasmota_platform: # check + fix for a valid name like 'tasmota' + '32c3'
|
139 | 117 | tasmota_platform = "tasmota" + chip[3:]
|
140 | 118 | if "-DUSE_USB_CDC_CONSOLE" not in env.BoardConfig().get("build.extra_flags"):
|
|
0 commit comments