-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Ethernet library not compiling #574
Comments
the problem comes from the W5100.h #if defined(ARDUINO_ARCH_AVR)
#define SPI_ETHERNET_SETTINGS SPISettings(4000000, MSBFIRST, SPI_MODE0)
#else
#define SPI_ETHERNET_SETTINGS SPI_CS,SPISettings(4000000, MSBFIRST, SPI_MODE0)
#endif to #if defined(ARDUINO_ARCH_AVR)
#define SPI_ETHERNET_SETTINGS SPISettings(4000000, MSBFIRST, SPI_MODE0)
#elif defined(ESP8266)
#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0)
#else
#define SPI_ETHERNET_SETTINGS SPI_CS,SPISettings(4000000, MSBFIRST, SPI_MODE0)
#endif |
thank for help, I have made your modification inside my w5100.h file. Some other issue appear, i have tried to fix them : #if defined(ARDUINO_ARCH_AVR)
SPI.begin();
initSS();
#elif defined(ESP8266)
SPI.begin();
#else
SPI.begin(SPI_CS);
// Set clock to 4Mhz (W5100 should support up to about 14Mhz)
SPI.setClockDivider(SPI_CS, 21);
SPI.setDataMode(SPI_CS, SPI_MODE0);
#endif i have modified 5 codes bloc using the same logic. I hope it's working, but the SPI SS management is completely disabled ... But this is not the main "new" problem, i have a new compilation error out of my knowledge :
any idea ? another ways to get ethernet on the ESP8266 is to use the ENC28J60 and this library : https://github.com/ntruchsess/arduino_uip. Maybe this lib is easier to port on ESP8266 ? EDIT : i'have tried to hack a little bit the ENC28J60 lib, inside Enc28J60Network.h : #if defined(ARDUINO_ARCH_AVR)
// AVR-specific code
#define SPI_MOSI MOSI
#define SPI_MISO MISO
#define SPI_SCK SCK
#define SPI_SS SS
#define ENC28J60_USE_SPILIB 0
#elif defined(ARDUINO_ARCH_SAM)
#define ENC28J60_USE_SPILIB 1
#elif defined(ESP8266)
#define ENC28J60_USE_SPILIB 1
#endif i have a similar error :
|
the __cxa_guard_release problem is handled here #500 |
OK, is there a way to workaround this issue or i have just to wait ? |
yes, replace all places where static is initialized by an function / or class in a function. int EthernetClass::begin(uint8_t *mac_address)
{
static DhcpClass s_dhcp; in this specific case this will work: static DhcpClass s_dhcp;
int EthernetClass::begin(uint8_t *mac_address)
{ but how to rework it can be different from static case to static case. |
compiling but no function test. |
I use Netbeans with an arduino plugin and I got the same issue, when I build the project. Here is my makefile: http://pastebin.com/Md0R2t4R. I got many errors: http://pastebin.com/qHppisX6 I use windows 7 64bit, GnuWin and Arduino 1.6.4. Do I have really change the w5100.h file? Is there no bug fix for this? Regards Chris |
look like it using the AVR SPI lib sound wrong.
|
Do I have to change smth? |
look like your Netbeans plugin uses the wrong one, |
And which one is the correct one? |
for ESP8266 the one in the in the esp8266 dir? |
Thx I will check when I'm home. |
As I understand it right, I have to install this plugin first? Because my folder Arduino/libraries has no Folder SPI. |
I trying to use the Ethernet lib (w5100) with the esp8266.
I know that the esp8266 has built in wifi controler, but wired connection are more stable and can provide power using POE. From my point of view the esp8266 is more than wifi.
When i tried to compile :
arduino-1.6.5/libraries/Ethernet/src/Ethernet.cpp: In member function 'int EthernetClass::begin(uint8_t*)':
arduino-1.6.5/libraries/Ethernet/src/Ethernet.cpp:19:45: error: no matching function for call to 'SPIClass::beginTransaction(int, SPISettings)'
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
This error occur many times.
I have look inside the function signature from the esp8266 SPI.h file :
void beginTransaction(SPISettings settings);
and from the AVR SPI.h file :
inline static void beginTransaction(SPISettings settings) {
The two signature are very close. But each one has is own SPISettings class.
According to the projet homepage, SPI is working. I suppose that the SPISettings class from esp8266 is working. And then i have no other idea how debug this issue.
I'm not a C++ or MCU killer, just an enthusiast user and i have limited knowledge
Thank in advance for help
The text was updated successfully, but these errors were encountered: