Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By picstart
#13033
Code: Select allconst int led = 2;
void setup() {
  // put your setup code here, to run once:
pinMode(led, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(led, 1);
 
  delay(100);
  digitalWrite(led, 0);
   delay(100);
}

The above test ( using mycode) is very very very simple and it works

This is a fresh install of Arduino on a win7 64 pro OS. I xxx'd out my folder in users/xxxxx
I downloaded from git hub a zip file arduino-esp8266-master-zip and unzipped it into User/xxxxx/Arduino/hardware
Now when I try the examples in this case hello world there are issues...__dso_handle is missing
Arduino: 1.6.2 (Windows 7), Board: "Generic ESP8266 board"

Build options changed, rebuilding all


HelloServer.cpp.o:(.text.startup+0x8): undefined reference to `__dso_handle'

c:/users/xxxx/documents/arduino/hardware/arduino-esp8266-master/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: C:\Users\Doug\AppData\Local\Temp\build5892183759428858024.tmp/HelloServer.cpp.elf: hidden symbol `__dso_handle' isn't defined

c:/users/xxxx/documents/arduino/hardware/arduino-esp8266-master/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: final link failed: Bad value

collect2.exe: error: ld returned 1 exit status

Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
User avatar
By igrr
#13039 Apparently this version of the IDE from @rogerclarkmelbourne was packaged with an older toolchain which had this __dso_handle issue.

As a workaround, you can declare
Code: Select allvoid* __dso_handle;

somewhere in your sketch.

But this should be fixed in the latest toolchain bundled with the version at http://github.com/esp8266/Arduino.
User avatar
By picstart
#13056
Code: Select allvoid* __dso_handle;

This workaround fixed it.
I am uncertain as to what is the appropriate code to upload
http://github.com/esp8266/Arduino .....This code has a very very different directory structure
The code I thought was current created this structure
user/xxxx/mydocuments/arduino/hardware/arduino-esp8288-master/
esp8266
tools
readme.md

I really don't need more than one working way to use and upgrade this useful IDE will the various options merge?
User avatar
By Ovaltineo
#13315 Has anyone got WifiClient and WifWebServer examples working? I can compile and upload them but the ESP crashes/locks up during startup.