ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

garbage included at compilation of const char index_html[] PROGMEM = R"rawliteral

Open kalex3000 opened this issue 3 years ago • 3 comments

hi, I use const char index_html[] PROGMEM = R"rawliteral(

)rawliteral"; the compiler introduce a lot of garbage in it, anyone that can help me to fix this issue, I'm using Arduino IDE??

kalex3000 avatar Nov 01 '22 15:11 kalex3000

Ran into the same issue. Seems to have to do with the way lambdas callbacks (for server.on) capture the PROGMEM variables. Making the PROGMEM variables global in the file instead of capturing them solved my issue.

dedobbin avatar Nov 27 '22 21:11 dedobbin

When "const char index_html[] PROGMEM = R"rawliteral( " is more than 10Kbyte has that issue. I fixed splitting the main index_html to keep small amount of memory. and also writing some part of the index_html in the String processor(const String& var){ thanks. that issue was even if the Var was global!!.

kalex3000 avatar Nov 28 '22 13:11 kalex3000

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 18 '23 13:06 stale[bot]