Skip to content

Commit 166478f

Browse files
committed
Fixed program (upload-with-programmer) recipe.
When the .elf is used as input, OpenOCD overwrites the bootloader. This behaviour does not happen using the .hex format.
1 parent 246292f commit 166478f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

platform.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,9 @@ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/op
188188
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
189189
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
190190

191-
# Program flashes the binary at 0x0000, so use the linker script without_bootloader
192191
tools.openocd.program.params.verbose=-d2
193192
tools.openocd.program.params.quiet=-d0
194-
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"
193+
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"
195194

196195
tools.openocd.erase.params.verbose=-d3
197196
tools.openocd.erase.params.quiet=-d0

0 commit comments

Comments
 (0)