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











up vote
1
down vote

favorite












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?










share|improve this question




























    up vote
    1
    down vote

    favorite












    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?










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      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?










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 14 '17 at 4:19









      Greenonline

      1,2562823




      1,2562823










      asked Jun 14 '17 at 3:27









      sijok_00

      66




      66






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          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





          share|improve this answer






























            up vote
            0
            down vote













            @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





            • install esptool.py

            • run esptool.py -p <serial-port> flash_id (gives you a hex
              manufacturer & chip ID)

            • look up the chip in
              https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h




            (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.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1219041%2fesp8266-does-not-boot-after-firmware-flash-serial-output-fatal-exception-28%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              0
              down vote



              accepted










              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





              share|improve this answer



























                up vote
                0
                down vote



                accepted










                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





                share|improve this answer

























                  up vote
                  0
                  down vote



                  accepted







                  up vote
                  0
                  down vote



                  accepted






                  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





                  share|improve this answer














                  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






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jul 15 '17 at 9:41









                  Glorfindel

                  1,29241220




                  1,29241220










                  answered Jul 15 '17 at 6:31









                  sijok_00

                  66




                  66
























                      up vote
                      0
                      down vote













                      @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





                      • install esptool.py

                      • run esptool.py -p <serial-port> flash_id (gives you a hex
                        manufacturer & chip ID)

                      • look up the chip in
                        https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h




                      (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.






                      share|improve this answer



























                        up vote
                        0
                        down vote













                        @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





                        • install esptool.py

                        • run esptool.py -p <serial-port> flash_id (gives you a hex
                          manufacturer & chip ID)

                        • look up the chip in
                          https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h




                        (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.






                        share|improve this answer

























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          @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





                          • install esptool.py

                          • run esptool.py -p <serial-port> flash_id (gives you a hex
                            manufacturer & chip ID)

                          • look up the chip in
                            https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h




                          (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.






                          share|improve this answer














                          @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





                          • install esptool.py

                          • run esptool.py -p <serial-port> flash_id (gives you a hex
                            manufacturer & chip ID)

                          • look up the chip in
                            https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h




                          (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.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Nov 26 at 5:41









                          Nisse Engström

                          22137




                          22137










                          answered Nov 24 at 23:42









                          user2108373

                          1




                          1






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1219041%2fesp8266-does-not-boot-after-firmware-flash-serial-output-fatal-exception-28%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                              Alcedinidae

                              Origin of the phrase “under your belt”?