From 7fc7c41a44532869d9797e2bed7cfd3de9b1ff63 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 4 Jun 2020 11:06:43 +0200 Subject: [PATCH] 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. --- platform.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform.txt b/platform.txt index 2dbf3cada..4ca9cca6f 100644 --- a/platform.txt +++ b/platform.txt @@ -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