cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE - Debug and Fault Analyzer windows during exception debugging

BPrem.1
Associate II

 1. Fault Analyzer window shows register content during fault exception normally when using J-LINK debugger after an exception has been triggered (for example Hard Fault). This is not the case when the ST-LINK adapter is used. The "Register Value During Fault Exception" is displayed as N/A - not available.

2. The values in the Debug window are not displayed properly if the processor was executing a RTOS task (using the PSP). Processor uses the MSP when it enters the exception handler and the list of functions in the Debug window is not correct. It looks as the debugger uses the current SP value and not the SP (in this case PSP) before the exception.

Workaround: I have to add some code in the exception handler to temporarily switch SP to PSP (if the PSP was used), set the breakpoint before the point when the processor switched back to MSP and the function call stack appears correctly in the Debug window. I have access to the function variables in the Variables window after I click on the function name in the Debug window also.

1 REPLY 1
Markus GIRDLAND
ST Employee

Hello there!

Issue 1:

This seems to be a bug that appeared with the latest CDT/Toolchain. A way around this would be to add the command "set print symbol off" in the debug configuration (Startup tab -> Initialization Commands). A ticket has been submitted for this.

Issue 2:

Looks like GDB doesn't handle this correctly. Exceptions in the thread context doesn't show the entire stack frame. A bit more digging is required to see what happens but in the meantime a ticket will be submitted for this issue as well.

Thanks for bringing it to my attention!