Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Stevenelson
#12870 I still get an error... but I do see the libraries now if I choose generic esp8266 as the board.

I must have an inherent misunderstanding of this process. Is the point of this new ide to install arduino code ONTO an esp8266? Or am I connecting an esp8266 to an UNO board? I was under the assumption that I was installing the code onto the UNO board and the libary makes it easier to talk to the esp8266.

Image
This is the error I get when I choose the UNO board.

I just noticed that the library list changes when I select the UNO board vs the esp8266 board. I think that's my problem.
Image
User avatar
By 4refr0nt
#12871
Stevenelson wrote:I must have an inherent misunderstanding of this process.


New ide install arduino code and Espressif SDK libraries into esp8266. And u can use many Arduino libraries and sketches too (with some restrictions: interrupts, registers and so on low-level functions). Arduino (as device) not needed.
User avatar
By nicoverduin
#12910 Fabulous solution!!!!! :mrgreen:
I could not resist however to see if it works under Eclipse with the Jantje plugin. So I create an empty sketch
Code: Select all#include "Arduino.h"
//
// Pin definitions
//

//
// global defines & parameters
//

//
// global variables
//

/**
 * @name setup()
 * initialize the program
 */
void setup()
{
}

/**
 * @name loop()
 * main loop of program and runs endlessly
 */
void loop()
{
}


Unfortunately the compiler stops with the assembly part:
Code: Select all11:45:38 **** Incremental Build of configuration Release for project testNewESP8266 ****
make all
Building file: ../testNewESP8266.cpp
Starting C++ compile
"D:/arduino-1.6.1-p1-windows/arduino-1.6.1/hardware/tools/esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH "-ID:/arduino-1.6.1-p1-windows/arduino-1.6.1/hardware/tools/esp8266/sdk//include" -c -Os -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -std=c++11 -MMD  -DF_CPU=80000000L -DARDUINO=161 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266     -I"D:\arduino-1.6.1-p1-windows\arduino-1.6.1\hardware\esp8266com\esp8266\cores\esp8266" -I"D:\arduino-1.6.1-p1-windows\arduino-1.6.1\hardware\esp8266com\esp8266\variants\esp01" -MMD -MP -MF"testNewESP8266.cpp.d" -MT"testNewESP8266.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "../testNewESP8266.cpp"  -o  "testNewESP8266.cpp.o"   -Wall
Finished building: ../testNewESP8266.cpp
 
Building file: D:/arduino-1.6.1-p1-windows/arduino-1.6.1/hardware/esp8266com/esp8266/cores/esp8266/cont.S
Starting S compile
"D:/arduino-1.6.1-p1-windows/arduino-1.6.1/hardware/tools/esp8266/xtensa-lx106-elf/bin/xtensa-lx106-elf-as"  -o  -MMD -MP -MF"arduino/cont.S.d" -MT"arduino/cont.S.o" -D__IN_ECLIPSE__=1 "D:/arduino-1.6.1-p1-windows/arduino-1.6.1/hardware/esp8266com/esp8266/cores/esp8266/cont.S"   "arduino/cont.S.o"   -Wall
d:\arduino-1.6.1-p1-windows\arduino-1.6.1\hardware\tools\esp8266\xtensa-lx106-elf\bin\xtensa-lx106-elf-as.exe: unrecognized option `-P'
make: *** [arduino/cont.S.o] Error 1

11:45:39 Build Finished (took 1s.19ms)


Any idea?