@@ -173,52 +173,76 @@ tools.bossacI.upload.network_pattern="{network_cmd}" -address {serial.port} -por
173173# OpenOCD sketch upload
174174#
175175
176- tools.openocd.path={runtime.tools.openocd-0.10 .0-arduino7 .path}
176+ tools.openocd.path={runtime.tools.openocd-0.11 .0-arduino2 .path}
177177tools.openocd.cmd=bin/openocd
178178tools.openocd.cmd.windows=bin/openocd.exe
179179
180180tools.openocd.upload.params.verbose=-d2
181181tools.openocd.upload.params.quiet=-d0
182- 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"
182+ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset 0x2000; shutdown"
183183
184184tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
185185tools.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
186186
187187# Program flashes the binary at 0x0000, so use the linker script without_bootloader
188188tools.openocd.program.params.verbose=-d2
189189tools.openocd.program.params.quiet=-d0
190- 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}.elf} verify reset; shutdown"
190+ tools.openocd.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
191191
192192tools.openocd.erase.params.verbose=-d3
193193tools.openocd.erase.params.quiet=-d0
194194tools.openocd.erase.pattern=
195195
196196tools.openocd.bootloader.params.verbose=-d2
197197tools.openocd.bootloader.params.quiet=-d0
198- 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"
198+ tools.openocd.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
199199
200200#
201201# OpenOCD sketch upload - version with configurable bootloader size
202202# FIXME: this programmer is a workaround for default options being overwritten by uploadUsingPreferences
203203#
204204
205- tools.openocd-withbootsize.path={runtime.tools.openocd-0.10 .0-arduino7 .path}
205+ tools.openocd-withbootsize.path={runtime.tools.openocd-0.11 .0-arduino2 .path}
206206tools.openocd-withbootsize.cmd=bin/openocd
207207tools.openocd-withbootsize.cmd.windows=bin/openocd.exe
208208
209209tools.openocd-withbootsize.upload.params.verbose=-d2
210210tools.openocd-withbootsize.upload.params.quiet=-d0
211- tools.openocd-withbootsize.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 {bootloader.size}; shutdown"
211+ tools.openocd-withbootsize.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.bin} verify reset {bootloader.size}; shutdown"
212212
213213# Program flashes the binary at 0x0000, so use the linker script without_bootloader
214214tools.openocd-withbootsize.program.params.verbose=-d2
215215tools.openocd-withbootsize.program.params.quiet=-d0
216- tools.openocd-withbootsize.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}.elf} verify reset; shutdown"
216+ tools.openocd-withbootsize.program.pattern="{path}/{cmd}" {program.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; program {{build.path}/{build.project_name}.elf} verify reset; shutdown"
217217
218218tools.openocd-withbootsize.erase.params.verbose=-d3
219219tools.openocd-withbootsize.erase.params.quiet=-d0
220220tools.openocd-withbootsize.erase.pattern=
221221
222222tools.openocd-withbootsize.bootloader.params.verbose=-d2
223223tools.openocd-withbootsize.bootloader.params.quiet=-d0
224- tools.openocd-withbootsize.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"
224+ tools.openocd-withbootsize.bootloader.pattern="{path}/{cmd}" {bootloader.verbose} -s "{path}/share/openocd/scripts/" -f "{runtime.platform.path}/{build.openocdscript}" -c "telnet_port disabled; init; halt; at91samd bootloader 0; program {{runtime.platform.path}/bootloaders/{bootloader.file}} verify reset; shutdown"
225+
226+ # ----------------------------------------
227+ # Debugger configuration (general options)
228+ # ----------------------------------------
229+ # EXPERIMENTAL feature:
230+ # - this is alpha and may be subject to change without notice
231+ debug.executable={build.path}/{build.project_name}.elf
232+ debug.toolchain=gcc
233+ debug.toolchain.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
234+ debug.toolchain.prefix=arm-none-eabi-
235+
236+ debug.server=openocd
237+ debug.server.openocd.path={runtime.tools.openocd-0.11.0-arduino2.path}/bin/openocd
238+ debug.server.openocd.scripts_dir={runtime.tools.openocd-0.11.0-arduino2.path}/share/openocd/scripts/
239+ debug.server.openocd.script={runtime.platform.path}/{build.openocdscript}
240+
241+ # JLinkServer is not supported by arduino-cli yet
242+ # https://github.com/arduino/arduino-cli/blob/eca9d9a8f00582a08fadea8a4b7e3ef01b40d082/commands/debug/debug.go#L160
243+ # use debug_custom.json to run JLinkGDBServer instead
244+ # https://docs.arduino.cc/tutorials/mkr-wifi-1010/mkr-jlink-setup
245+ #debug.server=jlink
246+ #debug.server.jlink.path=JLinkGDBServer
247+ #debug.server.jlink.device=ATSAMD21G18
248+ #debug.server.jlink.script={runtime.platform.path}/{build.openocdscript}
0 commit comments