I am deploying via CLI on Ubuntu 20. I have multiple devices hooked up to the system for testing and I would like to specify which one I will deploy to. All research points to using upload-port
as the parameter, but it seems to have no effect, and verbose output does not indicate that it even takes note of this parameter, nor does it indicate how it decided on which device to flash, nor even does it identify which device it decided to flash, however it does that… The only way I know which one it gets the update is by seeing the actuators do their startup jitters. I have confirmed that each device works if I plug/unplug them selectively.
I have 3 devices, each on:
/dev/ttyACM0
/dev/ttyACM1
/dev/ttyACM2
Here is my commad and verbose output:
pio run --environment int-test-idle --target upload --upload-port /dev/ttyACM1 -v
Processing int-test-idle (platform: ststm32; board: custom_stm32; build_flags: -Icommon/include/, -std=gnu++17, -fno-exceptions, -Wall, -Werror, -Wconversion, -Wno-sign-conversion, -Wno-sign-compare, -fstrict-volatile-bitfields, -mfpu=fpv4-sp-d16, -mfloat-abi=hard, -Wl,-Map,stm32.map, -Wl,-u,vectors, -Wl,-u,_init, -DBARE_STM32, -DIDLE_TEST; board_build.ldscript: boards/stm32_ldscript.ld; extra_scripts: pre:boards/stm32_scripts.py; src_filter: +<*> -<.git/> -<.svn/> -<test/> -<src/> -<src_test/> +<integration_tests/>; lib_ldf_mode: deep+; lib_extra_dirs: common/libs, common/generated_libs, common/third_party; build_unflags: -std=gnu++11, -std=gnu++14, -fpermissive; platform_packages: toolchain-gccarmnoneeabi@>1.80301.190214)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/custom_stm32.html
PLATFORM: ST STM32 6.1.1 > ST Nucleo L452RE
HARDWARE: STM32L452RET6 80MHz, 160KB RAM, 512KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES:
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.1
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 10 compatible libraries
Scanning dependencies...
Warning! Circular dependencies detected between `/home/martin/VentilatorSoftware/controller/lib/core` and `/home/martin/VentilatorSoftware/controller/lib/hal`
Warning! Circular dependencies detected between `/home/martin/VentilatorSoftware/controller/lib/debug` and `/home/martin/VentilatorSoftware/controller/lib/core`
Warning! Circular dependencies detected between `/home/martin/VentilatorSoftware/controller/lib/debug` and `/home/martin/VentilatorSoftware/controller/lib/hal`
Dependency Graph
|-- <hal> (/home/martin/VentilatorSoftware/controller/lib/hal)
| |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| |-- <checksum> (/home/martin/VentilatorSoftware/common/libs/checksum)
| |-- <core> (/home/martin/VentilatorSoftware/controller/lib/core)
| | |-- <network_protocol> (/home/martin/VentilatorSoftware/common/generated_libs/network_protocol)
| | | |-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
| | |-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
| | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| | |-- <pid> (/home/martin/VentilatorSoftware/controller/lib/pid)
| | | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| | | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| | |-- <debug> (/home/martin/VentilatorSoftware/controller/lib/debug)
| | | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| | | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| |-- <debug> (/home/martin/VentilatorSoftware/controller/lib/debug)
| | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
|-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
|-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
|-- <core> (/home/martin/VentilatorSoftware/controller/lib/core)
| |-- <network_protocol> (/home/martin/VentilatorSoftware/common/generated_libs/network_protocol)
| | |-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
| |-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
| |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| |-- <pid> (/home/martin/VentilatorSoftware/controller/lib/pid)
| | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| |-- <debug> (/home/martin/VentilatorSoftware/controller/lib/debug)
| | |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| | |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
|-- <network_protocol> (/home/martin/VentilatorSoftware/common/generated_libs/network_protocol)
| |-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
|-- <nanopb> (/home/martin/VentilatorSoftware/common/third_party/nanopb)
|-- <pid> (/home/martin/VentilatorSoftware/controller/lib/pid)
| |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
| |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
|-- <debug> (/home/martin/VentilatorSoftware/controller/lib/debug)
| |-- <stl> (/home/martin/VentilatorSoftware/controller/lib/stl)
| |-- <units> (/home/martin/VentilatorSoftware/common/libs/units)
|-- <checksum> (/home/martin/VentilatorSoftware/common/libs/checksum)
Building in release mode
MethodWrapper(["checkprogsize"], [".pio/build/int-test-idle/firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [===== ] 50.4% (used 82532 bytes from 163840 bytes)
Flash: [ ] 2.3% (used 11972 bytes from 524288 bytes)
.pio/build/int-test-idle/firmware.elf :
section size addr
.isr_vector 404 134217728
.text 9012 134218176
.rodata 2712 134227188
.ARM.extab 0 134229900
.ARM 0 134229900
.preinit_array 0 134229900
.init_array 60 134229900
.fini_array 0 134229960
.data 248 536870912
.bss 82284 536871160
.ARM.attributes 50 0
.comment 102 0
.debug_frame 176 0
.stabstr 118 0
Total 95166
<lambda>(["upload"], [".pio/build/int-test-idle/firmware.elf"])
AVAILABLE: blackmagic, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
openocd -d2 -s /home/martin/.platformio/packages/tool-openocd/scripts -f board/st_nucleo_l4.cfg -c "program {.pio/build/int-test-idle/firmware.elf} verify reset; shutdown;"
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:25)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : clock speed 500 kHz
Info : STLINK V2J30M19 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.252425
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001da0 msp: 0x20014108
** Programming Started **
Info : device id = 0x20016462
Info : flash size = 512kbytes
Warn : block write succeeded
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
shutdown command invoked
================================================================================================================================================================================================================================ [SUCCESS] Took 1.36 seconds ================================================================================================================================================================================================================================
Environment Status Duration
-------------------- -------- ------------
stm32 IGNORED
stm32-test IGNORED
int-test-idle SUCCESS 00:00:01.357
int-test-buzzer IGNORED
int-test-blower IGNORED
int-test-solenoid IGNORED
int-test-stepper IGNORED
int-test-pinch-valve IGNORED
native IGNORED
================================================================================================================================================================================================================================ 1 succeeded in 00:00:01.357 ================================================================================================================================================================================================================================