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

User avatar
By andrew melvin
#10510 I got it to work. major relief!

two things.

1) The latest git works, and not the one from git hub but this one http://git.spritesserver.nl/esphttpd.git/

This works without having to uncomment anything or rename the c_types.h file. I installed the sep-open-sdk from github.

2)

You need to install esptool from the expressif website. I had to change the makefile os to LINUX, then it compiled. Then I had to point the esphttp makefile to this directory, where esptool was located. The zip comes with the windows binary but not linux.

3) to get the other examples to compile, say blinky... I had to symlink the esptool to /usr/bin/esptool. then it worked.

Now i just need to get nodemcu to work!
User avatar
By Marshall
#11498 Hi Andrew,

I too had a helluva time getting the dev environment working. I ended up with a 14_04 Ubuntu install in a VirtualBox on my Mac (sound familiar?). Getting the SDK working natively on my Mac was just a frustrating dead end. It's still early days with this stuff!

I do not believe that I'm having trouble using different git repos, but I am having the problem with esptool. It looks like the args passed to esptool when I 'make all' are incompatible with my version of esptool. This is the output that I'm getting:

Code: Select allmdt@mdtvbox /mnt/newdisk/git/esphttpd>  make all
Generating Firmware using '/usr/local/bin/esptool -eo build/httpd.out -bo firmware/0x00000.bin -bs .text -bs .data -bs .rodata -bc -ec'.
FW firmware/0x00000.bin
usage: esptool [-h] [--port PORT] [--baud BAUD]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac}
               ...
esptool: error: argument operation: invalid choice: 'build/httpd.out' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac')
make: *** [firmware/0x00000.bin] Error 2


You say you downloaded esptool from Espressif and all worked well. Could you provide that URL? I could not find an esptool download on their BBS website anywhere.

Thanks and Happy Hacking!
User avatar
By andrew melvin
#11516 Hi,

There is some very confusing stuff out there. Esptool seems to exist in two types... one is just esptool, and is used to convert some end product of compilation into a flushable binary, the other is used to flash binaries to the esp itself, and is a python script.. however.. this version also has an elftoimage.. or some option like that. which one you require depends on the makefile...

Follow the instructions here for the esptool from expressif...

https://nurdspace.nl/ESP8266/First_setup

the direct link is here

http://filez.zoobab.com/esp8266/esptool-0.0.2.zip

now when you download it, you have to go and make... but i had to change the top line (i think) of the makefile from = windows, to linux... as I'm on ubuntu....

The other thing that totally fixed all attempts to compile was to NOT PUT THE SOURCECODE IN THE SAME DIRECTORY AS THE ROOT SDK.. or other tools.... when i did this.. all my problems compiling Node... compiling esphttpd.... compiling examples... went away...
User avatar
By Marshall
#11682 That did the trick.

Code: Select allmdt@mdtvbox /mnt/newdisk/git/esphttpd>  make
Generating Firmware using '/usr/local/bin/esptool -eo build/httpd.out -bo firmware/0x00000.bin -bs .text -bs .data -bs .rodata -bc -ec'.
FW firmware/0x00000.bin
Generating Firmware1.
FW firmware/0x40000.bin


So now I have the esptool binary in /usr/local/bin and esptool.py will, like you say, be used just to flash the esp8266. Thanks again!