I'm a bit new to the idea but I wanted to see if I get some clarification on burring firmware to the ESP8266. A ton of examples are there for Arundio and the AT firmware from Thinker-AI are found on the web like here.
https://www.allaboutcircuits.com/projec ... easier-now
Now what I originally started off with is the Blinky Example burning it to offset 0x00000 and 0x10000 duing the Wemos D1 Pro chip.
I am however unable to find a decent example of burning Firmware over the Air using this method. It talks about using a User1 / User2 .Bin file and judging by the Grid it appears the Blinky-0x00000.bin is the bootfile and Blinky-0x10000.bin is the user code, However when leveraging the OTA api's I am unsure on how this process would work. By looking at a couple examples online it appear they are looking for a IROM Magic header with 0xEA at the start.. I can only assume thats a Magic header for the AT Firmware. The offset's for this data being burned is at 0x01000, Which I assume does not mirror my setup as my blinky-0x00000 would overwrite that if I'm correct.
Anyone have any way to enlighten me in the right direction?
Thanks,
-Agent
Update: It appears my Elf2image generates a blinky-0x10000 instead of a 0x40000 due to the eagle.app.v6.ld I am using.
I'll need to find out how to lay these images out correctly.
Flash address 0x00000: bootloader
blinky-0x00000.bin --> Bootloader written by Cesanta. It is generated by esptool.py using a dump inside itself. This is the one we will use.
eagle.flash.bin --> Bootloader supplied by Espressif. I don't know if it can launch user programs generated by ESP8266_NONOS_SDK / esp-open-sdk.
eboot --> Bootloader used by Arduino environment. It first generates eboot.elf and merges it with the user program to generate a single binary file to be written into address 0x00000.
Flash address 0x10000: user program (this location is specificied by newer linkscript "eagle.app.v6.ld")
eagle.irom0text.bin --> Default user program supplied by Espressif. I'm not sure what goes on inside it. Perhaps it is the AT-command firmware?
blinky-0x10000.bin --> Example user program that we have generated using ESP8266_NONOS_SDK / esp-open-sdk.
Flash address X (0x3FC000 in case of ESP-12F with 32 Mbit / 4 MiB flash memory): factory configuration data
esp_init_data_default.bin --> Default configuration data. Perhaps it includes something that helps RF calibration as well? - See more at: http://www.esp8266.com/viewtopic.php?f= ... wxPvx.dpuf
Update: It appears the following code is located in esptool.py, It seems maybe I need to do something to my make file to pass the correct flag for FOTA?
Code: Select all
def elf2image(args):
e = ELFFile(args.input)
if args.chip == 'auto': # Default to ESP8266 for backwards compatibility
print("Creating image for ESP8266...")
args.chip == 'esp8266'
if args.chip == 'esp32':
image = ESP32FirmwareImage()
elif args.version == '1': # ESP8266
image = ESPFirmwareImage()
else:
image = OTAFirmwareImage()
image.entrypoint = e.entrypoint
image.segments = e.sections # ELFSection is a subclass of ImageSegment
image.flash_mode = {'qio':0, 'qout':1, 'dio':2, 'dout': 3}[args.flash_mode]
image.flash_size_freq = image.ROM_LOADER.FLASH_SIZES[args.flash_size]
image.flash_size_freq += {'40m':0, '26m':1, '20m':2, '80m': 0xf}[args.flash_freq]
if args.output is None:
args.output = image.default_output_name(args.input)
image.save(args.output)