Skip to content
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

Suggestion: Remove hardware_uart: UART1 from example configs #218

Closed
kbuck1 opened this issue Jan 12, 2025 · 1 comment
Closed

Suggestion: Remove hardware_uart: UART1 from example configs #218

kbuck1 opened this issue Jan 12, 2025 · 1 comment

Comments

@kbuck1
Copy link

kbuck1 commented Jan 12, 2025

I had a very difficult time installing firmware built from this project on my ESP32-WROOM-32D clone; my ESP32 kept boot-looping with a stack trace that seemed to make no sense:

[17:17:16]Rebooting...
[17:17:16]ets Jul 29 2019 12:21:46
[17:17:16]
[17:17:16]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:17:16]configsip: 0, SPIWP:0xee
[17:17:16]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:17:16]mode:DIO, clock div:2
[17:17:16]load:0x3fff0030,len:1184
[17:17:16]load:0x40078000,len:13132
[17:17:16]load:0x40080400,len:3036
[17:17:16]entry 0x400805e4
[17:17:16]Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
[17:17:16]Memory dump at 0x400f8bc8: ffffffff ffffffff ffffffff
[17:17:16]Core  1 register dump:
[17:17:16]PC      : 0x400f8bcc  PS      : 0x00060e30  A0      : 0x800fa5d7  A1      : 0x3ffb25c0  
WARNING Decoded 0x400f8bcc: gpio_iomux_in at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:717
[17:17:16]A2      : 0x00000001  A3      : 0x00000009  A4      : 0x011a0009  A5      : 0x00000009  
[17:17:16]A6      : 0x00060e20  A7      : 0x00000001  A8      : 0x800f92b1  A9      : 0x3ffb25a0  
[17:17:16]A10     : 0x00000009  A11     : 0x00000011  A12     : 0xffff8fff  A13     : 0x00060e23  
[17:17:16]A14     : 0x007bde08  A15     : 0x003fffff  SAR     : 0x00000009  EXCCAUSE: 0x00000000  
[17:17:16]EXCVADDR: 0x00000000  LBEG    : 0x40089a60  LEND    : 0x40089a6b  LCOUNT  : 0xffffffff  
[17:17:16]
[17:17:16]
[17:17:16]Backtrace:0x400f8bc9:0x3ffb25c00x400fa5d4:0x3ffb25e0 0x400f71d3:0x3ffb2610 0x400f5551:0x3ffb2670 0x400e0549:0x3ffb26b0 0x400ec590:0x3ffb26e0 0x400f75e6:0x3ffb2820 
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x400f8bc9: gpio_set_drive_capability at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:607
WARNING Decoded 0x400fa5d4: uart_set_pin at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:695 (discriminator 1)
WARNING Decoded 0x400f71d3: uartBegin at /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:167 (discriminator 2)
WARNING Decoded 0x400f5551: HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char, bool, unsigned long, unsigned char) at /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:359 (discriminator 4)
WARNING Decoded 0x400e0549: esphome::logger::Logger::pre_setup() at /root/config/.esphome/build/minisplit-office/src/esphome/components/logger/logger_esp32.cpp:117
WARNING Decoded 0x400ec590: setup() at /root/config/.esphome/build/minisplit-office/src/main.cpp:105
WARNING Decoded 0x400f75e6: loopTask(void*) at /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42
[17:17:16]
[17:17:16]
[17:17:16]
[17:17:16]
[17:17:16]ELF file SHA256: 0000000000000000
[17:17:16]

After lots of debugging, it turns out that this is because I forgot to remove hardware_uart: UART1 when I copy-pasted the logging section of the config file. If you are using a ESP32 device, most have UART1 connected to the internal SPI flash, which will result in the chip throwing an IllegalInstruction exception the first time the logger attempts to write.

Since ESP32 is the recommended hardware, it would be best if the example configs work out-of-the-box with ESP32 chips.

@phidauex
Copy link
Collaborator

Thanks for this, I wrote much of the example configs, and I'm the last person in the world still using ESP8266 devices (mine have been stable, but many people have had problems with theirs), so I have to "translate" to ESP32, and missed those lines. Fixed in #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants