Azure-Samples / iot-hub-c-thingdev-getstartedkit

Get started with The Sparkfun Thingdev Azure IoT Starter Kit
MIT License
12 stars 15 forks source link

Program is too big #28

Open kentmaxwell opened 6 years ago

kentmaxwell commented 6 years ago

I just tried to execute the tutorial associated with this code sample with a SparkFun Thing Dev Board. It seems that the program (probably due to the size of the includes) is too big. I get this compiler error:

Arduino: 1.8.5 (Windows 10), Board: "SparkFun ESP8266 Thing Dev, 80 MHz, 115200"

Build options changed, rebuilding all Archiving built core (caching) in: C:\Users\Kent\AppData\Local\Temp\arduino_cache_4669\core\core_esp8266_esp8266_thingdev_CpuFrequency_80,UploadSpeed_115200_afc3709bcd8dea312d624aee53d4ba56.a Sketch uses 438405 bytes (100%) of program storage space. Maximum is 434160 bytes.

Global variables use 52040 bytes (63%) of dynamic memory, leaving 29880 bytes for local variables. Maximum is 81920 bytes. Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. Error compiling for board SparkFun ESP8266 Thing Dev.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Is there an approach to how I can remedy this situation?

Thanks

kentmaxwell commented 6 years ago

For reference another issue I had using Arduino Version 1.8.5, I could not find the library "Adafruit DHT Unified" in the manage libraries. It was necessary for me to pull this library from GitHub and manually install it.

kentmaxwell commented 6 years ago

I discovered the problem is the latest version of the AzureIoT libraries. I got the program to compile with these versions of the libraries:

DHT Sensor Library - Version 1.3.0 Adafruit DHT Unified - Version 1.0.0 AzureIoTHub - Version 1.0.39 AzureIoTUtility - Version 1.0.39 AzureIoTProtocol_MQTT - Version 1.0.39

The tutorial documentation should specify these versions to work.

luketongs commented 6 years ago

I too am looking for a solution to this problem.

JetstreamRoySprowl commented 6 years ago

Espressif has recently released a new version of their toolset which allows the samples to fit into Thingdev. If you update to the 1.0.44 version of the AzureIoT libraries (which also requires the latest Arduino ESP8266 library) there will be more room available.

luketongs commented 6 years ago

I ended up just commenting out the log statements, but this sounds much better. Thanks.