From 719d9c64725534709437e7a09577252e3d69532d Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 27 Nov 2021 22:20:09 -0800 Subject: [PATCH] Remove programmer properties from openocd upload pattern Platform properties may be associated with a specific programmer selection in the programmers.txt configuration file. These properties can be used in the platform.txt patterns for the actions that use the programmer: - `program` - `erase` - `bootloader` However, those properties are not expanded in the `upload` pattern, since it does not use the programmer: https://arduino.github.io/arduino-cli/dev/platform-specification/#programmerstxt > These properties can only be used in the recipes of the actions that use the programmer (erase, bootloader, and program). While enhancing the ability to make programmer-specific configuration of the patterns, programmer-associated properties were introduced into `tools.openocd.upload.pattern`, which caused uploads to fail for the "Arduino Zero (Programming Port)" board: ``` Unexpected command line argument: {extra_params} ``` The upload pattern is hereby reverted to the previous working configuration, leaving the beneficial changes to the other patterns. --- platform.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform.txt b/platform.txt index 520c2eb08..927c1e826 100644 --- a/platform.txt +++ b/platform.txt @@ -202,7 +202,7 @@ tools.openocd.cmd.windows=bin/openocd.exe tools.openocd.upload.params.verbose=-d2 tools.openocd.upload.params.quiet=-d0 -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" +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" # the following rule is deprecated by pluggable discovery tools.openocd.upload.network_pattern={tools.arduino_ota.cmd} -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b