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

using your serial and web examples on nodeMCU causes an error... #43

Closed
rhamblen opened this issue Sep 10, 2017 · 2 comments
Closed

using your serial and web examples on nodeMCU causes an error... #43

rhamblen opened this issue Sep 10, 2017 · 2 comments

Comments

@rhamblen
Copy link

I've had everything working using the basic examples you showed, but I get an error when using the serial and web examples.
When I complie using a DUO everything is fine, when I use the NodeMCU it reports an error...
section type conflict with __c
in looking into this it appears the apply() function is the issue and some definitions need to move to global and out of the function. esp8266/Arduino#2078
Is it worth addressing the problem if you are able to identify the cause?

@moose4lord
Copy link
Collaborator

moose4lord commented Sep 30, 2017

I saw this problem as well. A workaround is presented in issue #3369 regarding using PROGMEM. For the esp8266_webinterface sketch, make the following changes:
Rename index.html.h to index.html.cpp and make this change at the top of the file:

#include <pgmspace.h>
char index_html[] PROGMEM = R"=====(

Similarly rename and change main.js.h:

#include <pgmspace.h>
char main_js[] PROGMEM = R"=====(

Then change the #include reference to these two files in esp8266_webinterface.ino to this:

extern char index_html[];
extern char main_js[]; 

This causes the PROGMEM global variables to be compiled in modules separate from the main ino module.

That worked for me.

@k1gavrilov
Copy link

Bro, you are the WIZARD!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants