I am new to arduino/esp32 programming and am stuck on a strange (at least to me) issue.
Basically, I have the esp32 running in a soft AP mode with the webServer module running on it and use it to serve basic webpages.
I followed an example tutorial for making the sketch and it works fine, the problems start, when I need to return longer amounts of text. In fact I think the problem has probably nothing to do with the webserver part, but rather with the part of the code where fill the char arrays up with text.
I define a bunch of char arrays like this:
Code: Select all
char replyHTML[9000];
char setupForm[5000];
char sslCert[3000];
At first, the ESP32 was just rebooting without any errors, so I reduced the size of the char arrays by a bit and the ESP32 was still rebooting, but this time around it started printing out the following error:
Code: Select all
***ERROR*** A stack overflow in task loopTask has been detected.
abort() was called at PC 0x4008f910 on core 1
The problem is, that I that I need to fit about 10000 - 15000 characters combined into the char arrays above.
This can't be a memory problem, because when I upload the code, the editor reports "....leaving 284292 bytes for local variables" and the about 15000 characters I need in total is not much more than 15KB, so there should be plenty of space.
Thank you for any advice.