Your Pages‎ > ‎

Other Contributions

Here you can put anything else that doesn't fit into any of the other categories...


How to make batch file(s) for backing up any existing esp firmware contents to bin image before over-flashing.

This originated from CiccioCB, and no doubt should work, but I received errors the only time I've tried it... so I will try again another day with another copy of esp_tool.exe.
Create the batch file(s) in the parent Annex Wifi Basic folder where the "esp_tool.exe" file is located.
The batch files run "esp_tool.exe" to download the appropriate flash size contents via usb com port and save to the specified computer filename.
The amount of flash memory to be backed up will depend on whether it is a 1M or 4M device, so use the the appropriate lines, eg:

Create a file called "Backup1M.bat" then copy and paste in the following 2 lines to create 1M backup image...
esp_tool.exe  --read-flash  --port=com8  --size=1048576  dump_1M.bin

Create a file called "Backup4M.bat" then copy and paste in the following 2 lines to create 4M backup image...
esp_tool.exe  --read-flash  --port=com8  --size=4194304  dump_4M.bin

Obviously you must change the com port to match yours, and you can change the filename to something more descriptive if you wish.
If everything is correct, double-clicking the appropriate batch file will create the appropriate sized binary image of the existing esp firmware.
Best to rename the resulting file to something meaningful and move it somewhere safe such as "backups", else it could get over-written next time you run that batch file to back something else up.

The original backup image lets the device be restored back to its original manufacturers firmware if ever needed.

Compressed Files
The firmware has the ability to load a compressed .gz version of a file, as explained here by Ciccio... should refer to the gz file with its regular name, omitting the final .gz.
Example: if the original file is named dig7monoitalic.ttf the compressed gz version should be nameddig7monoitalic.ttf.gz  BUT  it must always be called in the program using its original name without the .gz extension.
If the original file is present it will be loaded, but if the original filename is not found then the server will automatically try to send the corresponding compressed .gz version ... so in practice you can
replace any file with the correspondeing compressed .gz version without any change in the code.