Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By mamalala
#669 Hello everyone,

here's a short HOWTO for compiling the SDK stuff. I am assuming that found a suitable license file for the compiler toolsuite somewhere, or know your way around things otherwise. I also assume that you got hold of the latest leaked SDK, esp_iot_sdk_v0.9.1

First, you need to either install a VM with Windows, or use your Windows Machine. I tested this with Win 7, no idea if later versions also work. Once you got Win up and running, go to https://onedrive.live.com/?cid=C4DDF72E6EEA3826&id=C4DDF72E6EEA3826!631 and download the ESP-IOT-SDK-NOVM file. Unpack the ZIP archive, that will give you another archive and a readme. Unpack the new RAR archive, and then start the resulting EXE, this is a self-extracting archive. Let it extract directly to C:\

Now you should have a C:\usr directory. In there is the "install" directory. Go there and first merge the registry.dat from there into your Win registry. Then start the "python-2.7.4" to install Python. Copy the shortcuts there on your Desktop (or wherever you want). Get the license file stuff sorted out. You should find a license file on the chinese VM and maybe use it on the NOVM stuff as well, but i have not tried that. The license is in (or should go into) C:\usr\xtensa\XtDevTools\install\tools\RC-2010.1-win32\StensaTools\Tools\lic

Next, unpack the esp_iot_sdk. I have it extracted to c:\iot_sdk_v0.9.1 In there you should have a "examples" directory, which contains the two directories "at" and "IoT_Demo". Move them up one directory, so that you have them as C:\iot_sdk_v0.9.1\at and C:\iot_sdk_v0.9.1\IoT_Demo respectively. Now copy the file C:\iot_sdk_v0.9.1\app\gen_misc.bat into the directories C:\iot_sdk_v0.9.1\at and C:\iot_sdk_v0.9.1\IoT_Demo.

So far so good, it's now time to compile things. I only use the command line, i don't like the IDE. Double-clik on the "extensa" shortcut that you copied from C:\usr\install. This should open up a command line window. In that window, change directoy to, for example, C:\iot_sdk_v0.9.1\at and issue "make". This should now start to build the AT firmware. If you see some window popping up complaining about a license, then you have to figure that out. If it doesn't show up, the compiling should go through just fine. Once it is done run "gen_misc.bat" in the same directory. This will now create the two .bin files required to flash into the module. These bin files will end up in C:\iot_sdk_v0.9.1\bin

The two important files here are eagle.app.v6.flash.bin, which needs to be flashed starting at location 0x00000, and then there is eagle.app.v6.irom0text.bin, which needs to be flashed at location 0x40000.

Alright, that's all so far. As said, i don't use the IDE, so i have no idea about that. The compiler toolsuite can be made to work without a license file, but as i mentioned in another thread, i'm not sure if a can openly post here how to do it. It is _very_ simple, however ;)

Greetings,

Chris
User avatar
By mamalala
#670 BTW, the whole Makefile stuff for the SDK is an ugly mess. I'm in the process of redoing it in a much simpler way, which, however, will require the manual addition of any new source files that are to be used. Not the nicest solution, but should be simple enough so that even beginners can figure out what to do to extend it.

Greetings,

Chris
User avatar
By minigun
#1150 Hi Chris,

I have gone through your walkthrough to get a fully functional toolchain for the ESP8266.
But I am stuck with the registration issue and as you said;

The compiler toolsuite can be made to work without a license file, but as i mentioned in another thread, i'm not sure if a can openly post here how to do it. It is _very_ simple, however ;)


May you please supply the recipe to me in PM.

Thanks in advance,

Selim