adding Handler serveStatic cause : region `iram0_0_seg' overflowed ESP32 #224
johnnytolengo
started this conversation in
Support
Replies: 2 comments 1 reply
-
@johnnytolengo this issue is not related at all to this library |
Beta Was this translation helpful? Give feedback.
0 replies
-
@mathieucarbou I understand, but I have a doubt, after websever.begin() can I declare more Handlers? eg:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Platform
ESP32
IDE / Tooling
PlatformIO
What happened?
Hi, my ENV:
Chip is ESP32-D0WDQ6
After calling:
web_server->serveStatic("/", LittleFS, "/www");
I got the following error:
I tried to edit the ~/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/ld/memory.ld
and increase the iram0_0_seg Memory , after that the compile success, no errors. The uploaded code runs badly in a very weird way, eg. printf not working anymore, the web server runs in an extrange way (runs some old version written API)
if I remove the web_server->serveStatic("/", LittleFS, "/www"); line the ESP32 is again working and even compliles without iram0_0_seg oveflow error but without web.
I've been days trying to debug that without success, I have not clue where is the issue.
Stack Trace
/home/mm/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/dk_st15_v3/firmware.elf section
.iram0.text' will not fit in region
iram0_0_seg'/home/mm/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: IRAM0 segment data does not fit.
/home/mm/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `iram0_0_seg' overflowed by 660 bytes
collect2: error: ld returned 1 exit status
Minimal Reproductible Example (MRE)
#include <Arduino.h>
#include <MyMain.h> //<--Webserver declared here
#include <MainCode.h>
using namespace std;
MyMain myMain;
MainCode mainCode(myMain);
void setup() {
Serial.begin(115200);
vTaskDelay(1000/portTICK_PERIOD_MS);
mainCode.begin(); //<-- Webserver started here from another class
}
void loop() {
}
I confirm that:
Beta Was this translation helpful? Give feedback.
All reactions