Error uploading to STM32 Bluepill with STLink

Hi!

I’m using PlatformIO, version 3.5.3 on OS X.

[env:bluepill_f103c8]
platform = ststm32
framework = arduino
board = bluepill_f103c8
upload_protocol = stlink

When I try to upload via stlink i get the following error:

openocd -s /Users/user/.platformio/packages/tool-openocd -f scripts/interface/stlink.cfg -c "transport select hla_swd" -f scripts/target/stm32f1x.cfg -c "reset_config none" -c "program {{.pioenvs/bluepill_f103c8/firmware.elf}}  verify reset; shutdown;"
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00487-gaf359c18 (2018-05-12-23:16)
...
** Programming Started **
auto erase enabled
Error: couldn't open {.pioenvs/bluepill_f103c8/firmware.elf}
embedded:startup.tcl:477: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 536
at file "embedded:startup.tcl", line 477

uploading from command-line works with when removing the double “{{}}”:

/Users/user/.platformio/packages/tool-openocd/bin/openocd -s /Users/user/.platformio/packages/tool-openocd -f scripts/interface/stlink.cfg -c "transport select hla_swd" -f scripts/target/stm32f1x.cfg -c "reset_config none" -c "program {.pioenvs/bluepill_f103c8/firmware.elf} verify reset; shutdown;"

any suggestions?

Robert

Error uploading to STM32 F407VET6 with STLink

Error: timed out while waiting for target halted

Solved!

FYI:
pip uninstall platformio
pip install platformio

did not help.

pip uninstall platformio
pip install -U "platformio<3.4"

resolved the issue and upgrading afterwords everything works as expected.

strange…