how to debug rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) an arduino-esp32

an-erd
Posts: 2
Joined: Tue Dec 04, 2018 7:53 pm

how to debug rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) an arduino-esp32

Postby an-erd » Tue Dec 04, 2018 8:06 pm

Hi,
I'm using arduino-esp32 with the latest release 1.0.1-rc1.

I receive this message without a stack trace or an exception.

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9220
load:0x40080400,len:6300
entry 0x400806a4
As I saw in some other threads, I changed the following lines in sdkconfig.h and recompiled everything:

Code: Select all

//#define CONFIG_ESP32_PANIC_PRINT_REBOOT 1
#define CONFIG_ESP32_PANIC_GDBSTUB 1
During upload I got information like

Code: Select all

Uploading stub...
Running stub...
Stub running...
So how can I proceed from here? I need a hint on where in my code the problem occurs and wat the reason might be?

ESP_Sprite
Posts: 8926
Joined: Thu Nov 26, 2015 4:08 am

Re: how to debug rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) an arduino-esp32

Postby ESP_Sprite » Wed Dec 05, 2018 3:01 am

First of all, if this is the Arduino SDK (and not ESP-IDF with added Arduino component), editing sdkconfig.h is not going to do anything, as Arduino comes with esp-idf precompiled. Secondly, the stub you see during upload is the download stub, not the GDB stub you are referring to. Thirdly, the gdb stub is only invoked at times where you normally would get a panic; as you don't seem to get a panic, the gdb stub is not going to help you.

I can't really tell you what causes your error without seeing the code. It's usually either memory corruption, or you do something in an interrupt context that you shouldn't do, but without the code it's hard to tell.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: how to debug rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) an arduino-esp32

Postby ESP_igrr » Wed Dec 05, 2018 3:12 am

I don't know how to do this in Arduino, but if you build with Arduino as IDF component, you can increase bootloader log verbosity. This will print PC (program counter) values of both CPUs, after reboot. Often this can give a hint about the location of the issue.

an-erd
Posts: 2
Joined: Tue Dec 04, 2018 7:53 pm

Re: how to debug rst:0x8 (TG1WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) an arduino-esp32

Postby an-erd » Wed Dec 05, 2018 9:27 am

The code and log messages are available in the following thread because I experienced the issue with BLE:
https://github.com/nkolban/esp32-snippets/issues/735

It would be good to get a mean to access PC or some more information to follow up in arduino-esp32. If that's not easy possible to increase the bootloader loglevel, I maybe change to Arduino as IDF component.

Who is online

Users browsing this forum: No registered users and 136 guests