ESP8266 Developer Zone The Official ESP8266 Forum 2016-03-12T01:04:50+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=1875 2016-03-12T01:04:50+08:00 2016-03-12T01:04:50+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1875&p=6083#p6083 <![CDATA[Re: OTA upgrade failure with bootloader in enhance mode]]> Statistics: Posted by molete — Sat Mar 12, 2016 1:04 am


]]>
2016-03-11T18:00:55+08:00 2016-03-11T18:00:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1875&p=6079#p6079 <![CDATA[Re: OTA upgrade failure with bootloader in enhance mode]]>
Here is a simple example of OTA http://bbs.espressif.com/viewtopic.php?f=7&t=423#p1619

To quit from enhance mode, you need to download blank.bin to initialize the system parameters. Or call system_restore to reset the system parameters.

If your problem is still unsolved, please feel free to let us know.

Statistics: Posted by ESP_Faye — Fri Mar 11, 2016 6:00 pm


]]>
2016-03-07T21:07:19+08:00 2016-03-07T21:07:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1875&p=6014#p6014 <![CDATA[OTA upgrade failure with bootloader in enhance mode]]> I have noticed that when I reboot in enhance mode to manually boot user2 firmware at 0x81000 and then run the OTA upgrade to upgrade user1, it looks like starts upgrading the firmware but it fails almost immediately (WDT reboot) making both user1 and user2 unusable. Basically the bootloader will endless jump between user1 and user2 (looking for a magic number on those partition?).

I replaced system_upgrade_userbin_check() with system_get_userbin_addr() in my OTA function to identify the right file for the right partition, since in enhance mode the first function is not able to understand which partition it is running from, but I got the same problem.

Code:

const char* file;
switch (system_get_userbin_addr())
{
    case 0x1000: file = "user2.bin"; break;
    case 0x81000: file = "user1.bin"; break;
    default:
        os_printf("[OTA]Invalid userbin number!\n");
        return;
}
...then get the file and perform the upgrade...


Also I didn't find a way to quit the enhance mode to run the boot loader normally even after flashing again the firmware and the bootloader except doing:

Code:

system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
system_upgrade_reboot();

Is there a nicer way to quit that mode?

Thanks

Statistics: Posted by molete — Mon Mar 07, 2016 9:07 pm


]]>