From 3a76dad2151f09994193b55267f8485c8302f287 Mon Sep 17 00:00:00 2001 From: cumin <13809292481@163.com> Date: Mon, 10 Aug 2026 15:55:59 +0800 Subject: [PATCH] feat(upload): add generic UF2 uploader recipe --- platform.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform.txt b/platform.txt index 702f24c994..8ac799d56f 100644 --- a/platform.txt +++ b/platform.txt @@ -212,6 +212,15 @@ tools.massStorageCopy.upload.params.verbose= tools.massStorageCopy.upload.params.quiet= tools.massStorageCopy.upload.pattern="{tools_bin_path}/{cmd}" {upload.verbose} -I "{build.path}/{build.project_name}.bin" -O "{node}" +# Upload a UF2 image through a CDC 1200-bps touch and a UF2 mass-storage +# bootloader. Board-specific address, family ID, volume label and size limits +# are supplied by boards.txt. +tools.uf2upload.cmd=uf2upload +tools.uf2upload.cmd.windows=uf2upload.exe +tools.uf2upload.upload.params.verbose= +tools.uf2upload.upload.params.quiet= +tools.uf2upload.upload.pattern="{tools_bin_path}/{cmd}" --input "{build.path}/{build.project_name}.bin" --port "{serial.port}" --volume "{upload.uf2.volume}" --address {upload.uf2.address} --family {upload.uf2.family} --max-size {upload.maximum_size} --timeout {upload.uf2.timeout} + # STM32CubeProgrammer upload tools.stm32CubeProg.path={runtime.tools.STM32Tools.path} tools.stm32CubeProg.cmd=stm32CubeProg.sh