-->
Page 1 of 1

Distributing BIN fies for different esp

PostPosted: Mon Nov 30, 2015 3:17 pm
by NailBuster
wondering how this works: I don't fully understand where/how everything is stored in flash on the esp models.

I have a working project in esp12e (nodemcu board) that has 4MB flash. I want to create a BIN file for someone that will just flash the BIN file to their esp (no source).

If I create a bin export in arduino the BIN file is about 300KB. I've setup project with 3MB spiffs. I store settings in SPIFFS root folder as well....

Now if someone has an esp01 or esp with only 2MB or 1MB flash. Can they flash the above BIN file? do I have to make different BIN files for different flash sizes?

Is it possible to update an esp without overwriting the SPIFF area(or is that the way it works already)? If I create an update BIN but want to keep the users' config files within their SPIFFs would that work?

Re: Distributing BIN fies for different esp

PostPosted: Mon Nov 30, 2015 5:33 pm
by Mmiscool
I use a bat file to do this.

Place the bat file i the arduino directory that contains the exe file. Change the inn and out settings a the top of the bat file to point at your sketch and desired output directory.

Code: Select allset INN=C:\Users\user\Documents\GitHub\Basic\ESP8266Basic\ESP8266BASIC.ino

set OUT=C:\Users\user\Dropbox\MicroController\esp8266\ESP8266_BASIC_INTERPERTERv2\ESPBasic_Flash_Tool\Build

arduino_debug --verify --board esp8266:esp8266:generic:FlashSize=512K64,FlashMode=qio,CpuFrequency=160 --verbose --preserve-temp-files --pref build.path="%OUT%\512k" "%INN%"

arduino_debug --verify --board esp8266:esp8266:generic:FlashSize=1M512,FlashMode=qio,CpuFrequency=160 --verbose --preserve-temp-files --pref build.path="%OUT%\1M" "%INN%"

arduino_debug --verify --board esp8266:esp8266:generic:FlashSize=2M,FlashMode=qio,CpuFrequency=160 --verbose --preserve-temp-files --pref build.path="%OUT%\2M" "%INN%"

arduino_debug --verify --board esp8266:esp8266:generic:FlashSize=4M3M,FlashMode=qio,CpuFrequency=160 --verbose --preserve-temp-files --pref build.path="%OUT%\4M" "%INN%"

Re: Distributing BIN fies for different esp

PostPosted: Mon Nov 30, 2015 7:32 pm
by NailBuster
awesome...thanks!

Will the BIN file not touch the SPIFF file area during flashing? So that if you flash with a new updated BIN file it will leave that area of flash alone (I have config files store in spiff)?

Re: Distributing BIN fies for different esp

PostPosted: Mon Nov 30, 2015 7:36 pm
by Mmiscool
Yes. it only create the firmware. It will not overwrite the spiffs.


I use this as part of the process to make the ESP8266 Basic flasher.