Advice, please, how to view the function call tree and the contents of the MCU stack using STM32Cubeide. After the program crashes in debug the program loops in Hard_Fault_Handler () and it is not clear what cause such event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 3:13 AM
What ability to view the contents of the call stack in CubeIDE is present?, i.e. what functions were called before the crash, preferably in the form of a tree
Solved! Go to Solution.
- Labels:
-
DEBUG
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:54 AM
If the debugger sits in the while loop, you can set the value of junk to 1 manually and continue stepping out of the handler and back to the code that caused it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 3:23 AM
You can open the Fault Analyzer View (Windows > Show View > Debug ...) that gives you a little insight.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 5:29 PM
Try to change the while(1) in the Hard_Fault_Handler as follows:
static volatile int junk = 0;
while (!junk) {}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:31 AM
thanks, i know this method but there is no call tree or stack info
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:38 AM
what is it supposed to give?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:43 AM
I think this is call stack tree))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:49 AM
Yes, you're right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 12:54 AM
If the debugger sits in the while loop, you can set the value of junk to 1 manually and continue stepping out of the handler and back to the code that caused it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-12 1:10 AM
Smart solution, will try)​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-07 11:42 PM
Thank you ! This is what I was looking for and searching for call stack window , I am surprised why the stm32cube calls this debug window !
