Skip to content

Commit 719d9c6

Browse files
committed
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.
1 parent 2d1fb48 commit 719d9c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ tools.openocd.cmd.windows=bin/openocd.exe
202202

203203
tools.openocd.upload.params.verbose=-d2
204204
tools.openocd.upload.params.quiet=-d0
205-
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"
205+
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"
206206

207207
# the following rule is deprecated by pluggable discovery
208208
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

0 commit comments

Comments
 (0)