Skip to content

Commit 3932b9f

Browse files
authored
safeboot in project folder
1 parent cc51c65 commit 3932b9f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/platformio-build.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ def add_tinyuf2_extra_image():
204204
# Process framework extra images
205205
#
206206

207+
# Tasmota places extra images "safeboot" in project folder
208+
flash_extra_img = ''.join([str(element) for element in board_config.get("upload.arduino.flash_extra_images", [])])
209+
if "safeboot" in flash_extra_img:
210+
EXTRA_IMG_DIR = variants_dir
211+
else:
212+
EXTRA_IMG_DIR = FRAMEWORK_DIR
213+
207214
env.Append(
208215
LIBSOURCE_DIRS=[join(FRAMEWORK_DIR, "libraries")],
209216
FLASH_EXTRA_IMAGES=[
@@ -215,7 +222,7 @@ def add_tinyuf2_extra_image():
215222
("0xe000", join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin")),
216223
]
217224
+ [
218-
(offset, join(FRAMEWORK_DIR, img))
225+
(offset, join(EXTRA_IMG_DIR, img))
219226
for offset, img in board_config.get("upload.arduino.flash_extra_images", [])
220227
],
221228
)

0 commit comments

Comments
 (0)