So some issues and tips regarding the Sming framework for programming the ESP8266:
The Arduino Json library on Sming master branch
Version 4.0 of the Arduino Json Library is present, at least at today’s date (12/2015) on the Master branch of the Sming framework.
The develop branch of the framework uses the version 5.0 of the Arduino Json library.
To do any useful work with JSON on the Sming framework we should use the develop branch and not the master branch.
It might be related, or not, didn’t investigated too much, but I had huge memory leaks that exhausted my heap very rapidly when using the master branch when processing JSON data. When using the development branch, with the same code base (just a HTTP client and Json decoding) those issues where gone.
Other issues with version 4.0 of the Arduino Json Library included the processing of double/float values that had no floating point, which is a great problem on this version. For example (double)15 evaluates as zero, while (double)15.0 evaluates correctly. So it is really important to upgrade and use the version 5 of the JSON library.
So instead of just cloning the master branch, clone the development branch: git clone -b develop https://github.com/SmingHub/Sming.git
On the master branch I had no trouble creating and flashing the resulting images to the ESP8266, but on the development brach I had serious problems. The issue is solved now, and it is related to the esptool.py tool that is unable to generate the image files to be flashed. The latest version of the esptool.py available on the Github repository complains regarding the errno definition, also something that is related, to the Json Library.
Anyway, the latest commits on the development branch uses the esptool2, just clone the repository onto somewhere (in my case /opt):
[pcortex@pcortex: opt]$ git clone https://github.com/raburton/esp8266 [pcortex@pcortex: opt]$ cd esp8266/esptool2 [pcortex@pcortex: esptool2]$ make
And make sure that the esptool2 binary is on the path, or change the Makefile-project.mk located, in my case, in /opt/Sming/Sming:
# esptool2 path ESPTOOL2 ?= esptool2
# esptool2 path ESPTOOL2 ?= /opt/esp8266/esptool2/esptool2
After this, the usual cycle of make and make flash should work. If we already have a project we should first run make clean just that the esptool2 can create the new image files.
Note that the esptool.py tool is still used for the flashing process.
So the final conclusion is, despite its bleeding edge status, to use the development brach, and not the master branch as of today. The issues that are solved on the development branch are important to the make the framework useful.