Skip to content

Commit d85db44

Browse files
Add ST-Link/OpenOCD support as a programmer
1 parent 9cc3282 commit d85db44

File tree

688 files changed

+27362
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

688 files changed

+27362
-0
lines changed

boards.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dragonfly.build.arch=STM32L4
2828
dragonfly.build.core=stm32l4
2929
dragonfly.build.extra_flags=-DSTM32L476xx -D__FPU_PRESENT=1 -march=armv7e-m -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mabi=aapcs -mslow-flash-data -fsingle-precision-constant
3030
dragonfly.build.ldscript=linker_scripts/STM32L476RE_FLASH.ld
31+
dragonfly.build.openocdscript=openocd_scripts/stm32l476re_dragonfly.cfg
3132
dragonfly.build.variant=STM32L476RE-Dragonfly
3233
dragonfly.build.variant_system_libs="-L{build.variant.path}" "-L{runtime.platform.path}/system/CMSIS/Lib" -lstm32l476 -larm_cortexM4lf_math
3334
dragonfly.build.variant_system_include="-I{runtime.platform.path}/system/CMSIS/Include" "-I{runtime.platform.path}/system/CMSIS/Device/ST/STM32L4xx/Include" "-I{runtime.platform.path}/system/libstm32l4/USB/HAL/Inc" "-I{runtime.platform.path}/system/libstm32l4/USB/Core/Inc" "-I{runtime.platform.path}/system/libstm32l4/USB/Class/CDC/Inc" "-I{runtime.platform.path}/system/libstm32l4/USB/Class/MSC/Inc" "-I{runtime.platform.path}/system/libstm32l4/USB" "-I{runtime.platform.path}/system/libstm32l4"

platform.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,24 @@ tools.stm32l4_upload.bootloader.params.verbose=-v
121121
tools.stm32l4_upload.bootloader.params.quiet=
122122
tools.stm32l4_upload.bootloader.pattern="{path}/{cmd}" "{runtime.platform.path}/bootloaders/{bootloader.file}"
123123

124+
tools.openocd.path={runtime.platform.path}/tools/windows
125+
tools.openocd.path.macosx={runtime.platform.path}/tools/macosx
126+
tools.openocd.path.linux={runtime.platform.path}/tools/linux/openocd
127+
tools.openocd.cmd=bin/openocd
128+
tools.openocd.cmd.windows=bin/openocd.exe
129+
130+
tools.openocd.upload.params.verbose=-d2
131+
tools.openocd.upload.params.quiet=-d0
132+
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{runtime.platform.path}/tools/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.bin}} verify reset; shutdown"
133+
134+
tools.openocd.program.params.verbose=-d2
135+
tools.openocd.program.params.quiet=-d0
136+
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{runtime.platform.path}/tools/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown"
137+
138+
tools.openocd.erase.params.verbose=-d3
139+
tools.openocd.erase.params.quiet=-d0
140+
tools.openocd.erase.pattern=
141+
142+
tools.openocd.bootloader.params.verbose=-d2
143+
tools.openocd.bootloader.params.quiet=-d0
144+
tools.openocd.bootloader.pattern="{path}/{cmd}" {program.verbose} -s "{runtime.platform.path}/tools/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{{build.path}/{build.project_name}.elf}} verify reset; shutdown"

programmers.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ dfu.protocol=dfu
44
dfu.program.protocol=
55
dfu.program.tool=stm32l4_upload
66
dfu.program.extra_params=
7+
8+
stlink.name=ST-Link V2
9+
stlink.communication=USB
10+
stlink.protocol=
11+
stlink.program.protocol=
12+
stlink.program.tool=openocd
13+
stlink.program.extra_params=

tools/linux/openocd/bin/openocd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
LD_LIBRARY_PATH="$(dirname "$0")/../lib" "$0.bin" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8"
4+
8.47 MB
Binary file not shown.
37.8 KB
Binary file not shown.
37.8 KB
Binary file not shown.
37.8 KB
Binary file not shown.
56.5 KB
Binary file not shown.
56.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)