If you natively develop firmware on the ESP8266, you’d eventually have to flash multiple bin files to different locations on the Flash Module of ESP8266 (or on SoC itself for ESP8285).
In order to create a single bin file, populate the individual bin files at their respective addresses in the official Espressif Flash tool as shown below:
Once done, select the checkboxes of the individual files that you’d like to include and hit the Combine Bin button shown above:
That should give you a single bin file as shown below:
Now, you can simply use the Flash Tool itself or esptool.py/exe to flash this single bin file at address 0x00000.
I found a simple batch file online that uses esptool.exe (for Mac/Linux, you can use esptool.py with the proper arguments) to flash bins to the ESP.
The following code goes into the batch file that calls the esptool.exe and flashes the bin file (mare sure esptool.exe and the bin file are in the same folder).
@echo off set /p comport= Comport (example 3, 4, ..) : echo Using com port: %comport% esptool.exe -vv -cd nodemcu -cb 115200 -cp COM%comport% -ca 0x00000 -cf at.bin pause
The above script will simply ask the user for the COM port of the USB-Serial Cable/Adapter to which an ESP (in boot-mode) is connected and flash it.
The above method can be also be used if you’re provisioning users themselves to flash/update firmware over to the ESP if FOTA is not implemented (at least that’s how I plan to use it for my ESP dev board).