Hi,
So i move few days ago on platformio, and i try to upload my program to a STM32L031K6, custom board with a STLINK-V3PWR.
First i update openocd to the last openocd (dirty way, copying all file inside the tool-openocd, i find no way to use “pio pkg install”). Now i can connect to the STM32L0x :
openocd.exe -f interface\stlink.cfg -f target\stm32l0.cfg
xPack Open On-Chip Debugger 0.12.0+dev-01850-geb6f2745b-dirty (2025-02-07-10:08)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : auto-selecting first available session transport “dapdirect_swd”. To override use ‘transport select ’.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V4J5B1S0 (API v3) VID:PID 0483:3757
Info : Target voltage: 3.293187
Info : Unable to match requested speed 300 kHz, using 200 kHz
Info : Unable to match requested speed 300 kHz, using 200 kHz
Info : clock speed 200 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x0bc11477
Info : [stm32l0.cpu] Cortex-M0+ r0p1 processor detected
Info : [stm32l0.cpu] target has 4 breakpoints, 2 watchpoints
Info : [stm32l0.cpu] Examination succeed
Info : [stm32l0.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
But i still can’t upload under platformio :
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [= ] 14.2% (used 1164 bytes from 8192 bytes)
Flash: [==== ] 42.0% (used 13748 bytes from 32768 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\nucleo_l031k6\firmware.elf
xPack Open On-Chip Debugger 0.12.0+dev-01850-geb6f2745b-dirty (2025-02-07-10:08)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
Debug adapter doesn’t support ‘hla_swd’ transport
*** [upload] Error 1
So, i tried to change the debug_server under platformio.ini :
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
[env:nucleo_l031k6]
platform = ststm32
board = nucleo_l031k6
framework = arduino
check_skip_packages = yesupload_protocol = stlink
debug_tool = custom
debug_server =
${platformio.packages_dir}/tool-openocd/bin/openocd
-s ${platformio.packages_dir}/tool-openocd/scripts
-f interface\stlink.cfg
-c “transport select dapdirect_swd”
-f target\stm32l0x.cfg
-c “reset_config none”
But it change nothing, i still get an error. I don’t understand where the “hla_swd” parameter is set, i try to search all the find and change the .platformio\packages\framework-arduinoststm32\debugger\select_hla.cfg to blank but sill get the error.
Any idea about that ?
Thanks in advance,