Stack Overflow on First Boot - ESP-01

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
KWolfe81
Normal user
Posts: 4
Joined: 11 Aug 2018, 15:35

Stack Overflow on First Boot - ESP-01

#1 Post by KWolfe81 » 11 Aug 2018, 15:38

I am new to to the ESPEasy. I just downloaded the binary onto an ESP-01 (black ESP8266 boards) and am getting an flash write errors and what appear to me as stack pointer overflows. I tried this on two different chips - same result. I'm using the normal build - 1024 and tried both the 8/9/2018 and 7/16/2018 release w/ same results.

Code: Select all

l`nr▒▒▒n
b
▒lr▒▒n
b
▒l▒▒l
▒▒▒p▒▒l`▒n▒▒U100 :

INIT : Booting version: mega-20180716 (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48                                       f3), LWIP: 2.0.3)
101 : INIT : Warm boot #2 - Restart Reason: External System
105 : FS   : Mounting...
112 : FS   : Mount successful, used 1255 bytes of 113201
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 2
RESET: formatting...
RESET: formatting done...
1654 : FS   : Error while reading/writing config.dat in 975
1722 : FS   : Error while reading/writing security.dat in 975
1791 : FS   : Error while reading/writing notification.dat in 975
1816 : FS   : Error while reading/writing config.dat in 1066
1824 : FS   : Error while reading/writing config.dat in 999
RESET: Succesful, rebooting. (you might need to press the reset button if you've                                        justed flashed the firmware)

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
   ▒U106 :

INIT : Booting version: mega-20180716 (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48                                       f3), LWIP: 2.0.3)
106 : INIT : Warm boot #3 - Restart Reason: Software/System restart
112 : FS   : Mounting...
118 : FS   : Mount successful, used 1506 bytes of 113201
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)
1438 : CRC  : program checksum       ...OK
1446 : FS   : Error while reading/writing config.dat in 1066

PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)

Exception (0):
epc1=0x4000e25d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000                                       000

ctx: cont
          sp: 3fff3a50 end: 3fff3cb0 offset: 01a0

>>>stack>>>
           3fff3bf0:  3fff5a04 00000100 00000001 40201dec
3fff3c00:  40202b36 3fff5b14 00000001 40202c3c
3fff3c10:  00000000 0000001c 00000003 3fff55ec
3fff3c20:  3fff2bc8 3fff2c88 3fff2bc8 3fff2c88
3fff3c30:  3fff2bc8 00000001 3fff2bc8 4024f938
3fff3c40:  00000000 0000001c 00000000 402029de
3fff3c50:  40201d1e 3fff2bc8 3fff2118 40212939
3fff3c60:  3fff2bc8 3fff2bc8 3fff2118 4024c010
3fff3c70:  00000000 00000000 00000000 40253728
3fff3c80:  3fff5f0c 0000006f 0000003d feefeffe
3fff3c90:  3fffdad0 00000000 3fff2c82 402519b8
3fff3ca0:  feefeffe feefeffe 3fff2c90 40100700
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
   ▒U106 :

INIT : Booting version: mega-20180716 (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48                                       f3), LWIP: 2.0.3)
106 : INIT : Warm boot #4 - Restart Reason: Exception
110 : FS   : Mounting...
117 : FS   : Mount successful, used 1506 bytes of 113201
RESET: Resetting factory defaults...

ThomasB
Normal user
Posts: 126
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Stack Overflow on First Boot - ESP-01

#2 Post by ThomasB » 11 Aug 2018, 19:46

Your flash bin is for 1MB devices. According to the table found in the link below (bottom of page), there's only 512K memory on the ESP-01:
https://www.esp8266.com/wiki/doku.php?i ... ily#esp-01

- Thomas

KWolfe81
Normal user
Posts: 4
Joined: 11 Aug 2018, 15:35

Re: Stack Overflow on First Boot - ESP-01

#3 Post by KWolfe81 » 11 Aug 2018, 20:46

My understanding is that the black PCB ESP-01 modules are 1MB devices:

https://www.esp8266.com/viewtopic.php?f=13&t=13659
https://www.amazon.com/ESP8266-ESP-01-S ... B012YW5BE6

I wonder if that's true though.

ThomasB
Normal user
Posts: 126
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Stack Overflow on First Boot - ESP-01

#4 Post by ThomasB » 11 Aug 2018, 21:49

They can come in a variety of memory size, but 512K is typical. The black version seems to advertise 1MB, but some vendors are clueless on what they are selling. Try the memory check program seen here:
https://youtu.be/xyc1gCjguRU?t=25s
- Thomas

KWolfe81
Normal user
Posts: 4
Joined: 11 Aug 2018, 15:35

Re: Stack Overflow on First Boot - ESP-01

#5 Post by KWolfe81 » 12 Aug 2018, 16:34

Digging, I found this thread to be relevant:

https://github.com/letscontrolit/ESPEasy/issues/650

Specifically.:
From the ESP-easy site: At this time ESP-01S are sold with a flash chip marked "PUYA". These flash chips have a problem with using SPIFFS memory and do not work with ESP Easy. The problem is under investigation. At this time there is no given solution besides using other ESP-01 if available or changing the flash chip on the ESP-01S. UPDATE: A fix seems to be on the horizon. Stay tuned!
And this:

https://github.com/esp8266/Arduino/issues/4061

KWolfe81
Normal user
Posts: 4
Joined: 11 Aug 2018, 15:35

Re: Stack Overflow on First Boot - ESP-01

#6 Post by KWolfe81 » 12 Aug 2018, 16:46

It's great being late to the party, other people have already solved your problems. The precompiled PUYA version and included with the releases solved the problem.

ThomasB
Normal user
Posts: 126
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Stack Overflow on First Boot - ESP-01

#7 Post by ThomasB » 12 Aug 2018, 18:26

Glad to hear it's working. Thanks for the PUYA info.

There were two different Arduino Esp.cpp patches in the gihub discussion that fix the PUYA issue. I flipped a coin and installed this one:
https://github.com/esp8266/Arduino/file ... uya_v2.zip

I read that @TD-er is working on integrating it into the compiler releases so that a special PUYA branch can be avoided. But for now the files tag with PUYA must be used.

- Thomas

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest