Skip to content

Commit d852c8b

Browse files
authoredJun 20, 2024··
Merge pull request #2323 from fpistm/Arduino_compatibility
refactor(STM32CubeProgrammer): rework options
2 parents 6083393 + 47bb4d8 commit d852c8b

File tree

3 files changed

+3770
-3630
lines changed

3 files changed

+3770
-3630
lines changed
 

‎boards.txt

Lines changed: 313 additions & 173 deletions
Large diffs are not rendered by default.

‎cmake/boards_db.cmake

Lines changed: 3450 additions & 3450 deletions
Large diffs are not rendered by default.

‎platform.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ compiler.elf2hex.extra_flags=
106106
# ---------
107107
build.usb_flags=-DUSBCON {build.usb_speed} -DUSBD_VID={build.vid} -DUSBD_PID={build.pid} -DHAL_PCD_MODULE_ENABLED
108108

109-
# Specify defaults for vid/pid, since an empty value is impossible to
110-
# detect in the preprocessor, but a 0 can be checked for vid and -1
111-
# for pid (can be 0).
109+
# Specify defaults for vid/pid
112110
# Boards should specify either both, or neither of these.
113-
build.vid=0
114-
build.pid=-1
111+
build.vid={vid.0}
112+
build.pid={pid.0}
113+
upload.vid=0x0483
114+
upload.pid=0xdf11
115115

116116
# To customize the USB manufacturer or product string, must add defines
117117
# for them, e.g.:
@@ -202,7 +202,7 @@ tools.stm32CubeProg.path={runtime.tools.STM32Tools.path}
202202
tools.stm32CubeProg.cmd=stm32CubeProg.sh
203203
tools.stm32CubeProg.upload.params.verbose=
204204
tools.stm32CubeProg.upload.params.quiet=
205-
tools.stm32CubeProg.upload.pattern="{busybox}" sh "{path}/{cmd}" {upload.protocol} "{build.path}/{build.project_name}.bin" {build.flash_offset} {upload.options}
205+
tools.stm32CubeProg.upload.pattern="{busybox}" sh "{path}/{cmd}" -i {upload.protocol} -f "{build.path}/{build.project_name}.bin" -o {build.flash_offset} {upload.options}
206206

207207
# blackmagic upload for generic STM32
208208
tools.bmp_upload.cmd=arm-none-eabi-gdb
@@ -225,7 +225,7 @@ tools.maple_upload.script=maple_upload.sh
225225
tools.maple_upload.path={runtime.tools.STM32Tools.path}
226226
tools.maple_upload.upload.params.verbose=-d
227227
tools.maple_upload.upload.params.quiet=n
228-
tools.maple_upload.upload.pattern="{busybox}" sh "{path}/{script}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"
228+
tools.maple_upload.upload.pattern="{busybox}" sh "{path}/{script}" {serial.port.file} {upload.altID} {upload.vid} {upload.pid} "{build.path}/{build.project_name}.dfu"
229229

230230
# STM32MP1 self-contained shell script
231231
tools.remoteproc_gen.path={runtime.tools.STM32Tools.path}

0 commit comments

Comments
 (0)
Please sign in to comment.