Some checks failed
Build and deploy Docs site to GitHub Pages / github-pages (push) Has been cancelled
Run Unit Tests / test (push) Has been cancelled
PR Build Check / build (Heltec_v3_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (Heltec_v3_repeater) (push) Has been cancelled
PR Build Check / build (Heltec_v3_room_server) (push) Has been cancelled
PR Build Check / build (LilyGo_Tlora_C6_repeater_) (push) Has been cancelled
PR Build Check / build (PicoW_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_companion_radio_ble) (push) Has been cancelled
PR Build Check / build (RAK_4631_repeater) (push) Has been cancelled
PR Build Check / build (RAK_4631_room_server) (push) Has been cancelled
PR Build Check / build (Tbeam_SX1276_repeater) (push) Has been cancelled
PR Build Check / build (wio-e5-mini_repeater) (push) Has been cancelled
PR Build Check / build (wio_wm1110_repeater) (push) Has been cancelled
31 lines
751 B
Python
31 lines
751 B
Python
#!/usr/bin/python3
|
|
|
|
# Adds PlatformIO post-processing to convert hex files to uf2 files
|
|
|
|
import os
|
|
|
|
Import("env")
|
|
|
|
firmware_hex = "${BUILD_DIR}/${PROGNAME}.hex"
|
|
uf2_file = os.environ.get("UF2_FILE_PATH", "${BUILD_DIR}/${PROGNAME}.uf2")
|
|
|
|
def create_uf2_action(source, target, env):
|
|
uf2_cmd = " ".join(
|
|
[
|
|
'"$PYTHONEXE"',
|
|
'"$PROJECT_DIR/bin/uf2conv/uf2conv.py"',
|
|
'-f', '0xADA52840',
|
|
'-c', firmware_hex,
|
|
'-o', uf2_file,
|
|
]
|
|
)
|
|
env.Execute(uf2_cmd)
|
|
|
|
env.AddCustomTarget(
|
|
name="create_uf2",
|
|
dependencies=firmware_hex,
|
|
actions=create_uf2_action,
|
|
title="Create UF2 file",
|
|
description="Use uf2conv to convert hex binary into uf2",
|
|
always_build=True,
|
|
) |