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

ESP32-DevKitC Boot Loop because of a stack overflow #63

Closed
spoonwzd opened this issue Apr 8, 2022 · 3 comments
Closed

ESP32-DevKitC Boot Loop because of a stack overflow #63

spoonwzd opened this issue Apr 8, 2022 · 3 comments

Comments

@spoonwzd
Copy link

spoonwzd commented Apr 8, 2022

Similar to this issue my ESP32 seems to be stuck in a boot loop after flashing, but it's not the same error.

I've not connected to the BMS and have only changed the board to nodemcu-32s in esp32-example.yaml.

[18:05:22]ets Jun  8 2016 00:22:57
[18:05:22]
[18:05:22]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[18:05:22]configsip: 0, SPIWP:0xee
[18:05:22]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[18:05:22]mode:DIO, clock div:2
[18:05:22]load:0x3fff0018,len:4
[18:05:22]load:0x3fff001c,len:1044
[18:05:22]load:0x40078000,len:10124
[18:05:22]load:0x40080400,len:5828
[18:05:22]entry 0x400806a8
[18:05:23]***ERROR*** A stack overflow in task loopTask has been detected.
[18:05:23]abort() was called at PC 0x40088b98 on core 1
[18:05:23]
[18:05:23]ELF file SHA256: 0000000000000000
[18:05:23]
[18:05:23]Backtrace: 0x40088904:0x3ffafb60 0x40088b81:0x3ffafb80 0x40088b98:0x3ffafba0 0x4008a77b:0x3ffafbc0 0x4008c344:0x3ffafbe0 0x4008c2fa:0x3ffbbcd8
←[33mWARNING Found stack trace! Trying to decode it←[0m
←[33mWARNING Decoded 0x40088904: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715←[0m
←[33mWARNING Decoded 0x40088b81: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715←[0m
←[33mWARNING Decoded 0x40088b98: vApplicationStackOverflowHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715←[0m
←[33mWARNING Decoded 0x4008a77b: vTaskSwitchContext at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507←[0m
←[33mWARNING Decoded 0x4008c344: _frxt_dispatch at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/portasm.S:406←[0m
←[33mWARNING Decoded 0x4008c2fa: _frxt_int_exit at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/portasm.S:206←[0m
[18:05:24]
[18:05:24]Rebooting...
@jonadis
Copy link

jonadis commented Apr 8, 2022

Try commenting out some of the sensors. I think it overloads the stack with all of the sensors in the example.

@syssi
Copy link
Owner

syssi commented Apr 8, 2022

Another solution is to increase the stack size:

esphome/issues#855 (comment)

esphome:
  name: jk-bms
  platformio_options:
    build_flags: 
      - -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768

esp32:
  board: nodemcu-32s
  variant: esp32
  framework:
    type: arduino
    version: 2.0.2
    source: https://github.com/espressif/arduino-esp32.git#2.0.2
    platform_version: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream

@syssi syssi changed the title ESP32-DevKitC Boot Loop ESP32-DevKitC Boot Loop because of a stack overflow Apr 8, 2022
@spoonwzd
Copy link
Author

spoonwzd commented Apr 8, 2022

Increasing the stack size as above sorted the issue - thanks!!

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

3 participants