WiFi101 program size increase


I recently purchased an UNO and a WiFi101 from the US store with the intent of expanding an existing net of wired and wireless UNOs.

I upgraded from .cc IDE 1.5.8 to 1.6.6 to get the WiFi101 libraries. Testing with the WiFi101 examples showed the WiFI101 WebServer example failed. I was not happy since UNOs acting as webservers that serve data on demand are central to my application. After some reading I noticed some folks were reporting issues with the 1.6.6 IDE. I downgraded to the 1.6.5 IDE, recompiled the same WebServer example and the UNO and WiFi101 pair ran the WiFi101 WebServer example and I was happy.

Today I went to install my data webserver code on the UNO/WiFi101 pair - just replaced the include WiFi.h with include WiFi101.h - compiled and was surprised to find what had been a 23.6K program now was a 36.1K program (which of course won't fly with an UNO).

I put together a minimal UNO HelloWorld webserver to get some idea what the WiFi101 was costing in terms of extra flash utilization and I am kind of shocked. The minimal server with no useful payload other than serving the phrase HelloWorld and the uptime in milliseconds consumes 23K of flash when compiled with new WiFi101.h, when compiled with the older wifi card's WiFi.h library the same program consumes just 9.1K of flash. The Arduino WiFi101 WebServer example code itself consumes 25K of the UNO's 32K of flash when compiled on my Mac OSX 10.9.4 system.

I don't think that moving to a Zero with its 256K of flash is an option since the changing cpu architecture means library rewrites with may never happen. There was a comment earlier that the WiFi101 does support the Mega2650 but I don't know if the Mega shares library code with the UNO. I'm dependent on a number of existing and proven UNO libraries.

Other than trimming the existing program (which I'll be working on when I'm done writing this) I'm open to any comments or suggestions that you might have.

Thanks for taking the time to read this, Jmario