Created Sat, 21 Feb 2015 18:56:45 +0000 by mboroff
Sat, 21 Feb 2015 18:56:45 +0000
I have been developing a sketch that uses an Arduino W5100 shield, an I2C LCD and the sd on board the W5100. Got it all running when compiled as an Uno32 board. This morning I realized I was actually using a Uc32. When I changed the board type to Uc32 I got the following errors:
In file included from C:\Program Files (x86)\mpide-0023-windows-20140821.\hardware\pic32\libraries\Ethernet\Client.cpp:1:0: C:\Program Files (x86)\mpide-0023-windows-20140821.\hardware\pic32\libraries\Ethernet\utility/w5100.h: In static member function 'static void W5100Class::initSS()': C:\Program Files (x86)\mpide-0023-windows-20140821.\hardware\pic32\libraries\Ethernet\utility/w5100.h:336:36: error: 'DDRB' was not declared in this scope
It appears to becoming from statements 311 - 319 in C:\Program Files (x86)\mpide-windows-20140821\libraries\Ethernet\utility\w5100.h.
#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560) inline static void initSS() { DDRB |= _BV(4); }; inline static void setSS() { PORTB &= ~_BV(4); }; inline static void resetSS() { PORTB |= _BV(4); }; #else inline static void initSS() { DDRB |= _BV(2); }; inline static void setSS() { PORTB &= ~_BV(2); }; inline static void resetSS() { PORTB |= _BV(2); }; #endif
I've been working with this board about a week but have been working , over a year, with variations of Arduino boards (ATtiny85, ATtiny84,Uno R3, Mega2560, Nano and Atmega328P (make your own Arduino).
Maybe I'm spoiled by all the good works folks did to get to IDE 1.5.6-r2 but have not had a problem like this in the other environment.
Any suggestions would be helpful.
Sun, 22 Feb 2015 14:38:49 +0000
It looks like someone ported the library to Uno32 and the Max32, but not other boards.
I suspect that if you locate the following in w5100.h :
#elif defined(_BOARD_UNO_) //chipKIT definitions for SS pin
and change it to read
#elif defined(_BOARD_UNO_) || defined(_BOARD_UC32_) //chipKIT definitions for SS pin
You'll probably be fine. It appears to be a minor issue in the library code.
Sun, 22 Feb 2015 21:58:17 +0000
That fixed it. Thank you.