ESP8266 Developer Zone The Official ESP8266 Forum 2017-10-13T05:32:23+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=6768 2017-10-13T05:32:23+08:00 2017-10-13T05:32:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6768&p=16409#p16409 <![CDATA[View first unread post]]>
What amp / effects are you running it through?

Statistics: Posted by Andrewgvks — Fri Oct 13, 2017 5:32 am


]]>
2017-10-12T17:56:14+08:00 2017-10-12T17:56:14+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6768&p=16393#p16393 <![CDATA[Re: Invalid command in system_get_os_print]]>
But I doubt it has to do with binary corruption. There are checksums and also the exception always happens in system_get_os_print and nowhere else. My guess is that there is a problem right after switching from user1 to user2 (or vice versa) but before the new firmware runs.

Firmware update is done via a HTTP connection and I call

system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
system_upgrade_reboot();

using a timer (1 second) so that the HTTP client gets a proper response and no timeout on a successful update. I noticed by varying the time the problem occurs more often when it is shorter.

Statistics: Posted by blubb — Thu Oct 12, 2017 5:56 pm


]]>
2017-10-11T13:57:51+08:00 2017-10-11T13:57:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6768&p=16367#p16367 <![CDATA[Re: Invalid command in system_get_os_print]]> Or maybe you can dump flash to check if the new firmware is downloaded correctly.

Statistics: Posted by Her Mary — Wed Oct 11, 2017 1:57 pm


]]>
2017-10-07T19:51:13+08:00 2017-10-07T19:51:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=6768&p=16241#p16241 <![CDATA[Invalid command in system_get_os_print]]>
sometimes I observe a strange fatal exception. I cannot reproduce it consistently, but if it happens, it happens on the restart after an OTA upgrade.

On system start I do this:

struct rst_info *rst_info = system_get_rst_info();
os_printf("reason=%d exccause=%d epc1=0x%X epc2=0x%X epc3=0x%X excvaddr=0x%X depc=0x%X\n", rst_info->reason, rst_info->exccause, rst_info->epc1, rst_info->epc2, rst_info->epc3, rst_info->excvaddr, rst_info->depc);

Two examples of what I see when an exception happens:

reason=2 exccause=0 epc1=0x4021ED6C epc2=0x0 epc3=0x0 excvaddr=0x33 depc=0x0

reason=2 exccause=0 epc1=0x4029ED6C epc2=0x0 epc3=0x0 excvaddr=0x0 depc=0x0

According to the map file epc1 in both cases is system_get_os_print in the NEW image (so the crash does NOT happen while still the old image is active). What is system_get_os_print? What does it do? When is it called? I do not use this function.

My OTA update is done using spi_flash_erase_sector and spi_flash_write in the right places. After that I do

system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
system_upgrade_reboot();

Updating works, i.e. the new image runs perfectly (despite the exception message). If I reboot the module after that, all is well, too (the exception does not happen again).

I am using the latest SDK from
https://github.com/espressif/ESP8266_NONOS_SDK

Ideas?

Statistics: Posted by blubb — Sat Oct 07, 2017 7:51 pm


]]>