esp_backtrace_get_start() function
Get the first frame of the current stack's backtrace Given the following function call flow (B -> A -> X -> esp_backtrace_get_start), this function will do the following. - Flush CPU registers and window frames onto the current stack - Return PC and SP of function A (i.e. start of the stack's backtrace) - Return PC of function B (i.e. next_pc)
Syntax
extern void esp_backtrace_get_start(uint32_t *pc,
uint32_t *sp,
uint32_t *next_pc);
Arguments
pc
PC of the first frame in the backtrace
sp
SP of the first frame in the backtrace
next_pc
PC of the first frame's caller
Notes
This function is implemented in assembly
esp_backtrace_get_start() is called by 3 functions:
![]()
esp_backtrace_get_start()