Hello,
I have 4 STM32 on my PC. It seems that “upload-port” feature is broken on linux (Ubuntu). When I try to flash my MCUs on “MY_PORT”, my port is ignored. So my code is flashed to another MCU.
On windows, upload-port works perfectly.
Command :
platformio run -t upload --upload-port /dev/MY_PORT
I can resolve this problem by editing my files platformio.ini
upload_protocol = custom
upload_command = openocd -s $PROJECT_PACKAGES_DIR/tool-openocd/scripts -f interface/stlink.cfg -c "transport select hla_swd" $UPLOAD_FLAGS -c "program {$SOURCE} 0x08000000 verify reset; shutdown;
upload_flags =
-c
hla_serial MY_SERIAL
-f
target/MY_TARGET_CONFIGURATION