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

How to increase the stack size? #303

Closed
rfenouil opened this issue Apr 4, 2023 · 5 comments
Closed

How to increase the stack size? #303

rfenouil opened this issue Apr 4, 2023 · 5 comments
Labels
question Further information is requested

Comments

@rfenouil
Copy link

rfenouil commented Apr 4, 2023

Thank you for this work, this library is awesome !

I am using the 'esp32-ble-multiple' template to connect to 2 BMS (ebike batteries), and when I add too many sensors I get into the boot loop problem.

I tried increasing the stack size as you suggested here, but it did not help:

esphome:
  name: ${name}
  platformio_options:
    build_flags:
       - -DCONFIG_ARDUINO_LOOP_STACK_SIZE=65535
  comment: ${device_description}
  project:
    name: "syssi.esphome-jk-bms"
    version: 1.4.0

I also tried to set DARDUINO_LOOP_STACK_SIZE as I found a reference to this name during my search but it did not help either.

Can you spot something wrong with my declaration above ?

Thank you for your help !

My esphome version (docker): 2023.3.2

@rfenouil
Copy link
Author

rfenouil commented Apr 4, 2023

Sorry for the naive questions, I am not familiar with esphome/arduino ecosystem...
Should I reset the flash with esptool when changing such options, or is everything overwritten ayway ?

Just in case I also clean the ".esphome" folder from time to time... Not sure if that has any impact though :)

@syssi
Copy link
Owner

syssi commented Apr 4, 2023

I don't know the answer of your question. It's possible the define doesn't work because it's for the Arduino framework only. May be the setting is different for ESP-IDF. Could you ask for help at the ESPHome discord channel and share the solution here?

@rfenouil
Copy link
Author

rfenouil commented Apr 4, 2023

Ok, I'll try to get some info and report back.
Thank you.

@kev300
Copy link

kev300 commented Apr 6, 2023

Sorry to hijack this thread by maybe my question fits here and I don't need to open another issue. 😬
Why are you using the framework setting esp-idf for this esphome component and why doesn't it work with the default (arduino)?

I tried it out of curiosity. It compiled but the esp did not react after the flash anymore so I had to reflash it via USB. ;)

@syssi
Copy link
Owner

syssi commented Apr 6, 2023

In the past the Arduino framework wasn't able to handle the 300 bytes BLE notifications from the JK-BMS. It did crash on the first received message. Some people reported it does work in general now. The Arduino framework is an additional abstraction layer on top of ESP-IDF. I try to avoid additional/unnecessary layers if possible.

@syssi syssi changed the title Increasing stack size ? How to increase the stack size? May 9, 2023
@syssi syssi added the question Further information is requested label May 9, 2023
@syssi syssi closed this as completed Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants