FOTA version causes FatalException (0) after boot, but non-FOTA works

Pato
Posts: 32
Joined: Sat Mar 24, 2018 12:52 am

FOTA version causes FatalException (0) after boot, but non-FOTA works

Postby Pato » Tue Aug 21, 2018 4:23 pm

Hi all,

I have a NON-FOTA code that compiles and works perfectly fine on the ESP8266.
However if I compile the exact same code for OTA build, with the same compiler and linker options and linking the same libraries, the bootloader jumps @01000 to run user1, but immediatly after throws a fatal exception, without even executing the very first line I put in user_rf_cal_sector_set() (a simple debug printf):

Code: Select all

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 16Mbit(512KB+512KB)
jump to run user1 @ 1000

Fatal exception (0): epc1=0x401000c1, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0J000000
Fatal exception (0): epc1=0x401000c1, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x0J000000
...


However, if I use the same makefile to compile other sample code in OTA mode (i.e. I only change the .c sources being compiled), and flash it at address 0x01000, it runs perfectly fine.

I have no compiler nor linker errors or warnings.

Any clue why I'm getting this fatal exception ? How to solve it ?
I would love you :)

NB: By NON-FOTA, I mean a software flashed at address 0x10000 with booloader eagle.flash.bin
By FOTA, I mean a software user1 or user2 (as Espressif calls them) with user1 flashed at 0x01000 with bootloader boot_v1.7.bin.
I use esptool.py elf2image version=2 to convert the ELF to a binary for FOTA.
I'm using a ESP8266 with 2MB of flash on a WROOM-02 board, and I compile with esp-open_sdk toolchain, NONOS SDK 2.2

Who is online

Users browsing this forum: No registered users and 1 guest