8000 Hardware WDT Stack Dump Tool by mhightower83 · Pull Request #7010 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Hardware WDT Stack Dump Tool #7010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 76 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
82c7d33
Hardware WDT Stack Dump
mhightower83 Jan 11, 2020
8fbaa7e
Corrected Style. Improved HWDT reset detectionat boot.
mhightower83 Jan 11, 2020
e272111
Style and typos
mhightower83 Jan 11, 2020
254c50f
Update comments.
mhightower83 Jan 11, 2020
093ac02
Improvements to reset reason determination.
mhightower83 Jan 14, 2020
7978860
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 14, 2020
25f0140
Style plus
mhightower83 Jan 14, 2020
b8abe5b
Moved all configuration options to the top.
mhightower83 Jan 14, 2020
c2cbb87
Removed clutter of having an alternate printing method.
mhightower83 Jan 14, 2020
309ac45
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 14, 2020
1df82c0
Added delays around uart_div_modify. This appeara to resolve the lost
mhightower83 Jan 14, 2020
99c6e4c
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 Jan 15, 2020
ad3bbad
Finished TODO looked at assembly of app_entry_redefinable to confirm
mhightower83 Jan 15, 2020
b08714b
Comment changes.
mhightower83 Jan 16, 2020
ca0eab3
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 19, 2020
be7417a
Improved comments.
mhightower83 Jan 20, 2020
e458e7e
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 Jan 20, 2020
4528446
Several corrections to set_uart_speed
mhightower83 Jan 21, 2020
ed826ea
Removed unused include.
mhightower83 Jan 21, 2020
b60b6a2
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 23, 2020
81418df
Now runs from flash before SDK is started.
mhightower83 Jan 31, 2020
17fab8a
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 31, 2020
c0121fe
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Feb 6, 2020
1c4b356
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Feb 14, 2020
1f0e6f4
Changed ICACHE size from 32K to 16K to avoid conflict with
mhightower83 Feb 14, 2020
7288abf
Added support to print ThunkStack.
mhightower83 Feb 15, 2020
714ab07
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Mar 17, 2020
e8bf3f0
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Mar 27, 2020
32737bb
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Apr 7, 2020
dbfaf0d
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Apr 16, 2020
06a001d
Merge branch 'master' into pr-hwdt-stack-dump
earlephilhower Apr 24, 2020
eec0192
comment cleanup. added missing additional #if defined()
mhightower83 Apr 25, 2020
1264394
Update style used for structure and typedef to match that used in core
mhightower83 Apr 26, 2020
15d11ff
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Apr 26, 2020
8dd28e2
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 May 5, 2020
1da67e3
Updated comments
mhightower83 May 5, 2020
4db3c0d
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 May 31, 2020
fa83586
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 May 31, 2020
0592c4a
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jun 19, 2020
f74ebbd
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jul 7, 2020
7d75454
Corrected new errors from upgrade to GCC 10.1 toolchain related to
mhightower83 Jul 11, 2020
dcce57d
Work around divide by 0 HWDT event under toolchain 10.1.
mhightower83 Jul 13, 2020
f14db29
Merge branch 'master' into pr-hwdt-stack-dump
devyte Jul 17, 2020
ec2ef11
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 Jul 17, 2020
8c2d214
Changes to move feature into core.
mhightower83 Jul 17, 2020
9024184
Fix stack character buffer length.
mhightower83 Jul 26, 2020
1f7342d
Merge branch 'master' into pr-hwdt-stack-dump
devyte Aug 4, 2020
2ce297c
Updated comment to reflect support via Arduino IDE Tools menu.
mhightower83 Aug 4, 2020
3a351ae
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 Aug 4, 2020
1bd4e33
Improve meshing of HWDT and NOEXTRA4K
mhightower83 Aug 5, 2020
65f8e1d
Made compatible with `disable_extra4k_at_link_time()` usage.
mhightower83 Aug 7, 2020
c31a354
CI style
mhightower83 Aug 7, 2020
18a5f41
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Sep 2, 2020
67085cd
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Sep 17, 2020
b7e4b68
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Sep 30, 2020
b080d33
Adjusted down the ROM Stack space for the extra 4K Heap option.
mhightower83 Oct 1, 2020
dbc2c34
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Oct 2, 2020
ba524a3
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Oct 2, 2020
dea96b2
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Oct 17, 2020
fd1131d
Add replacement aes_unwrap for the debug HWDT option.
mhightower83 Oct 17, 2020
8bfcda7
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Oct 24, 2020
ea1f384
Update umm_info_safe_printf_P to support default of unaligned PROGMEM…
mhightower83 Oct 27, 2020
a1ab73d
Improve cont stack trace for yielding case.
mhightower83 Oct 27, 2020
720fe3b
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Oct 28, 2020
2b46960
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Nov 11, 2020
761d736
Added missed update to heap.cpp for change to use PSTR instead of PSTR4
mhightower83 Nov 25, 2020
fd1e2e1
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Nov 25, 2020
b94777e
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Dec 6, 2020
504b769
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Dec 15, 2020
5b161db
Updated comments and #if in aes_unwrap.
mhightower83 Dec 17, 2020
9801d28
Merge branch 'master' into pr-hwdt-stack-dump
earlephilhower Dec 23, 2020
755ab97
Merge branch 'pr-hwdt-stack-dump' of github.com:mhightower83/Arduino …
mhightower83 Jan 14, 2021
96b6ddb
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Jan 14, 2021
e7c5061
Merge branch 'master' into pr-hwdt-stack-dump
mhightower83 Mar 28, 2021
37efba8
Update boards.txt
mhightower83 Mar 29, 2021
dcec7de
Merge branch 'master' into pr-hwdt-stack-dump
d-a-v Apr 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed clutter of having an alternate printing method.
Regular global strings have worked reliably.
Tweaked reset reason detection.
Reordered elements in global structure.
Improve #if test for debug option
Always improving comments.
  • Loading branch information
mhightower83 committed Jan 14, 2020
commit c2cbb87dfe5d44fdf667224cf4b3b3f6d055a34f
2 changes: 1 addition & 1 deletion libraries/esp8266/examples/HwdtStackDump/AddOn.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef DEBUG_HWDT
#ifdef HWDT_STACK_DUMP_H

extern struct rst_info resetInfo;

Expand Down
2 changes: 1 addition & 1 deletion libraries/esp8266/examples/HwdtStackDump/HwdtStackDump.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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.
Note, at restart the UART speed is set by the ROM to 115200 bps. This is the
speed your serial device needs to be set to for displaying the dump.
speed your serial device needs set for displaying the dump.
See hwdt_app_entry.cpp for more details.

*/
Expand Down
179 changes: 36 additions & 143 deletions libraries/esp8266/examples/HwdtStackDump/hwdt_app_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,29 +150,14 @@
/*
* HWDT_INFO
*
* Gather some useful information on ROM and bootloader combined, sys, and cont
* stack usage. If you are missing the include file for this structure, you can
* copy-paste from an embeded version of the .h below.
* Gather some interesting information on ROM and bootloader combined, sys, and
* cont stack usage. If you are missing the include file for this structure, you
* can copy-paste from an embeded version of the .h below.
*
*/
#define HWDT_INFO


/*
* HWDT_OPTION_THE_OPTIMIST
*
* The optimist's choice. It can be used to reduce the IRAM footprint. It
* assumes the strings in memory before the crash are still valid and can be
* used for printing the report.
*
* EDIT: It appears I am mistaken. String constants appear to be loaded
* at boot time and are available from the start before crt0 runs. I'll wait
* for a reviewer confirmation before making this option a permanent selection.
*
*/
#define HWDT_OPTION_THE_OPTIMIST


/*
* ROM_STACK_DUMP
*
Expand All @@ -182,6 +167,7 @@
#define ROM_STACK_DUMP
*/


/*
* HWDT_IF_METHOD_RESET_REASON
*
Expand All @@ -191,6 +177,10 @@
* Checks are being performed when DEBUG_HWDT_DEBUG_RESET_REASON has been
* defined.
*
* EDIT: I should settle on one or the other; however, new issues continue to
* popup on determining reset reason. I'll wait till later and pick the
* smaller. At this time the "if" approach is 4 bytes smaller.
*
#define DEBUG_HWDT_DEBUG_RESET_REASON
*/
#define HWDT_IF_METHOD_RESET_REASON
Expand Down Expand Up @@ -240,6 +230,7 @@ extern uint32_t rtc_get_reset_reason(void);
#ifdef HWDT_STACK_DUMP_H
#define HWDT_INFO_t LOCAL_HWDT_INFO_t
#define hwdt_info LOCAL_hwdt_info
#define HWDT_VERIFY_HWDT_INFO
#endif

/*
Expand All @@ -251,17 +242,17 @@ extern uint32_t rtc_get_reset_reason(void);
/* */
/* Start of copy-paste block to create "hwdt_app_entry.h" */
/*____________________________________________________________________________*/
#if !defined(HWDT_STACK_DUMP_H) || defined(HWDT_INFO_t)
#if !defined(HWDT_STACK_DUMP_H) || defined(HWDT_VERIFY_HWDT_INFO)
#define HWDT_STACK_DUMP_H

typedef struct HWDT_INFO {
uint32_t rom;
uint32_t sys;
uint32_t cont;
uint32_t rtc_sys_reason;
uint32_t rom_api_reason;
uint32_t cont_integrity;
uint32_t rtc_sys_reason;
uint32_t reset_reason;
uint32_t cont_integrity;
bool g_pcont_valid;
} HWDT_INFO_t;

Expand All @@ -277,9 +268,10 @@ extern HWDT_INFO_t hwdt_info;
/*____________________________________________________________________________*/


#ifdef HWDT_INFO_t
#ifdef HWDT_VERIFY_HWDT_INFO
#undef HWDT_INFO_t
#undef hwdt_info
#undef HWDT_VERIFY_HWDT_INFO
static_assert(sizeof(HWDT_INFO_t) == sizeof(LOCAL_HWDT_INFO_t), "Local and include verison of HWDT_INFO_t do not match.");
#endif

Expand Down Expand Up @@ -348,25 +340,14 @@ void enable_debug_hwdt_at_link_time(void)
/* the following code is linked only if a call to the above function is made somewhere */

extern "C" {
#if 0 // Handy debug print during development
static void ICACHE_RAM_ATTR print_size(uintptr_t val) {
uint32_t fmt_sz[4];
fmt_sz[0] = ('0' ) | ('x' <<8) | ('%' <<16) | ('0' <<24);
fmt_sz[1] = ('8' ) | ('X' <<8) | (',' <<16) | (' ' <<24);
fmt_sz[2] = (' ' ) | ('%' <<8) | ('5' <<16) | ('u' <<24);
fmt_sz[3] = ('\n') | ('\0'<<8) | ('\0'<<16) | ('\0'<<24);
ets_printf((const char *)fmt_sz, val, val);
}
#endif


enum PRINT_STACK {
CONT = 1,
SYS = 2,
ROM = 4
};

#if defined(HWDT_OPTION_THE_OPTIMIST)

static void ICACHE_RAM_ATTR print_stack(uintptr_t start, uintptr_t end, uint32_t chunk) {
ets_printf("\n>>>stack>>>\n\nctx: ");

Expand Down Expand Up @@ -398,84 +379,6 @@ static void ICACHE_RAM_ATTR print_stack(uintptr_t start, uintptr_t end, uint32_t
ets_printf("<<<stack<<<\n");
}

#else
static void ICACHE_RAM_ATTR print_stack(uintptr_t start, uintptr_t end, uint32_t chunk) {

uint32_t fmt_stk[6];
fmt_stk[0] = ('\n') | ('>' <<8) | ('>' <<16) | ('>' <<24);
fmt_stk[1] = ('s' ) | ('t' <<8) | ('a' <<16) | ('c' <<24);
fmt_stk[2] = ('k' ) | ('>' <<8) | ('>' <<16) | ('>' <<24);
fmt_stk[3] = ('\n') | ('\n'<<8) | ('c' <<16) | ('t' <<24);
fmt_stk[4] = ('x' ) | (':' <<8) | (' ' <<16) | ('%' <<24);
fmt_stk[5] = ('s' ) | ('\n'<<8) | ('\0'<<16) | ('\0'<<24);

uint32_t fmt_sp[9];
fmt_sp[0] = ('s' ) | ('p' <<8) | (':' <<16) | (' ' <<24);
fmt_sp[1] = ('%' ) | ('0' <<8) | ('8' <<16) | ('x' <<24);
fmt_sp[2] = (' ' ) | ('e' <<8) | ('n' <<16) | ('d' <<24);
fmt_sp[3] = (':' ) | (' ' <<8) | ('%' <<16) | ('0' <<24);
fmt_sp[4] = ('8' ) | ('x' <<8) | (' ' <<16) | ('o' <<24);
fmt_sp[5] = ('f' ) | ('f' <<8) | ('s' <<16) | ('e' <<24);
fmt_sp[6] = ('t' ) | (':' <<8) | (' ' <<16) | ('%' <<24);
fmt_sp[7] = ('0' ) | ('4' <<8) | ('x' <<16) | ('\n'<<24);
fmt_sp[8] = ('\0') | ('\0'<<8) | ('\0'<<16) | ('\0'<<24);

uint32_t fmt_rom[1];
fmt_rom[0] = ('R' ) | ('O' <<8) | ('M' <<16) | ('\0'<<24);

uint32_t fmt_sys[1];
fmt_sys[0] = ('s' ) | ('y' <<8) | ('s' <<16) | ('\0'<<24);

uint32_t fmt_cont[2];
fmt_cont[0] = ('c' ) | ('o' <<8) | ('n' <<16) | ('t' <<24);
fmt_cont[1] = ('\0') | ('\0'<<8) | ('\0'<<16) | ('\0'<<24);

if (chunk & PRINT_STACK::CONT) {
ets_printf((const char *)fmt_stk, (const char *)fmt_cont);
} else
if (chunk & PRINT_STACK::SYS) {
ets_printf((const char *)fmt_stk, (const char *)fmt_sys);
} else
if (chunk & PRINT_STACK::ROM) {
ets_printf((const char *)fmt_stk, (const char *)fmt_rom);
}

ets_printf((const char *)fmt_sp, start, end, 0);

{
uint32_t fmt_stk_dmp[8];
fmt_stk_dmp[0] = ('%') | ('0' <<8) | ('8' <<16) | ('x' <<24);
fmt_stk_dmp[1] = (':') | (' ' <<8) | (' ' <<16) | ('%' <<24);
fmt_stk_dmp[2] = ('0') | ('8' <<8) | ('x' <<16) | (' ' <<24);
fmt_stk_dmp[3] = ('%') | ('0' <<8) | ('8' <<16) | ('x' <<24);
fmt_stk_dmp[4] = (' ') | ('%' <<8) | ('0' <<16) | ('8' <<24);
fmt_stk_dmp[5] = ('x') | (' ' <<8) | ('%' <<16) | ('0' <<24);
fmt_stk_dmp[6] = ('8') | ('x' <<8) | (' ' <<16) | ('%' <<24);
fmt_stk_dmp[7] = ('c') | ('\n'<<8) | ('\0'<<16) | ('\0'<<24);

size_t this_mutch = end - start;
if (this_mutch >= 0x10) {
for (size_t pos = 0; pos < this_mutch; pos += 0x10) {
uint32_t *value = (uint32_t *)(start + pos);

// rough indicator: stack frames usually have SP saved as the second word
bool looksLikeStackFrame = (value[2] == (start + pos + 0x10));
ets_printf((const char*)fmt_stk_dmp, (uint32_t)&value[0],
value[0], value[1], value[2], value[3],
(looksLikeStackFrame)?'<':' ');
}
}
}
{
uint32_t fmt_stk_end[4];
fmt_stk_end[0] = ('<' ) | ('<' <<8) | ('<' <<16) | ('s' <<24);
fmt_stk_end[1] = ('t' ) | ('a' <<8) | ('c' <<16) | ('k' <<24);
fmt_stk_end[2] = ('<' ) | ('<' <<8) | ('<' <<16) | ('\n'<<24);
fmt_stk_end[3] = ('\n') | ('\0'<<8) | ('\0'<<16) | ('\0'<<24);
ets_printf((const char *)fmt_stk_end);
}
}
#endif

static const uint32_t * ICACHE_RAM_ATTR skip_stackguard(const uint32_t *start, const uint32_t *end, const uint32_t pattern) {
// Find the end of SYS stack activity
Expand Down Expand Up @@ -585,17 +488,8 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
* estimate and expands on it.
*/
hwdt_info.reset_reason = rtc_sys_reason;
if (REASON_WDT_RST == rtc_sys_reason) {
if (OWDT_RESET == rom_api_reason) {
*hwdt_reset = true;
} else {
hwdt_info.reset_reason = REASON_EXT_SYS_RST;
if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
}
}

} else if (REASON_DEFAULT_RST == rtc_sys_reason) {
if (REASON_DEFAULT_RST == rtc_sys_reason ||
REASON_WDT_RST == rtc_sys_reason) {
/*
* 1) The 0 value (REASON_DEFAULT_RST) shows up with multiple EXT_RSTs
* quickly. The 1 value (REASON_WDT_RST), previous if, shows up if
Expand All @@ -609,7 +503,7 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
} else {
hwdt_info.reset_reason = REASON_EXT_SYS_RST;
if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
hwdt_info.reset_reason = ~0;
}
}

Expand All @@ -625,6 +519,16 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
hwdt_info.reset_reason = ~0;
*power_on = false;
}
} else {
/*
* REASON_EXT_SYS_RST is not expected at reboot, let it fall through to
* for confirmation in debug option.
*/
if (REASON_EXT_SYS_RST == rtc_sys_reason) {
if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
}
}
}
#else
// New reset reason logic test
Expand All @@ -645,10 +549,11 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
if (OWDT_RESET == rom_api_reason) {
hwdt_info.reset_reason = REASON_WDT_RST;
*hwdt_reset = true;
} else if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
} else {
hwdt_info.reset_reason = REASON_EXT_SYS_RST;
if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
}
}
break;
/* These should be correct as is */
Expand All @@ -659,7 +564,7 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
hwdt_info.reset_reason = rtc_sys_reason;
break;
/*
* REASON_EXT_SYS_RST is not expected at reboot, let it fall though to
* REASON_EXT_SYS_RST is not expected at reboot, let it fall through to
* default for confirmation.
*/
case REASON_EXT_SYS_RST:
Expand All @@ -671,10 +576,11 @@ static uint32_t ICACHE_RAM_ATTR get_reset_reason(bool* power_on, bool* hwdt_rese
if (POWERON_RESET == rom_api_reason) {
hwdt_info.reset_reason = REASON_DEFAULT_RST;
*power_on = true;
} else if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
} else {
hwdt_info.reset_reason = REASON_EXT_SYS_RST;
if (!debug__confirm_rom_reason(EXT_RESET)) {
hwdt_info.reset_reason = ~0;
}
}
break;
}
Expand Down Expand Up @@ -806,20 +712,7 @@ static void ICACHE_RAM_ATTR handle_hwdt(void) {

/* Print context SYS */
if (hwdt_reset) {
{
#if defined(HWDT_OPTION_THE_OPTIMIST)
ets_printf("\nHardware WDT reset\n");
#else
uint32_t fmt_hwdt[6];
fmt_hwdt[0] = ('\n') | ('H' <<8) | ('a' <<16) | ('r' <<24);
fmt_hwdt[1] = ('d' ) | ('w' <<8) | ('a' <<16) | ('r' <<24);
fmt_hwdt[2] = ('e' ) | (' ' <<8) | ('W' <<16) | ('D' <<24);
fmt_hwdt[3] = ('T' ) | (' ' <<8) | ('r' <<16) | ('e' <<24);
fmt_hwdt[4] = ('s' ) | ('e' <<8) | ('t' <<16) | ('\n'<<24);
fmt_hwdt[5] = 0;
ets_printf((const char*)fmt_hwdt);
#endif
}
ets_printf("\nHardware WDT reset\n");
print_stack((uintptr_t)ctx_sys_ptr, (uintptr_t)rom_stack, PRINT_STACK::SYS);

#ifdef DEBUG_HWDT_NO4KEXTRA
Expand Down
10 changes: 3 additions & 7 deletions libraries/esp8266/examples/HwdtStackDump/hwdt_app_entry.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
#ifndef HWDT_STACK_DUMP_H
#if !defined(HWDT_STACK_DUMP_H) || defined(HWDT_VERIFY_HWDT_INFO)
#define HWDT_STACK_DUMP_H

#ifndef DEBUG_HWDT
#define DEBUG_HWDT
#endif

typedef struct HWDT_INFO {
uint32_t rom;
uint32_t sys;
uint32_t cont;
uint32_t rtc_sys_reason;
uint32_t rom_api_reason;
uint32_t cont_integrity;
uint32_t rtc_sys_reason;
uint32_t reset_reason;
uint32_t cont_integrity;
bool g_pcont_valid;
} HWDT_INFO_t;

Expand Down
0