Skip to content

Commit 7ef3212

Browse files
authored
Update pioarduino-build.py
1 parent e1443fb commit 7ef3212

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tools/pioarduino-build.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,21 @@ def add_tinyuf2_extra_image():
228228
LIBSOURCE_DIRS=[join(FRAMEWORK_DIR, "libraries")],
229229
FLASH_EXTRA_IMAGES=[
230230
(
231-
"0x1000" if build_mcu in ["esp32", "esp32s2"] else ("0x2000" if build_mcu in ["esp32p4"] else "0x0000"),
231+
(
232+
"0x1000"
233+
if build_mcu in ["esp32", "esp32s2"]
234+
else ("0x2000" if build_mcu in ["esp32p4", "esp32c5"] else "0x0000")
235+
),
232236
get_bootloader_image(variants_dir),
233237
),
234-
("0x8000", join(env.subst("$BUILD_DIR"), "partitions.bin")),
235-
("0xe000", join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin")),
238+
(
239+
board_config.get("upload.arduino.partitions_bin", "0x8000"),
240+
join(env.subst("$BUILD_DIR"), "partitions.bin"),
241+
),
242+
(
243+
board_config.get("upload.arduino.boot_app0", "0xe000"),
244+
join(FRAMEWORK_DIR, "tools", "partitions", "boot_app0.bin"),
245+
),
236246
]
237247
+ [(offset, join(EXTRA_IMG_DIR, img)) for offset, img in board_config.get("upload.arduino.flash_extra_images", [])],
238248
)

0 commit comments

Comments
 (0)