Hello i have the MCUXpresso 10.0.2 and i have to trace the function that generate the hard fault but using my segger j-link i can see only the last 4 functions called:
how i can increase the tree for see the function at lower level?
i didn't free memory after a malloc.
Your stack trace might not necessarily show the truth, as the hard fault could be caused by some stack corruption too.
It seems that your hard fault was caused during a context switch in FreeRTOS.
I would set a breakpoint in xPortStartScheduler() and step through the code to see what is happening. It could be that your stack runs into FLASH/ROM code?
If you want to see if other theads/tasks are running, have a read at Troubleshooting Tips for FreeRTOS Thread Aware Debugging in Eclipse | MCU on Eclipse which provides some checkpoints.
As for the hardfault itself, you could install a custom handler which reports you the last PC/access point (see that interrrupt handler at the end of Debugging Hard Faults on ARM Cortex-M | MCU on Eclipse ).
I hope this helps,
i have already tryed but the Thread Aware crash when i stop the debugger with this error, it say Ignoring Packet Error, continue...
I have update the segger driver but nothing.
I can debug without the Thread Aware enable but i can only see this
I have tried to understand watching the CFSR register. It has the value 0x400 so i have an INVPC error.What can generate this error in the code?
Retrieving data ...