Merge branch 'feature/freertos_interrupt_backtrace_opt' into 'master'

freertos: introduce CONFIG_FREERTOS_INTERRUPT_BACKTRACE

See merge request !1167
pull/928/merge
Ivan Grokhotkov 2017-08-31 10:45:06 +08:00
commit e57a664798
2 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -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
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
int "Number of thread local storage pointers"
range 1 256

Wyświetl plik

@ -104,7 +104,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.extern pxCurrentTCB
/* 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
if you want to save the cycles.
*/
#if XT_DEBUG_BACKTRACE
#ifdef XT_DEBUG_BACKTRACE
#ifndef __XTENSA_CALL0_ABI__
rsr a0, EPC_1 + \level - 1 /* return address */
movi a4, 0xC0000000 /* constant with top 2 bits set (call size) */