Skip to content

Commit

Permalink
Fixed program (upload-with-programmer) recipe.
Browse files Browse the repository at this point in the history
When the .elf is used as input, OpenOCD overwrites the bootloader.
This behaviour does not happen using the .hex format.
  • Loading branch information
cmaglie committed Jun 4, 2020
1 parent 246292f commit 166478f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,9 @@ tools.openocd.upload.pattern="{path}/{cmd}" {upload.verbose} -s "{path}/share/op
tools.openocd.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
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

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

tools.openocd.erase.params.verbose=-d3
tools.openocd.erase.params.quiet=-d0
Expand Down

0 comments on commit 166478f

Please sign in to comment.