Firmware upgrade

john_m
Posts: 13
Joined: Fri Jul 28, 2017 3:06 pm

Firmware upgrade

Postby john_m » Mon Oct 15, 2018 7:42 pm

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

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: Firmware upgrade

Postby blubb » Tue Oct 16, 2018 4:24 am

system_get_userbin_addr()

john_m
Posts: 13
Joined: Fri Jul 28, 2017 3:06 pm

Re: Firmware upgrade

Postby john_m » Wed Oct 17, 2018 1:48 pm

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.

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: Firmware upgrade

Postby blubb » Fri Oct 19, 2018 6:06 am

Then use system_upgrade_userbin_check().

john_m
Posts: 13
Joined: Fri Jul 28, 2017 3:06 pm

Re: Firmware upgrade

Postby john_m » Tue Oct 23, 2018 7:37 pm

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.

Her Majesty
Posts: 345
Joined: Mon Oct 27, 2014 11:09 am

Re: Firmware upgrade

Postby Her Majesty » Wed Oct 24, 2018 2:24 pm

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

john_m
Posts: 13
Joined: Fri Jul 28, 2017 3:06 pm

Re: Firmware upgrade

Postby john_m » Thu Oct 25, 2018 1:55 pm

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.

Who is online

Users browsing this forum: No registered users and 14 guests