You can chat about native SDK questions and issues here.

User avatar
By Almurphy556
#57365 Hello,

I come across a fantastic blog post and I'd love to be able to reproduce the work demonstrated. It's written well and the instructions are easy to follow which is good since I'm new to all this.

Essentially the guy has a ESP01 connected to a OLED. Subscribed to a MQTT and publishes it to the screen.

Blog: https://nathan.chantrell.net/20141230/w ... e-esp8266/

The section below is copied from the blog. It refers to a binary esptool which is different to the one provided in the esp-open-sdk.

"Install the other esptool – There are two different tools called esptool and with the current Makefile you need both. esptool.py is a python tool that is used to flash the .bin files to the ESP8266 and is installed with the esp-open-sdk process above.
With the current Makefile you will also need the binary esptool from here, this one creates the firmware .bin files"

Is this standard, why would it require an additional tool to compile the firmware, isn't this something the SDK can do its self?

I've downloaded the "binary esptool" as described above but have no idea how to use it. How would I install it as refered to above, I'm guessing some command in terminal?

The makefile requires editing to point to the above tools location. Would that be the download location or a location to which it's been installed?

I hope that makes sense and if anyone has a spare few minutes to point me in the right direction, I'd really appreciate it.

Ps I'm running ubuntu and I've edited the multiple .h and .c files with my own credentials. The SDK is installed following the instructions on the above blog but when I run "Make" I get an error regarding the location of the esptool.

Regards,

Andrew
User avatar
By cmarrin
#57797 They are different and, sadly, neither is a superset of the other. I use esptool.py because it does many useful tasks. It lets you read the chip id, mac address, erase the flash, in addition to generating .bin files and uploading. The binary esp tool only generates bin files and uploads.

I use esptool to generate the bin file and esptool.py for everything else. I don't understand what esptool.py does when it's constructing a bin file, but I've never been able to get the output to upload correctly. The binary esptool very clearly lets you open an elf file, select which sections will go into the output and then open another and repeat. Then it closes the file. You get a single file output and it will even give you verbose output to show you exactly what sections will be placed where by the boot loader.

Maybe there's a way to bet esptool.py to produce and equivalent bin file and I'd love for someone to explain it. But for now, I just use both
User avatar
By lethe
#57808
cmarrin wrote:Maybe there's a way to bet esptool.py to produce and equivalent bin file and I'd love for someone to explain it. But for now, I just use both

You may want to checkout esphttpd's makefiles, they work entirely with esptool.py, no need for the binary esptool.
User avatar
By cmarrin
#57831 Thanks. I've seen those and they do pretty much what all the others do, which is they write two binaries, one at 0x00000 and the other at 0x40000. Sometimes the second file is written to 0x10000. I don't see how those addresses relate to the address in my .ld file. And I don't see why it's writing 2 files. I assume the first is a boot loader. But where is it coming from?

esptool lets me specify a loader and has verbose output, so I can see every segment being written and I can correlate each segment to the .ld file. It writes a single file which is flashed at 0x00000. I've tried for quite a while to get esptool.py to work with my .ld file and was never successful. So I gave up and just use the binary esptool to build the .bin and esptool.py for everything else.

I wish the documentation for esptool.py was clearer (that goes for pretty much all documentation related to the ESP8266 :-)