Compiling for AT firmware OTA (user1.bin and user2.bin)
Closed this issue · 1 comments
Is it possible to compile two binary files for the AT+CIUPDATE command?
http://espressif.com/sites/default/files/documentation/99c-esp8266_fota_guide_en_.pdf
To my knowledge the same object files are linked twice with different address offsets.
It would enable me to flash the Olimex MOD-WIFI-ESP8266 without changing the solder bridges. Would love to contribute this myself but I'm not a Makefile guru and haven't managed to get it running last night.
BTW the makefile worked out of the box, great work!
Ok, I worked out the basics and got it working. Just not integrated into the Makefile.
So I did two make runs and saved the .elf file after each run.
One with default linker script, and one with eagle.flash.2m.ld modified: irom0_0_seg changed from 0x40201010 to 0x40281010
Then took the SDK script https://github.com/espressif/ESP8266_AT/blob/master/at/gen_misc_plus.sh and modified it:
rm eagle.app.flash.bin
cp FSBrowser$1.elf eagle.app.v6.out
mkdir upgrade 2> /dev/null
xtensa-lx106-elf-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
xtensa-lx106-elf-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
xtensa-lx106-elf-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
xtensa-lx106-elf-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
COMPILE=gcc ../../ESP8266_NONOS_SDK/tools/gen_appbin.py eagle.app.v6.out 2 0 0 3 $1
cp eagle.app.flash.bin upgrade/user$1.bin
run it twice, once with 1 then with 2 parameter.
Let me know if this is the place to write more on how to feed the result to AT+CIUPDATE