Skip to content

Commit effb535

Browse files
update platform.txt to use dfu-suffix to silence dfu-util warnings
1 parent a6d7b15 commit effb535

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

platform.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ compiler.elf2hex.cmd=arm-none-eabi-objcopy
4747
compiler.ldflags=-mcpu={build.mcu} -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
4848
compiler.size.cmd=arm-none-eabi-size
4949
compiler.define=-DARDUINO=
50+
compiler.platform.path={runtime.platform.path}/tools/windows/
51+
compiler.platform.path.macos={runtime.platform.path}/tools/macos/
52+
compiler.platform.path.linux={runtime.platform.path}/tools/linux/
53+
compiler.hex2dfu.cmd=dfu-suffix
54+
compiler.hex2dfu.cmd.windows=dfu-suffix.exe
5055

5156
# this can be overriden in boards.txt
5257
build.extra_flags=
@@ -82,6 +87,9 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}"
8287
## Create output (bin file)
8388
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
8489

90+
## Append DFU suffix (bin file)
91+
recipe.objcopy.dfu.pattern="{compiler.platform.path}/{compiler.hex2dfu.cmd}" -v 0x0483 -p 0xdf11 -a "{build.path}/{build.project_name}.bin"
92+
8593
## Save hex
8694
recipe.output.tmp_file={build.project_name}.bin
8795
recipe.output.save_file={build.project_name}.{build.variant}.bin

0 commit comments

Comments
 (0)