Skip to content

W5100fix: Workaround for compiler bug + small size optimization #12

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

Closed
wants to merge 2 commits into from

Conversation

villuv
Copy link

@villuv villuv commented Nov 29, 2010

Hi,

I had a little problems with Ethernet libs example programs. I managed to find out that those were actually caused by avr-gcc 4.5.1 compiler bug. I slightly "rephrased" the code in w5100.h to work around that problem. As a side effect, the 16-bit register reading function gets compiled to 10 bytes smaller code.

Forum thread with my analysis (incl. disassembly): http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1290209328

With this patch Ethernet's TCP and UDP examples are working nicely with Arduino UNO, Ehtershield SD and avr-gcc 4.5.1. IDE version 0021 running on 64bit Linux.

Yes, the workaround as such is quite pointless, but maybe you're interested in slight code size optimization.

@cmaglie
Copy link
Member

cmaglie commented Mar 21, 2013

Thanks for the patch, I see that a fix for this is already merged upstream.

@cmaglie cmaglie closed this Mar 21, 2013
tbowmo pushed a commit to tbowmo/Arduino that referenced this pull request Jul 14, 2016
Refactoring to support MySensors.org Version-Bot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants