cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with DEBUG MCU STM32MP157A-DK1

AlexandrShipovsky
Associate III

I just created a project in STMCubeIDE for STM32MP157A-DK1 and am trying to run MCU debugging in ENGINEERING MODE and PRODUCTION MODE. I use an ST-LINK wire and an Ethernet Over USB connection. SSH and the UART command line work well. In engineering mode, I get the hardware breakpoints error. In production mode, all breakpoints that are set to an infinite loop do not work...this is very strange. What did I miss?

1 ACCEPTED SOLUTION

Accepted Solutions
AlexandrShipovsky
Associate III

Hello LudovicR! I use Ubuntu 20.04.I just rebooted the laptop and everything worked...I don't know what the problem was

View solution in original post

5 REPLIES 5
LudovicR
ST Employee

Hello SAlex.2,

On which platform are you running STM32CubeIDE?

Regards,

AlexandrShipovsky
Associate III

Hello LudovicR! I use Ubuntu 20.04.I just rebooted the laptop and everything worked...I don't know what the problem was

Hello LudovicR,

Six months later, I decided to update STM32CubeIDE on my computer, and at the same time the Linux kernel version, the, u-boat, HAL. I found the exact same problem again:

Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J39M27 (API v2) VID:PID 0483:3752
Info : Target voltage: 3.240945
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
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 : STM32MP157AACx.cm4: Cortex-M4 r0p1 processor detected
Info : STM32MP157AACx.cm4: target has 6 breakpoints, 4 watchpoints
Info : STM32MP157AACx.cm4: external reset detected
Info : STM32MP157AACx.cpu0: hardware has 6 breakpoints, 4 watchpoints
Info : STM32MP157AACx.cpu1: hardware has 6 breakpoints, 4 watchpoints
Info : gdb port disabled
Info : gdb port disabled
Info : gdb port disabled
Info : starting gdb server for STM32MP157AACx.cpu0 on 3334
Info : Listening on port 3334 for gdb connections
Info : starting gdb server for STM32MP157AACx.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 STM32MP157AACx.cm4:
 
Info : New GDB Connection: 1, Target STM32MP157AACx.cm4, state: reset
Warn : GDB connection 1 on target STM32MP157AACx.cm4 not halted
Warn : negative reply, retrying
Warn : negative reply, retrying
O.K.
 
O.K.:0xE00FFFD0
 
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 STM32MP157AACx.cm4:
 
Info : New GDB Connection: 2, Target STM32MP157AACx.cm4, state: reset
Warn : GDB connection 2 on target STM32MP157AACx.cm4 not halted
Warn : negative reply, retrying
Warn : negative reply, retrying
Warn : negative acknowledgment, but no packet pending
Warn : negative acknowledgment, but no packet pending
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : Deferring arp_examine of STM32MP157AACx.cm4
Info : Use arp_examine command to examine it manually!
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : STM32MP157AACx.cm4: Cortex-M4 r0p1 processor detected
Info : STM32MP157AACx.cm4: target has 6 breakpoints, 4 watchpoints
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
 
Warn : target STM32MP157AACx.cm4 is not halted (add breakpoint)
Error: can't add breakpoint: target running

I try to run debugging in both engineering mode and production mode, but nothing works. I also tried using both OpenOCD and GDB with different settings. For the purity of the experiment, I created a completely new project for STM32MP157A-DK1, chose serial debug for Cortex-M4 in CubeMX and got the same results. When I run my firmware using rproc everything works, but I need debugging.

It seems i'm update th-a when in CubeMX debug was off. Could that be the reason?