tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
673 stars 220 forks source link

8KB of task stack? #66

Closed malinges closed 4 years ago

malinges commented 4 years ago

Hi,

I'd like to start by thanking you for your work, your library is great and I use it regularly :) However I'm a bit puzzled by the "8KB of task stack in total" part in the README. I found 3 tasks in the code, each with its own stack size:

This adds up to 9216. However these are not bytes but words, which on the ESPs are 4 bytes (32 bits), so this gives a total of 36 864 bytes, or 36KB. Quite more than 8KB :/ Am I missing something?

BrianPugh commented 4 years ago

esp-idf's FreeRTOS deviates from vanilla FreeRTOS when it comes to their stack size declaration. They give it in bytes:

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html#tasks-and-task-creation

malinges commented 4 years ago

@BrianPugh OMG you're right... I was indeed missing something. Thanks! So we're down to 9KB (instead of 36KB) vs. the documented 8KB. Much better :-)

tonyp7 commented 4 years ago

I have completely revised the readme file to include more documentation and dropped this reference to the stack.