mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Merge branch 'feature/freertos_interrupt_backtrace_opt' into 'master'
freertos: introduce CONFIG_FREERTOS_INTERRUPT_BACKTRACE See merge request !1167
This commit is contained in:
@@ -94,6 +94,18 @@ config FREERTOS_WATCHPOINT_END_OF_STACK
|
|||||||
When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no OCD is attached, esp-idf
|
When this watchpoint is hit, gdb will stop with a SIGTRAP message. When no OCD is attached, esp-idf
|
||||||
will panic on an unhandled debug exception.
|
will panic on an unhandled debug exception.
|
||||||
|
|
||||||
|
config FREERTOS_INTERRUPT_BACKTRACE
|
||||||
|
bool "Enable backtrace from interrupt to task context"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
If this option is enabled, interrupt stack frame will be modified to
|
||||||
|
point to the code of the interrupted task as its return address.
|
||||||
|
This helps the debugger (or the panic handler) show a backtrace from
|
||||||
|
the interrupt to the task which was interrupted. This also works for
|
||||||
|
nested interrupts: higer level interrupt stack can be traced back to the
|
||||||
|
lower level interrupt.
|
||||||
|
This option adds 4 instructions to the interrupt dispatching code.
|
||||||
|
|
||||||
config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
|
config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS
|
||||||
int "Number of thread local storage pointers"
|
int "Number of thread local storage pointers"
|
||||||
range 1 256
|
range 1 256
|
||||||
|
@@ -104,7 +104,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
.extern pxCurrentTCB
|
.extern pxCurrentTCB
|
||||||
|
|
||||||
/* Enable stack backtrace across exception/interrupt - see below */
|
/* Enable stack backtrace across exception/interrupt - see below */
|
||||||
#define XT_DEBUG_BACKTRACE 0
|
#ifdef CONFIG_FREERTOS_INTERRUPT_BACKTRACE
|
||||||
|
#define XT_DEBUG_BACKTRACE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -195,7 +197,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
It does take a few more instructions, so undef XT_DEBUG_BACKTRACE
|
It does take a few more instructions, so undef XT_DEBUG_BACKTRACE
|
||||||
if you want to save the cycles.
|
if you want to save the cycles.
|
||||||
*/
|
*/
|
||||||
#if XT_DEBUG_BACKTRACE
|
#ifdef XT_DEBUG_BACKTRACE
|
||||||
#ifndef __XTENSA_CALL0_ABI__
|
#ifndef __XTENSA_CALL0_ABI__
|
||||||
rsr a0, EPC_1 + \level - 1 /* return address */
|
rsr a0, EPC_1 + \level - 1 /* return address */
|
||||||
movi a4, 0xC0000000 /* constant with top 2 bits set (call size) */
|
movi a4, 0xC0000000 /* constant with top 2 bits set (call size) */
|
||||||
|
Reference in New Issue
Block a user