Skip to content

Commit 1fe47dc

Browse files
authored
Merge pull request #636 from facchinm/restructure_programmers
Restructure programmers by removing hardcoded build.openocdscript
2 parents 96ce5f9 + 52b4a2d commit 1fe47dc

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

platform.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -198,22 +198,22 @@ tools.openocd.cmd.windows=bin/openocd.exe
198198

199199
tools.openocd.upload.params.verbose=-d2
200200
tools.openocd.upload.params.quiet=-d0
201-
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/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 0x2000; shutdown"
201+
tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
202202

203203
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
204204
tools.openocd.upload.network_pattern={network_cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
205205

206206
tools.openocd.program.params.verbose=-d2
207207
tools.openocd.program.params.quiet=-d0
208-
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown"
208+
tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; program {{build.path}/{build.project_name}.hex} verify reset; shutdown"
209209

210210
tools.openocd.erase.params.verbose=-d3
211211
tools.openocd.erase.params.quiet=-d0
212212
tools.openocd.erase.pattern=
213213

214214
tools.openocd.bootloader.params.verbose=-d2
215215
tools.openocd.bootloader.params.quiet=-d0
216-
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/variants/{build.variant}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
216+
tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "interface/{protocol}" -c "set telnet_port 0" {extra_params} -f "target/at91samdXX.cfg" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
217217

218218
#
219219
# OpenOCD sketch upload - version with configurable bootloader size

programmers.txt

+12-9
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,24 @@
1616

1717
edbg.name=Atmel EDBG
1818
edbg.communication=USB
19-
edbg.protocol=
20-
edbg.program.protocol=
19+
edbg.protocol=cmsis-dap.cfg
2120
edbg.program.tool=openocd
22-
edbg.program.extra_params=
21+
edbg.extra_params=
2322

2423
atmel_ice.name=Atmel-ICE
2524
atmel_ice.communication=USB
26-
atmel_ice.protocol=
27-
atmel_ice.program.protocol=
25+
atmel_ice.protocol=cmsis-dap.cfg
2826
atmel_ice.program.tool=openocd
29-
atmel_ice.program.extra_params=
27+
atmel_ice.extra_params=
3028

3129
sam_ice.name=Atmel SAM-ICE
3230
sam_ice.communication=USB
33-
sam_ice.protocol=
34-
sam_ice.program.protocol=
31+
sam_ice.protocol=cmsis-dap.cfg
3532
sam_ice.program.tool=openocd
36-
sam_ice.program.extra_params=
33+
sam_ice.extra_params=
34+
35+
jlink.name=Segger J-Link
36+
jlink.communication=USB
37+
jlink.protocol=jlink.cfg
38+
jlink.program.tool=openocd
39+
jlink.extra_params=-c "transport select swd"

0 commit comments

Comments
 (0)