platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.18k stars 188 forks source link

Invalid upload target on RPI when using more than one Nucleo STM32WB55RG boards #4065

Open pczekalski opened 3 weeks ago

pczekalski commented 3 weeks ago

On RPI, Arduino code flashed with openocd, always uploads to the 2nd development board (Nucleo WB55) regardless of what I choose as an upload port.

Steps to repeat:

  1. Connect 2 Nucleo WB55 boards
  2. Write dummy Arduino code (e.g. flashing built-in LED)
  3. Choose /dev/ACM0 (1st board), Verbose Upload Executing task: platformio run --verbose --target upload --environment nucleo_wb55rg_p --upload-port /dev/ttyACM0
  4. Choose /dev/ACM1 (2nd board), Verbose Upload Executing task: platformio run --verbose --target upload --environment nucleo_wb55rg_p --upload-port /dev/ttyACM1 I'm experiencing the same board is flashed. The flashing command executed seems to not contain the target port at all, as verbose gives following: CURRENT: upload_protocol = stlink openocd -d2 -s /home/admin/.platformio/packages/tool-openocd/openocd/scripts -f board/st_nucleo_wb55.cfg -c "program {.pio/build/nucleo_wb55rg_p/firmware.elf} verify reset; shutdown;" so OPENOCD is not aware of the upload port.