Page 1 of 1

Firmware upgrade

Posted: Mon Oct 15, 2018 7:42 pm
by john_m
Hi Esp Team and Other members,

As per the documents and the source code, user1.bin and user2.bin are programmed at 0x1000 and 0x81000 respectively for 4MB(512+512) flash map. Now assume user1 is active(ie, bootloader is configured to load application from 0x1000) and if I do software upgrade on user2 area, bootloader is booting the user2 image correctly after upgrade. This requires the person to know the current active image(user1 or user2) before performing firmware upgrade. ie, If user1 is active in the esp8266 and if I do firmware upgrade with user1 binary, then firmware wont boot correctly after upgrade. So my question is that how a person knows which one to upgrade(user1 or user2) without seeing the debug? Or is there any way to build a common binary which can be upgraded irrespective user1 or user2 being active?

Awaiting for your inputs. Thanks in advance

Kind Regards,
John

Re: Firmware upgrade

Posted: Tue Oct 16, 2018 4:24 am
by blubb
system_get_userbin_addr()

Re: Firmware upgrade

Posted: Wed Oct 17, 2018 1:48 pm
by john_m
blubb wrote:system_get_userbin_addr()


Thanks for the reply. But my problem is that I have two images (user1 and user2) and i do not know which one is currently booting in my esp8266 without seeing anything on the debug console. If User1 is currently booting up, i should program user2. And if User2 is currently booting up, i should program user2. Unless i see the debug of my esp8266, i will not get to know which to upgrade next.

Re: Firmware upgrade

Posted: Fri Oct 19, 2018 6:06 am
by blubb
Then use system_upgrade_userbin_check().

Re: Firmware upgrade

Posted: Tue Oct 23, 2018 7:37 pm
by john_m
blubb wrote:Then use system_upgrade_userbin_check().


But my problem is that i don't have access to see the value of system_upgrade_userbin_check() from the device which is in the field. I need to know which one to upgrade without seeing the debug.

Re: Firmware upgrade

Posted: Wed Oct 24, 2018 2:24 pm
by Her Mary
Maybe you can try the latest ESP8266 RTOS SDK, it seems to use a common bin for OTA. https://github.com/espressif/ESP8266_RT ... versal_ota

Re: Firmware upgrade

Posted: Thu Oct 25, 2018 1:55 pm
by john_m
Her Majesty wrote:Maybe you can try the latest ESP8266 RTOS SDK, it seems to use a common bin for OTA. https://github.com/espressif/ESP8266_RT ... versal_ota


Great, thank you, Thats what I was looking for. I will check that.