Hardware WDT Stack Dump Tool by mhightower83 · Pull Request #7010 · esp8266/Arduino
added 10 commits
January 10, 2020 19:48This Sketch demonstrates the use of a tool to print a stack dump at reboot after a Hardware WDT event. The module hwdt_app_entry.cpp writes a stack dump to the serial interface after a Hardware Watchdog Timer has struck and a new boot cycle has begun. The sketch must properly initialized the Serial port before the crash. hwdt_app_entry.cpp is the core file that does the work.
Improved comments. Added option to match the UART speed used by the sketch. Added option to print greeting at the start to indicate the HWDT stack dump code is active. Isolated logic for handling strings: one assuming they are not inited at the time the code is running and one that does. The later appears to be the case.
Fix issue with HWDT reason detection when sketch crashes too fast.
Added sample sketch menu option for crashing with a function defined
with a weak attribute via prototype, but never actually defined in
full function form. eg. `void trouble(void){return;}`
Adjusted configuration option order for most likely to be used to the top. Tried to improve comments. Replace numbers with enum values.
Regular global strings have worked reliably. Tweaked reset reason detection. Reordered elements in global structure. Improve #if test for debug option Always improving comments.
mhightower83
changed the title
Hardware WDT Stack Dump
Hardware WDT Stack Dump Tool
data problem that occurs when printing after a flash upload using esptool. Curiously, esptool stub also uses similar delays. Word choices and description improvements.
no mixed up stack frame was created. Also removed no longer needed extra level of function calling. Use existing macros from uart_register,h to handle getting current UART speed. Added some missing `const`.
Improves the SYS stack space available when using the extra 4K Heap option in conjunction with HWDT. Replaces the ROM AES buffer at 0x3FFFEA80 with one provided by malloc().
Check if cont stack is yielding to SYS, use g_pcont->sp_yield to limit the amount of the cont stack dumped. Generalized dev logic path to create a generalized debug function hwdt_pre_sdk_init_icache.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters