Skip to content

Add dfu-util as a standard upload method #718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -1401,6 +1401,12 @@ GenF4.menu.pnum.Generic_F401CB.build.product_line=STM32F401xC
GenF4.menu.pnum.Generic_F401CB.build.variant=Generic_F401Cx

# Upload menu
GenF4.menu.upload_method.dfuUtil=USB (dfu-util)
GenF4.menu.upload_method.dfuUtil.upload.tool=dfu_util
GenF4.menu.upload_method.dfuUtil.upload.protocol=
GenF4.menu.upload_method.dfuUtil.upload.usbID=0483:df11
GenF4.menu.upload_method.dfuUtil.upload.address=0x08000000

GenF4.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
GenF4.menu.upload_method.swdMethod.upload.protocol=0
GenF4.menu.upload_method.swdMethod.upload.options=-g
@@ -1454,6 +1460,12 @@ GenL0.menu.pnum.PX_HER0.build.product_line=STM32L072xx
GenL0.menu.pnum.PX_HER0.build.variant=PX_HER0

# Upload menu
GenL0.menu.upload_method.dfuUtil=USB (dfu-util)
GenL0.menu.upload_method.dfuUtil.upload.tool=dfu_util
GenL0.menu.upload_method.dfuUtil.upload.protocol=
GenL0.menu.upload_method.dfuUtil.upload.usbID=0483:df11
GenL0.menu.upload_method.dfuUtil.upload.address=0x08000000

GenL0.menu.upload_method.swdMethod=STM32CubeProgrammer (SWD)
GenL0.menu.upload_method.swdMethod.upload.protocol=0
GenL0.menu.upload_method.swdMethod.upload.options=-g
15 changes: 13 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ tools.hid_upload.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx
tools.hid_upload.path.linux={runtime.tools.STM32Tools.path}/tools/linux
tools.hid_upload.upload.params.verbose=-d
tools.hid_upload.upload.params.quiet=n
tools.hid_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port.file}
tools.hid_upload.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.bin" {serial.port.file}

# Upload using Maple bootloader over DFU
tools.maple_upload.cmd=maple_upload.sh
@@ -209,4 +209,15 @@ tools.remoteproc_gen.busybox.windows={path}/win/busybox.exe
tools.remoteproc_gen.script=run_arduino_gen.sh
tools.remoteproc_gen.upload.params.verbose=
tools.remoteproc_gen.upload.params.quiet=
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh"
tools.remoteproc_gen.upload.pattern="{busybox}" sh "{path}/{script}" generate "{build.path}/{build.project_name}.elf" "{build.path}/run_arduino_{build.project_name}.sh"

# USB upload using dfu-util
tools.dfu_util.cmd=dfu-util
tools.dfu_util.cmd.linux=dfu-util.sh
tools.dfu_util.cmd.windows=dfu-util.exe
tools.dfu_util.path={runtime.tools.STM32Tools.path}/tools/win
tools.dfu_util.path.macosx={runtime.tools.STM32Tools.path}/tools/macosx/dfu-util
tools.dfu_util.path.linux={runtime.tools.STM32Tools.path}/tools/linux
tools.dfu_util.upload.params.verbose=-v
tools.dfu_util.upload.params.quiet=
tools.dfu_util.upload.pattern="{path}/{cmd}" --device {upload.usbID} -a 0 --dfuse-address {upload.address} -D "{build.path}/{build.project_name}.bin"