platformio / platform-raspberrypi

Raspberry Pi: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/raspberrypi
Apache License 2.0
73 stars 96 forks source link

upload_flags ignored when upload_protocol = custom is specified in platformio.ini #23

Closed sjfheaton closed 3 years ago

sjfheaton commented 3 years ago

The platformio documentation says this about the upload_protocol "Override default Development Platforms upload command with a custom command. You can pass a full upload command with arguments and options or mix with upload_flags."

Using VSC v1.61.0 and PIO IDE v2.3.3 under MacOS v11.6 (Intel) it seems that upload_flags is ignored when upload_protocol = custom is specified in the platformio.ini file:

[env:pico] build_type = release platform = raspberrypi board = pico framework = arduino monitor_speed = 115200 build_flags = -DPICOPROBE upload_protocol = custom upload_command = /Users/Simon/MyPico/openocd/src/openocd upload_flags = -s/Users/Simon/MyPico/openocd/tcl -f/interface/picoprobe.cfg -f/target/rp2040.cfg -c"program $PROG_PATH verify reset exit"

In order to have the desired effect, the command and flags must be specified for the upload_command alone.

ivankravets commented 3 years ago

Please use

upload_command = /Users/Simon/MyPico/openocd/src/openocd $UPLOADERFLAGS