Fatal Exception (0) when compiling as non-FOTA, but works when compiling as FOTA

leonhart88
Posts: 2
Joined: Wed Sep 14, 2016 12:17 pm

Fatal Exception (0) when compiling as non-FOTA, but works when compiling as FOTA

Postby leonhart88 » Wed Sep 14, 2016 10:48 pm

Hi All,

So I was following the getting started guide last night and tried to compile & download the IOT example programs. I'm using an Adafruit HUZZAH (ESP-12) and compiling via VirtualBox as suggested, and using the newest ESP8266 download tool.

Since the board I am using has 4MB of FLASH, I followed the steps in the getting started guide and modified the "len" parameter in "eagle.app.v6.id" to 0xC0000. I also changed all the appropriate flash definitions in the header files as suggested.

I then copied the IOT example files over to the "app" folder and compiled successfully as non-FOTA. I then tried to download the program via the ESP8266 download tool using the download addresses specified in the getting started guide (see below).

download addresses.jpg


When I reset the board, and view the output on a terminal program, I get a loop of "Fatal Exception (0)" errors. I have triple checked all my settings, and I have adequate power to the board, etc.

I then tried compiling and flashing as FOTA and it worked. I received the expected output on the serial terminal. This is strange. One thing I noticed is that upon compilation as non-FOTA, the output shows the following.

compile output.jpg


Specifically, it says "eagle.flash.bin--->0x00000", and "eagle.irom0text.bin---->0x10000". This doesn't match the 0x40000 address specified in the getting started guide. When I changed the download address to 0x10000 the non-FOTA download worked fine.

Is this a typo in the user manual? It cost me quite a bit of time to figure out what was happening here...

pratik

Re: Fatal Exception (0) when compiling as non-FOTA, but works when compiling as FOTA

Postby pratik » Sun Sep 18, 2016 3:05 am

Hello,

Please simply download the latest SDK and do not change the len parameter if not really needed by your application.
Then relocate the app folder and compile the program as you did in this case.

Not a typo, it is the default state for the specific version the guide is referring to. The location will depend on your specific setup if you alter the placement parameters.

The nonOS SDK 2.0.0 binary (BIN) may not work when burned to the location 0x40000. The defaults have changed in this version to location 0x10000.

Code: Select all

MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = [b]0x40210000[/b], len = 0x5C000
}


If you replace the irom region specification above with

irom0_0_seg : org = 0x40240000, len = 0x5C000

Then you will have the irom0.text located to 0x40000. However, that is not recommended as you risk causing overlaps in data areas.

leonhart88
Posts: 2
Joined: Wed Sep 14, 2016 12:17 pm

Re: Fatal Exception (0) when compiling as non-FOTA, but works when compiling as FOTA

Postby leonhart88 » Wed Sep 21, 2016 10:12 pm

Hi Pratik,

Thanks for your response. I was only modifying len based on the getting started guide.

Thanks for giving me the info that in the new 2.0 nonOS SDK the address was changed. I see no mention of that in the release notes or anywhere else for that matter. It would be nice if this was more clearly stated somewhere.

Also, I forgot to mention, but the same version of the getting started guide in chinese says 0x10000 is the address, so that was suspicious and was why I thought it was a typo.

Cheers.

pratik

Re: Fatal Exception (0) when compiling as non-FOTA, but works when compiling as FOTA

Postby pratik » Sun Oct 02, 2016 12:47 pm

We will have the Getting Started Guide revised to help determine the address by studying the LD file, instead of just directly stating an address for the SDK. Thanks for the feedback!

Who is online

Users browsing this forum: No registered users and 54 guests