Skip to content

Commit 88ae7b7

Browse files
authored
safeboot in Tasmota project
1 parent 95daf8b commit 88ae7b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/platformio-build.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ def add_tinyuf2_extra_image():
201201
# Process framework extra images
202202
#
203203

204+
# Tasmota places extra images "safeboot" in project folder
205+
flash_extra_img = ''.join([str(element) for element in board_config.get("upload.arduino.flash_extra_images", [])])
206+
if "safeboot" in flash_extra_img:
207+
EXTRA_IMG_DIR = variants_dir
208+
else:
209+
EXTRA_IMG_DIR = FRAMEWORK_DIR
210+
204211
env.Append(
205212
LIBSOURCE_DIRS=[join(FRAMEWORK_DIR, "libraries")],
206213
FLASH_EXTRA_IMAGES=[
@@ -212,7 +219,7 @@ def add_tinyuf2_extra_image():
212219
("0xe000", join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin")),
213220
]
214221
+ [
215-
(offset, join(FRAMEWORK_DIR, img))
222+
(offset, join(EXTRA_IMG_DIR, img))
216223
for offset, img in board_config.get("upload.arduino.flash_extra_images", [])
217224
],
218225
)

0 commit comments

Comments
 (0)