-->
Page 1 of 9

New Makefile for the SDK, new tool to create firmware files

PostPosted: Wed Sep 17, 2014 8:52 pm
by mamalala
Hello everyone,

i have created a mich simpler Makefile to compile the example from the SDK. This one is prepared for the AT firmware. Shouldn't be too hard to figure out what to modify to use it for the IoT firmware as well. Small README included.

NOTE: Updated Makefiles are at http://www.esp8266.com/viewtopic.php?f=9&t=142&start=20#p772

And here is a tool that will create the proper firmware files from the compiled object file. The original SDK uses that gen_misc.bat thing, which is just silly. That thing calls objcopy and objdump repeatedly, the starts a python script which in turn starts an exe file to create the files. My tool will do all that in one quick go. The above Makefile makes use of this tool already. A precompiles .EXE for Windows is included, as well as a README and the full sources (it's licensed under the GPL v2).

NOTE: There was a bug in the esptool i posted. It is fixed, and can now be found at http://www.esp8266.com/viewtopic.php?f=9&t=142&start=20#p772

Have fun,

Chris

Re: New Makefile for the SDK, new tool to create firmware fi

PostPosted: Wed Sep 17, 2014 8:58 pm
by mamalala
What i forgot to mention:

The Makefile is very simple. I have not added any dependency stuff yet. This means that after each change to a source/include file, you have to do a "make clean" first, and then do a "make". Dunno when i come around to add that.

Feel free to add it yourself if you need it, and please upload the modified Makefile here then.

Greetings,

Chris

Re: New Makefile for the SDK, new tool to create firmware fi

PostPosted: Thu Sep 18, 2014 7:02 am
by tinhead
.. and it dos work very well !

Updated esptool

PostPosted: Thu Sep 18, 2014 12:27 pm
by mamalala
Hi all,

seems i made a whoopsie in the tool. For some reason i did the padding for the firmware file with a 32-byte padsize, whereas it should be 16 bytes. That obviously resulted in a wrong checksum field under sertain conditions. Using the tool on the AT firmware was OK, since the actual padding there would coincide with a 32 byte one, whereas the IoT demo was not so lucky. Ah well, crap can happen after a 20+ hour coding marathon ;)

Attached is a ZIP with the corrected version. Hopefully this will solve the problem for the IoT demo.

NOTE: New version is at http://www.esp8266.com/viewtopic.php?f=9&t=142&start=20#p772
Greetings,

Chris