ESP8266 flash programming without IDE?

I have designed a WiFi board using the ESP-07S to be used as an interface between a data collection system we build and the user software. The data collection system only uses RS232 and this new board will make it possible to communicate over WiFi.
It all works pretty well, but now we have a problem moving it out of engineering to production.

How can we have production flash our code onto the ESP-07S without using the full Arduino (or Sloeber) IDE?
Expressif has put out a flash download tool that is in theory capable of doing this, but for the life of me I cannot understand how to use it…
Our production uses Windows computers.

What we have available is a binary flash file that contains our code. When programming an off-the-shelf ESP-07S the binary content shall be loaded onto the ESP using the serial interface after the entire on-board flash chip has been erased.
This is a one-time operation because the flash code contains an over-the-air flash updating utility that is used for further updates.

Is there any description on how to use the Expressif flash download tool when stuffing a flash file created by the Arduino IDE onto a new ESP module? What comes with the download is a hard to understand Readme.pdf file.
It uses very terse language. And it shows only the ESP32 tool!!!
Our design uses 4M (1M SPIFFS) flash setting in the IDE and is set to erase all flash when programming.
The flash tool seems to require us to select multiple flash files and enter a load address for each, which we have no clue as to how one sets correctly. We have a single bin file created by the IDE and we need to erase the flash before loading. That is in principle all…
In the development IDE the settings are:

  • Default protocol
  • 80 MHz CPU freq
  • 26 MHz crystal
  • Erase all flash
  • 40 MHz flash freq
  • DIO flash mode
  • 4M(1MSPIFFS) flash size
  • IwIP Variant: v2 Higher Bandwidth
  • Reset method: ck
  • 115400 upload speed
    So this is what I want to set the tool to use.

But how is it done?
SPI speed? (What is this? Maybe the Flash freq?)
Flash Size? (The IDE setting is not a selectable item in the tool)
Address of bin file? (I have no clue at all to this item)
Erase before programming? (Do I have to manually click the ERASE button?)

ESP-Download-Tool.png

the FDT will detect the settings.
the IDE produces a concatenated binary. FDT expects separate boot.bin, user.bin and settings.bin. but it should work with one bin to address 0x0

better is to use esptool GitHub - espressif/esptool: Espressif SoC serial bootloader utility

In the Arduino IDE, if you enable File > Preferences > Verbose output during: upload, do an upload, and then check the contents of the black console window at the bottom of the Arduino IDE window, you can see the exact esptool command the Arduino IDE used to upload the compiled .bin file to your ESP8266.

pert:
In the Arduino IDE, if you enable File > Preferences > Verbose output during: upload, do an upload, and then check the contents of the black console window at the bottom of the Arduino IDE window, you can see the exact esptool command the Arduino IDE used to upload the compiled .bin file to your ESP8266.

Per, BosseB uses Sloeber. there is the Release folder in the project tree

Great topic and excellent answers. As a Java Developer it was helpful for me. Thank you.

I have figured it all out now:
I use the Expressif Flash Download Tool:

  • f/w address = 0x0
  • Crystal = 26M
  • SPI Speed = 40 MHz
  • SPI MODE = DIO
  • FLASH SIZE = 32 Mbit
  • BAUD = 115400

Hooked it up to the serial input on my board and reset with flash jumper in place.
Then used ERASE to erase old flash (I hope)
Then a new reset
Finally START with the correct firmware file, took 31 seconds to transfer.
All worked so in the end I have the board operating OK.

The Expressif flash download tool works OK even though it opens a command window in addition to the GUI screen.
One could complain about the packaging though, the zipfile expands into two levels of very long named folders until it finally drops off the files.
I made a new zipfile from the last part of the tree and put that on our server for production.

BosseB:
I have figured it all out now:
I use the Expressif Flash Download Tool:

  • f/w address = 0x0
  • Crystal = 26M
  • SPI Speed = 40 MHz
  • SPI MODE = DIO
  • FLASH SIZE = 32 Mbit
  • BAUD = 115400

Hooked it up to the serial input on my board and reset with flash jumper in place.
Then used ERASE to erase old flash (I hope)
Then a new reset
Finally START with the correct firmware file, took 31 seconds to transfer.
All worked so in the end I have the board operating OK.

The Expressif flash download tool works OK even though it opens a command window in addition to the GUI screen.
One could complain about the packaging though, the zipfile expands into two levels of very long named folders until it finally drops off the files.
I made a new zipfile from the last part of the tree and put that on our server for production.

The upload speed to esp8266 can be 921600 baud.

I still would recommend esptool for this. It is a command line tool and detects the settings. It uses compression for transfer so it is faster.

Juraj:
I still would recommend esptool for this. It is a command line tool and detects the settings. It uses compression for transfer so it is faster.

I really tried to get it running but there were all kinds of errors popping up. Tried both with pip install and downloading the project and running setup.py.
Seems like a lot of dependencies are missing.
The Expressif version works out of the box even though it is a bit “strange”. Contains a Windows executable.
Since this is a one-timer for new boards I cannot spend much more time on it. Our firmware contains the Webupdater function to update firmware over the network. And also a webpage based configuration function on port 8080 and a more expanded proprietary function needing a special WiFiConfig program on port 7777. So once the AI-Thinker firmware has been erased and replaced by our own we don’t need the serial tools anymore.