ESP8266 does not boot after firmware flash, serial output Fatal exception (28)

1

I was started experimenting on ESP8266 that was bought from AI-Thinker, and the wiki is here, ESP8266 and another for NodeMCU.

I have already familiar with Lua firmware, so flashed Lua node firmware and able to success with that, but I face memory issue with the Lua firmware. Then I have thought to use programming in C instead of Lua. My development environment is Ubuntu 14.0. The steps I have followed from here: https://github.com/SuperHouse/esp-open-rtos.

I was successful to build the firmware with gen_misc.sh in examples/project_template folder with generating below mentioned bin's with default build options :

eagle.flash.bin
eagle.irom0text.bin

then flashed with esptool.py, using the command below:

./esptool.py write_flash 0x00000 ESPWorkspace/esp-open-sdk/ESP8266_RTOS_SDK/esp8266_bin/eagle.flash.bin 0x20000 ESPWorkspace/esp-open-sdk/ESP8266_RTOS_SDK/esp8266_bin/eagle.irom0text.bin

And the output after flashing from the board is:

  Fatal exception (28): epc1=0x40001800, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00007ff0, depc=0x00000000

It was just printing on to the screen repeatedly, I used minicom on Ubuntu with /dev/ttyUSB0 with 115200 baud rate for connecting the device used USB cable. and the strange part is after the power off/on cycle, I get junk data on minicom.

Some article on the net directed with debug with eagle.dump file and eagle.s. I have not resolved the issue with that either.

Can anyone direct me, to solve the issue?

flashing
asked on Super User Jun 14, 2017 by sijok_00 • edited Jun 14, 2017 by Greenonline

2 Answers

0

I found the way to flash esp-8266 with esp-free-rtos, if someone benefited from my answer I'm glad. I was using NodeMcu WiFi Development Board - ESP8266(ESP-12E). The issue I faced related to fatal exception(28) due to the related memory location not available(may not be, I am just beginner here).

I mistook two separate projects are same, but are identically different as ESP8266_RTOS_SDK and esp-open-rtos.

So after some search I chose to continue with esp-open-rtos, then the error appeared, it was related to flash size, from here: https://nodemcu.readthedocs.io/en/master/en/flash/ I got the answer .

In esp-open-rtos root folder edited the parameter file changed as to FLASH_SIZE ?= 8 , FLASH_MODE ?= dout even i increased the baud rate to ESPBAUD ?= 1500000 .

I flashed with the firmware and got my C program into esp8266 .

Below I have listed a step by step guide to flash your C program into esp8266. My dev system is Ubuntu 14.04 LTS.

1. download esp-open-sdk and build

Make sure all Requirements and Dependencies available with your dev system mentioned in their GitHub page.

$ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git

$ make STANDALONE=n 

Set the export path:

$ export PATH=/path_to_Workspace/esp-open-sdk/xtensa-lx106-elf/bin:$PATH

2. download esp-open-rtos and make flash

$ git clone --recursive https://github.com/Superhouse/esp-open-rtos.git

$ cd esp-open-rtos

$ make flash -j4 -C examples/http_get ESPPORT=/dev/ttyUSB0 
answered on Super User Jul 15, 2017 by sijok_00 • edited Jul 15, 2017 by Glorfindel
0

@Glorfindel has the correct answer but just to clarify.

Determine the flash size of your board:

from https://stackoverflow.com/questions/39631011/how-to-determine-flash-size-of-nodemcu

(I had a HiLetGo nodemcu - 32Mb)

Edit the file: esp-open-rtos/parameters.mk

  • FLASH_SIZE ?= <N> (where N is the megabits of your flash)
  • FLASH_MODE ?= dio

(note I also found reference to dio here: https://groups.google.com/forum/#!topic/esp-open-rtos/-MNCe1NyVKA)

Those two changes fixed the problem for me.

answered on Super User Nov 24, 2018 by user2108373 • edited Nov 26, 2018 by Nisse Engström

User contributions licensed under CC BY-SA 3.0