-->
Page 1 of 2

esp8266 using arduino IDE

PostPosted: Fri Apr 28, 2017 5:21 am
by navs
Hi,
I have connected the esp8266 board directly to my laptop.
I am trying to run the program using arduino IDE after following these steps,

https://github.com/esp8266/Arduino#inst ... ds-manager

check "installing with board manager" phrase.
but it is giving the following error

'error compiling to board nodeMCU 1.0(ESP12E- module)'

can any one please suggest where i went wrong? I am very new to ESP8266.
Thanks

Re: esp8266 using arduino IDE

PostPosted: Fri Apr 28, 2017 11:50 am
by taikapanu
Hello!

First could you clarify your installation steps?

We're you able to install the ESP boards using Board menu?
DId you select ESP8266 board from Tools > Board menu after installation?

I suppose Yes, if you get an error to compile for ESP. Have you tried to compile one of the examples or your own code? Does ESP-generic board compile? Do you have the newest Arduino IDE? Mine is 1.6.12 and it works at least.

Is the board recognized by your laptop? PC? Check for drivers here
https://www.marginallyclever.com/2017/0 ... duino-ide/

Have you tried uninstalling and installing the boards again?

Hope at least one of those will help :)

-Juha

Re: esp8266 using arduino IDE

PostPosted: Fri May 05, 2017 8:16 am
by navs
Hello, sorry for late reply.

yes! I installed the ESP boards using boards menu and also selected NodeMCU 1.0( ESP -12E module).
I tried with the example code. but its not compiling, It is giving the following error.


Code: Select allArduino: 1.6.9 (Windows XP), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

In file included from c:\documents and settings\intern\local settings\application data\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:59:0,

                 from c:\documents and settings\intern\local settings\application data\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\memory:62,

                 from C:\Documents and Settings\Intern\Local Settings\Application Data\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\Esp.cpp:24:

c:\documents and settings\intern\local settings\application data\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf\bits\c++config.h:429:30: fatal error: bits/cpu_defines.h: No such file or directory

 #include <bits/cpu_defines.h>

                              ^

compilation terminated.

exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.






mine arduino IDE version is 1.6.9
do you think i have to try with the newest version?
I followed every steps from the link you have sent, tried with installing and uninstalling again.
Still there is problem in compiling.
Kindly provide the possible suggestion.

also, if anyone has faced the same problem, please reply.

Re: esp8266 using arduino IDE

PostPosted: Fri May 05, 2017 1:53 pm
by taikapanu
Hi,

Googled "#include <bits/cpu_defines.h>". Found something like this:
https://github.com/esp8266/Arduino/issues/1631

I copied the contents of

esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\xtensa-lx106-elf\bits
to

esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits

and now blank sketches compile without error and I was able to compile, upload, and run ESP8266 Blink.