Can't load/debug firmware with STM32CubeIDE on STM32MP157C-DK2 board
Hi,
I am currently trying to setup a STM32MP157C-DK2 board. Firstly I created a linux image (with Qt) thanks to Yocto and after a few iteration it now works fine, I can run Qt application on the Cortex A7.
Now I am trying to play with the Cortex M4. I use STM32CubeIDE to run example programs. I was able once to load and debug a program to the board using ST-Link (OpenOCD), it was the OpenAMP_TTY_echo. I could write messages in “/dev/ttyRPMSG0” and saw my breakpoints activated, so it worked fine.
The problem is that now I can’t load/debug any program to the M4. Each time I try to run one, I get the following error :
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J37M26 (API v2) VID:PID 0483:3752
Info : Target voltage: 3.217824
Info : clock speed 4000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : STM32MP157CACx.cm4: hardware has 6 breakpoints, 4 watchpoints
Info : STM32MP157CACx.cpu0: hardware has 6 breakpoints, 4 watchpoints
Info : STM32MP157CACx.cpu1: hardware has 6 breakpoints, 4 watchpoints
Info : STM32MP157CACx.cm4: external reset detected
Info : starting gdb server for STM32MP157CACx.cpu0 on 3334
Info : Listening on port 3334 for gdb connections
Info : starting gdb server for STM32MP157CACx.cm4 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting ‘gdb’ connection on tcp/3333
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
Error executing event gdb-attach on target STM32MP157CACx.cm4:
Info : New GDB Connection: 1, Target STM32MP157CACx.cm4, state: reset
Warn : negative reply, retrying
Warn : negative reply, retrying
Warn : target not halted
Info : target STM32MP157CACx.cm4 was not halted when resume was requested
Warn : target not halted
shutdown command invoked
Info : dropped ‘gdb’ connection
I tried both Engineering and Production Mode, tried all the reset modes in the IDE settings and got the same result. I can launch examples included in openST image from the A7, and they run just fine. The problem seems to be between the board and my computer.
Obviously there is something that I am missing, do you have any clue?
Thanks