Skip to main content
philsax
Associate II
September 16, 2021
Question

Hi all, How to get function call backtrace from within freeRTOS task after hardfault handler?

I am working on stm32f769 project, running freeRTOS task, with stm32cubeIDE(1.7.0) debugger and freeRTOS NXP viewer.

I would like do get backtrace and call stack of a fault happened in a freeRTOS task, without costly tools. I tried the MCU registers dump suggested on freeRTOS but didn't help me so much. Any further suggestion?

This topic has been closed for replies.

2 replies

Walid ZRELLI
Visitor II
September 17, 2021

Hello @philsax​ ,

I advice you to activate the assertions in FreeRTOS if they haven't already been activated.

Can you provide the registers dump that you talked about earlier?

BeST Regards,

Walid

alister
Senior III
September 17, 2021

>I would like do get backtrace and call stack of a fault happened in a freeRTOS task, without costly tools.

The address that faulted is usually enough and costs nothing.

Refer the exception stack frame in your ARM programmers guide.

Refer the CFSR for BFSR and the BFAR in the system control block.