cancel
Showing results for 
Search instead for 
Did you mean: 

Slow code stepping during debug

jperrin
Associate II

I'm using a NUCLEO-H563ZI board with the onboard st-link, Cube IDE 1.12, on an intel mac running macos 13.4.1.

 

What I'm observing is that when I start a debug session is that if I set a breakpoint and hit continue i'll hit the breakpoint almost instantly, but if I click step-over it can take 10 or more seconds to hit the next line of code. I launched the st-link_gdbserver from the command line and used command line arm-none-eabi-gdb and had the same behavior. If I did `b main.c:80` and then continue i'd hit the line instantly, but if I hit `u` in gdb it could take 10 or more seconds to get to the next source line. It isn't always the same source lines, sometimes a line that took 10 seconds will be instantaneous the next time you try it.

I have a few coworkers reporting similar behavior.  Any Ideas? The st-link reports a 8000KHz link speed. I'm not sure where the issue is in the chain. 

I attached a video demonstrating the issue, sorry for the low quality I had to fit in the 5 MB limit :p .

Detailed version info:
CubeIDE: 1.12.1
arm-none-eabi-gdb : GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.07) 10.2.90.20210621-git
STM32CubeProgrammer (STM32_Programmer_CLI) : 2.13.0
ST-LINK_gdbserver: 7.3.0
ST-LINK FW : V3J11M3
SWD freq : 8000 KHz
MacOS: 13.4.1 on an Intel

1 ACCEPTED SOLUTION

Accepted Solutions

The problem has gone away if I use 12.X version of both GDB and GCC. No clear indication as to why but I hope this can help someone else.

View solution in original post

2 REPLIES 2
jperrin
Associate II

I don't think this is the whole answer but there appears to be a correlation between having an issue if running arm-none-eabi-gdb version 10.X while version 12.X appears to not have the issue.

The problem has gone away if I use 12.X version of both GDB and GCC. No clear indication as to why but I hope this can help someone else.