Skip to main content
Arduino

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Arduino WIFI compiler error

Just bought an ESP8266 module to try it using my arduino uno R3. I have connected my WIFI module correctly, anyways evenb if i disconnect it, the error occur.

While trying to upload the WIFI (connect with wpa) sketch i get several errors.

First i tried uploading the hole sketch, i got those errors:

/usr/share/arduino/libraries/WiFi/WiFi.cpp: In member function ‘uint8_t* WiFiClass::macAddress(uint8_t*)’:
/usr/share/arduino/libraries/WiFi/WiFi.cpp:112:1: error: unable to find a register to spill in class ‘POINTER_REGS’
/usr/share/arduino/libraries/WiFi/WiFi.cpp:112:1: error: this is the insn:
(insn 35 25 26 2 (set (reg:QI 23 r23)
 (mem/c:QI (plus:HI (reg/f:HI 28 r28)
 (const_int 2 [0x2])) [3 S1 A8])) /usr/share/arduino/libraries/WiFi/WiFi.cpp:110 28 {movqi_insn}
 (nil))
/usr/share/arduino/libraries/WiFi/WiFi.cpp:112: confused by earlier errors, bailing out

After that i tried to only import just the libraries and try to compile it. Even with this method i get errors

Code

#include <WiFiServer.h>
#include <WiFiClient.h>
#include <WiFi.h>

error:

In file included from /usr/share/arduino/libraries/WiFi/WiFiServer.h:8:0,
 from sketch_oct20b.ino:1:
/usr/share/arduino/hardware/arduino/cores/arduino/Server.h:4:29: error: expected class-name before ‘{’ token
In file included from sketch_oct20b.ino:1:0:
/usr/share/arduino/libraries/WiFi/WiFiServer.h:14:3: error: ‘uint16_t’ does not name a type
/usr/share/arduino/libraries/WiFi/WiFiServer.h:17:22: error: field ‘uint16_t’ has incomplete type
/usr/share/arduino/libraries/WiFi/WiFiServer.h:18:24: error: ‘uint8_t’ has not been declared
/usr/share/arduino/libraries/WiFi/WiFiServer.h:20:11: error: ‘size_t’ does not name a type
/usr/share/arduino/libraries/WiFi/WiFiServer.h:21:11: error: ‘size_t’ does not name a type
/usr/share/arduino/libraries/WiFi/WiFiServer.h:22:3: error: ‘uint8_t’ does not name a type
/usr/share/arduino/libraries/WiFi/WiFiServer.h:24:9: error: ‘Print’ has not been declared
/usr/share/arduino/libraries/WiFi/WiFiServer.h:18:42: error: ‘NULL’ was not declared in this scope

I can just figure out some syntax errors, but my c is not good enough to understand much of it.

Can anyone tell me what am i doing wrong and show me how it will be done?

Answer*

Draft saved
Draft discarded
Cancel
2
  • Nice one, thank you sir. That means i need an additional FTDI breakout board and a logic level shifter, right? Commented Oct 20, 2015 at 23:09
  • Logic shifter yes, the UNO is a 5 volt device and the ESP8266 is a 3.3 volt device. FTDI probably not, you can communicate to the ESP8266 via the UART pins (0 and 1), and even if you need to update the firmware ofr the ESP, you can do that by pulling the microcontroller out of the socket and just use the board as a USB to Serial adapter. Commented Oct 20, 2015 at 23:13

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /