SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32

ERROR: timed out while waiting for target halted


I’m trying to debug my STM32F7 board:

With an ST-link v2 Mini.

I have connected all 4 SWD wires plus the RST wire into the board, so 5 wires connected. I can see from the electrical diagram of my board that the RST pin is connected directly to the NRST pin of the MCU.

Now I try to run opencd (v0.11.0) + gdb :

$ openocd -f /usr/local/share/openocd/scripts/interface/stlink.cfg -f /usr/local/share/openocd/scripts/target/stm32f7x.cfg
Open On-Chip Debugger 0.11.0-dirty (2021-09-27-19:23)
Licensed under GNU GPL v2
For bug reports, read
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
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 2000 kHz
Info : STLINK V2J17S4 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.235813
Warn : Silicon bug: single stepping may enter pending exception handler!
Info : stm32f7x.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f7x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting ‘gdb’ connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x0800027e msp: 0x2004ffd8
Info : device id = 0x10016449
Info : flash size = 1024 kbytes
Info : flash size = 1024 bytes
Warn : Prefer GDB command “target extended-remote 3333” instead of “target remote 3333”
Error: timed out while waiting for target halted
TARGET: stm32f7x.cpu - Not halted
Why am I getting this error, if I have connected the RST wire? I can solve the problem by removing “srst_only” from the stm32f7x.cfg, but my understanding is that then it will do a SW reset instead of HW reset. I would like to use the stock config instead of modify it. Since I have indeed HW support for doing a HW reset, I don’t see why I should be forced to do a SW reset.

Any hints?


I managed to fix it now -> it was a hardware problem, my cheap StLink V2 mini clone seemed to have a broken connection to the RST ping. Using a different unit fixed the problem and I can use the stock configuration to flash my STM32.