From 10c5945afb9aa9aa51299acfd39a4101e4e512d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sat, 6 Aug 2022 17:06:08 +0200 Subject: [PATCH] [core] Allow exporting UF2 under a custom filename --- builder/utils/uf2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/utils/uf2.py b/builder/utils/uf2.py index 3b3bd38..5155145 100644 --- a/builder/utils/uf2.py +++ b/builder/utils/uf2.py @@ -30,7 +30,10 @@ def env_uf2ota(env, *args, **kwargs): "${FAMILY}", f"lt{lt_version}", ] - output = join("${BUILD_DIR}", "_".join(output)) + ".uf2" + output = "_".join(output) + ".uf2" + if platform.custom("fw_output"): + output = platform.custom("fw_output") + output = join("${BUILD_DIR}", output) env["UF2OUT"] = output env["UF2OUT_BASE"] = basename(output)