5100 ethernet and Due

I am trying to compile my working-on-a-Mega project for a new Due using IDE 1.5.6r2 - and have got stuck on a problem with W5100.h :

w5100.h:339: error: 'DDRB' was not declared in this scope

(and similarly for _BV, and PORTB)

This seems a very fundamental problem, which I am sure has a simple answer. People report managing to make 5100-based ethernet shields work with the Due, but I can't find details of what adaptations are needed. I have found mention of Ethernet52Due.h - but that sounds as if it has been written for the newer w5200 chip.

Ideas, please.

All those definitions (DDRB, PORTB etc) are AVR-specific, they will not work on a Due. More than that I can't say because I've not used those libs.

BTW, why two posts?


Two posts - down to simple incompetence, I'm afraid: sorry. (Can one delete one's own post if one spots a duplicate like this?)


I think so, do you see a "remove" button?


Couldn't find a Remove button.

But back to the plot - here's a note on how I resolved the issue for anyone facing similar issues in future.

My problems with the w5100 on the Due disappeared when I reinstalled the IDE (I used the nightly build as of 14 April 14 but I am pretty sure that the current beta of 1.5.6r2 would have been OK too) and moved my sketch into that hierarchy. Previously I had been using a custom location for sketches and libraries (in an attempt to be able to edit sketches under both IDE 1.0.4 and also under ERW 1.0.5 when the extra functions were of value) and clearly the compilation was pikcing up the wrong versions of libraries.

One oddity - I couldn't get output via FTDI to work on the Due's Serial1 with the w5100 connected (which had been OK on a Mega) but all was fine using Serial2.