STLink V3 + OpenOCD + STM32H747

STLink V3 OpenOCD STM32H747




If you are running Linux and you instilled OpenOCD with

sudo apt install openocd

Make sure you check version with

openocd --version

If version is "Open On-Chip Debugger 0.11" there is very big chance your STLink V3 wan't connect to STM32H747 MCUs. 

 

I got this error message:

openocd -f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/stm32h7x.cfg           
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
       http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1800 kHz
Error: open failed


 

Make sure to build latest OpenOCD.
For me it started working after I built versions 0.12 from source:

https://github.com/openocd-org/openocd

Follow the instructions from Readme.MD

This is result:

Open On-Chip Debugger 0.12.0+dev-01427-g0f70c6c32 (2023-12-05-11:52)
Licensed under GNU GPL v2
For bug reports, read
       http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1800 kHz
Info : STLINK V3J8M3 (API v3) VID:PID 0483:3754
Info : Target voltage: 3.277540
Info : [stm32h7x.cpu0] Cortex-M7 r1p1 processor detected
Info : [stm32h7x.cpu0] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections

 

If I saved you some time debugging this issue consider buying me a coffee ;)
(link is up-left)

Comments

Popular posts from this blog

AUTOSAR and CRC calculation

Flashing/debugging/running code at external memory in the memory-mapped mode

Debugging EK-TM4C123GXL with Visual Studio Code on Linux