Flash a fresh esp-01 module (black) with any 1MB bin
Does the problem presist after powering off and on? (just resetting isnt enough sometimes)
yes
Tell us what should happen?
Should start normally
Tell us what happens instead?
board keeps resetting and complaining about the same problem. I have tried flashing with different baud rates and modes, but nothing works. The same firmware works great on wemos d1r2.
Hardware:ESP-01 1MB version
Software or git version: v2.0.0-dev12
here''s the output from the serial interface
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 878
FS : Error while reading/writing security.dat in 878
FS : Error while reading/writing notification.dat in 878
FS : Error while reading/writing config.dat in 922
FS : Error while reading/writing config.dat in 895
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,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version: v2.0.0-dev12
INIT : Warm boot #2
FS : Mounting...
FS : Mount successful, used 1255 bytes of 113201
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 2
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 878
FS : Error while reading/writing security.dat in 878
FS : Error while reading/writing notification.dat in 878
FS : Error while reading/writing config.dat in 922
FS : Error while reading/writing config.dat in 895
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,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version: v2.0.0-dev12
INIT : Warm boot #3
FS : Mounting...
FS : Mount successful, used 1255 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)
FS : Error while reading/writing config.dat in 922
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=0x40106f19 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff3500 end: 3fff3770 offset: 01a0
stack>>>
3fff36a0: 0000001c 00000000 3fff2680 401004d8
3fff36b0: 3fff0ab0 0000004e 3fff4f9c 40205cb9
3fff36c0: 00000000 00000001 00000119 4010020c
3fff36d0: 0000001c 00000000 3fff2680 00000000
3fff36e0: 0000001c 00000000 3fff2680 40201710
3fff36f0: 00000001 3fff37c8 00000000 40203d13
3fff3700: 3fffdad0 3fff2680 3fff4f9c 3fff2740
3fff3710: 3fffdad0 3fff2680 3fff1464 402142f1
3fff3720: 3fffdad0 3fff2680 3fff1464 402319b9
3fff3730: 00000000 00000000 00000000 3fff4fac
3fff3740: 0000002f 00000013 feefeffe feefeffe
3fff3750: 3fffdad0 00000000 3fff273a 402033f4
3fff3760: feefeffe feefeffe 3fff2750 40205e54
<<
For another issue-thread I created these test builds yesterday: https://www.dropbox.com/s/tr2w99jw6hfgdph/ESPeasy_issue640_test_20171220.rar?dl=0
Could you please try one of these test builds?
Just to test if it is a recently fixed bug, which is not yet released in a build dev-13.
thanks for sharing the build, tried that, but same issue, please see following output
ets Jan 8 2013,rst cause:2, boot mode:(3,1)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version:
INIT : Warm boot 1
FS : Mounting...
FS : Mount successful, used 1506 bytes of 113201
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 961
FS : Error while reading/writing config.dat in 934
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,1)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
⸮U
INIT : Booting version:
INIT : Warm boot 2
FS : Mounting...
FS : Mount successful, used 1506 bytes of 113201
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 2
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 961
FS : Error while reading/writing config.dat in 934
RESET: Succesful, rebooting. (you might need to press the reset button if you've justed flashed the firmware)
Just to verify it is not a broken ESP device, can you also test another version, like the 'old' v120: http://www.letscontrolit.com/downloads/ESPEasy_R120.zip
It kind of looks like you cannot write to parts of the flash.
Are you certain it is a 1MB flash version and not perhaps a 512 kB version?
Edit:
Judging from this table, there is no 1MB flash version of the ESP01, just 512 kB
I have tried flashing "ESPEasy_R120_1024" and it works, however, the tasks do not function correctly, for example, I am unable to read DHT-11.
I have also tried flashing sketches that perform various functions (DHT, MQTT etc) and they appear to be working normally, however when I flash any recent version of easyesp (ESPEasy_R147_RC8 and upwards) I run into the same restart issues.
I'm certain it's a 1MB version (the table mentions below with ** that amount of flash size may vary with board models), I have verified the same using esptool, output follows
esptool.py v2.2
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Manufacturer: 85
Device: 6014
Detected flash size: 1MB
Hard resetting...
esptool.py v2.2
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Uploading stub...
Running stub...
Stub running...
Chip ID: 0x004aae02
Hard resetting...
which .bin file of 2.0.0-dev12 did you flash?
Hi,
i have the same problem. It seems that the newer ESP-01 are delivered with a different flash chip.
The working ESP-01 report as flash_id:
Manufacturer: e0
Device: 4014
and the new ones that are not working:
Manufacturer: 85
Device: 6014
Any idea how to get the new one working ?
Apparently, that is the GIGADEVICE_GD25LQ80 flash chip. (taken from here: https://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk/flashchips.h )
It looks there have been issues in the past to support that chip: https://www.google.nl/search?q=GIGADEVICE_GD25LQ80
I am not sure about how the programming does handle different chips, but maybe the flashtool has to be upgraded to support those chips? Although it looks like these chips should already be supported for well over a year now.
Does ESP easy have to know about these chips too? And could this knowledge be located in the ESP core so we have to upgrade to 2.4.0 to get it working?
ESP core 2.4.0 also cannot handle this chip yet. I also created an issue for that. Maybe we can only wait for them to analyze and support this new flash.
I will try to use another flash frequency. Just as a try
Can anyone with this problem try to burn with DOUT mode (https://github.com/espressif/esptool/wiki/SPI-Flash-Modes)?
Hi Pablo,
I already tried that but I will try again this evening.
Still does not work. Also not with DOUT. But to have this clear: everything is working fine. The firmware runs but only SPIFFS is not working with the news flash
So making changes to the settings is not possible?
How are you actually supposed to get it working for the first time. As far as I understood ESPEasy, you have to flash it and when you do the initial configuration, the firmware has to write to the flash, right?
Also in the meantime, it looks like it's hard to predict which chip you will get when you buy a ESP-01 from an online show. Does anyone have a suggestion where I can buy the old modules?
But ESPEasy_R147_1024.bin works fine.
hi,
same problem here,
mod type: esp8266 esp01s
flash P25Q80 8Mbit
r147, r148 ok, but above them nothing is working properly,
tried different setups, ext. psu, ftdi built in psu, 2 ftdi module, 2 esp module, 470uF cap and 100nF also added, same problem, confused
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
ÅžU
INIT : Booting version: v2.0.0-dev12
INIT : Warm boot #308
FS : Mounting...
FS : Mount successful, used 1255 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)
FS : Error while reading/writing config.dat in 922
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=0x40106f19 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff3500 end: 3fff3770 offset: 01a0
stack>>>
3fff36a0: 0000001c 00000000 3fff2680 401004d8
3fff36b0: 3fff0ab0 0000004e 3fff4f9c 40205cb9
3fff36c0: 00000000 00000001 00000119 4010020c
3fff36d0: 0000001c 00000000 3fff2680 00000000
3fff36e0: 0000001c 00000000 3fff2680 40201710
3fff36f0: 00000001 3fff37c8 00000000 40203d13
3fff3700: 3fffdad0 3fff2680 3fff4f9c 3fff2740
3fff3710: 3fffdad0 3fff2680 3fff1464 402142f1
3fff3720: 3fffdad0 3fff2680 3fff1464 402319b9
3fff3730: 00000000 00000000 00000000 3fff4fac
3fff3740: 0000002f 00000015 feefeffe feefeffe
3fff3750: 3fffdad0 00000000 3fff273a 402033f4
3fff3760: feefeffe feefeffe 3fff2750 40205e54
<<
strange..normally a reset should format the SPIFFS and everything should be fine.
From the logs above:
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 878
FS : Error while reading/writing security.dat in 878
FS : Error while reading/writing notification.dat in 878
FS : Error while reading/writing config.dat in 922
FS : Error while reading/writing config.dat in 895
RESET: Succesful, rebooting. (you might need to press the reset button if you've justed flashed the firmware)
Those errors while writing are the cause of all the problems: If that steps fails, your ESPEasy is unusable. It kinda works but it cannot save files.
I think there where other issues with the same problems? Didn't it have to do with the flash-mode of the flash tool or something?
but it's only with espeasy 2.0 and mega -> tasmota and espeasy R148 works fine on same device
Could it be that those other versions (Tasmota, Espurna, ESPeasy R148) have a sketch size < 512 kB?
I think so, since mega was especially for >=1M devices only.
if that is the problem in this case, we might need to build in a extra flash-size check that warns and stops the boot process?
It looks like it is a 1 MB flash. But if I remember correctly, the ESP8266EX will load up to 1 MB into memory, which means the sketch may never be more than 1 MB.
However, since I saw a lot of ESP-01 boards to be with only 512k flash and also support for OTA was sometimes different, I thought maybe the ESP01 was also limited in the max. sketch size, or perhaps it cannot access the flash like the "bigger" ones do.
can anyone build a testversion wich is alittle bit smaller to test with this devices?
working:
ESPEasy_R147_1024.bin: 431.376 Bytes
sonoff.8266.5.10.0.h.bin: 481.184 Bytes
not working:
ESP_Easy_mega-20180104_normal_ESP8266_1024.bin: 569.184 Bytes
maybe thats the solution?
I think we can disable the OLED framed module? That one is quite big with its font embedded.
Good Idea; Let's try; I can't compile it myself yet; can anybody do it?
@HarryHase11 so your module only has 512kb flash?
i bought it with 1MB, but not sure what wrong; and that problem some other user have the same issue.
http://fs1.directupload.net/images/180110/4uq4edt6.jpg
P25Q80H
ah k thx
found some hints in the internet that this flash chip have only 512KB size.
can you checkout the sysinfo page? it should tell you how much flash you have.
hi,
this is mine, with same issues:
Load: | 8% (LC=32657)
-- | --
Uptime: | 85 minutes
Wifi RSSI: | -45 dB
IP: | 10.0.0.15
GW: | 10.0.0.12
Build: | 148
Core Version: | 2_3_0
Unit: | 2
STA MAC: | 2c:3a:e8:4a:bf:cf
AP MAC: | 2e:3a:e8:4a:bf:cf
ESP Chip ID: | 4898767
Flash Chip ID: | 1335429
Flash Size: | 1024 kB
Flash Writes (since boot): | 2
Sketch Size/Free: | 421 kB / 516 kB
Free Mem: | 26792
Devices: | 35
Boot cause: | Cold boot
ok so its not flashsize
does someone have a link where to buy this type?
what do you mean?
module itself?
yeah the module that it is giving these problems. then i'll order a few so i can test/debug.
this is what i use in this moment
and i ordered some 8Mbit and 32Mbit flash to relpace, to see what happens
thanks..i've ordered 5 but esptimated shipping is 30 days :(
i have got it within 2 weeks (Hungary)
can't you build a binary with smaller size only for testing, i think that could be a temporary solution.
if that is the case, then all 1Mb modules should give problems at this moment, not only yours.
I think it is probably more ESP01 related than flash size.
But that's just a feeling :)
i agree, this is very small sketch, also not working!
https://www.letscontrolit.com/wiki/index.php/ESPEasy#Loading_firmware
2.0+ firmware on 1MB modules
If you are running the stock Mega edition firmware on 1MB modules, you will find that you can no longer load newer images because there's insufficient free space to upload the image (344kB as of 2.0.0.-Dev 9 edition). You can compile smaller images to solve this issue or use a small image that has been build just to upload newer images. So you would always have to use a two-step process to renew using OTA on 1MB modules. Using the uploader image as an in-between step, you can use images up to 604kB.
ESPEasyUploaderMega
The uploader uses SPIFFS so it uses the same configuration regarding SSID, WPA key and IP. It will connect to your Wifi network as usual, but it will only present this small web page:
ESPUploader.png
Tutorial_ESPEasy_Firmware_Upload
I assume these modules were not updated OTA?
But rather via a flash tool?
anyway, i ordered different esp01 modules, to see if it is module related issue, or what?
i tried OTA and serial flash as well, with same issues
at the weekend i take a look with a microscope on the esp01-flash chip which are working
Build: | 20000 - Mega
-- | --
GIT version: | v2.0.0-dev12
Plugin sets: | [Normal]
Number of Plugins: | 45
Core Version: | 2_3_0
Flash Size: | 1024 kB
Flash Writes (daily/boot): | 0 / 0
Sketch Size/Free: | 553 kB / 320 kB
Boot cause: | Cold boot
Warm boot count: | 0
STA MAC: | 2c:3a:e8:20:f7:c4
AP MAC: | 2e:3a:e8:20:f7:c4
ESP Chip ID: | 2160580
Flash Chip ID: | 1327328
Please try this test build:
https://www.dropbox.com/s/t98zoqeouafhkvx/512k_Firmware_issue650_v2.0_stripped.rar?dl=0
I removed:
It is based on the latest v2.0 branch.
This one should also give more information about the flash.
You might have the same problem than described here: https://github.com/esp8266/Arduino/issues/4061
Hmm, converting the ESP-chip ID, posted by Harry is: 2160580
Converted to HEX is still the last 3 bytes of the MAC address.
So still no way to detect these versions :(
TD-er: thx, test build has the same issue, so it's not the sketch size
-
INIT : Booting version:
INIT : Warm boot #1
FS : Mounting...
FS : Mount successful, used 2008 bytes of 113201
FS : Error while reading/writing config.dat in 970
PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 970
FS : Error while reading/writing config.dat in 940
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,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
ªU
INIT : Booting version:
INIT : Warm boot #2
FS : Mounting...
thanks @funtastic99 , https://github.com/esp8266/Arduino/issues/4061 seems it might be the same indeed.
I'm glad I found this thread because I'm having the same issue. When I flash the v120 everything runs fine but I always get the above errors with the v2 versions.
I've received the ESP-01 a few days ago - ordered it from Banggood
https://www.banggood.com/Upgraded-Version-1M-Flash-ESP8266-ESP-01-WIFI-Transceiver-Wireless-Module-p-979509.html
edit: v120 and v147 behaves also in a strange way. Sometimes it works after flashing, but often the wifi doesn't work. When I use putty to start a manual wifiscan it can't find networks.
Other Arduino IDE sketches like the http webserver work perfectly fine, but with espeasy it's a hit or miss with the ESP-01.
It seems to me we have PUYA P25Q80H flash chip incompatibility.
I have ESP01 mmodules with BergMicro flash and PUYA as well.
I've flashed latest ESPEasy_mega-20180114 to them.
Modules with BergMicro start fine with no errors:
BergMicro 25Q80ASSIG
Boot OK!
INIT : Booting version: mega-20180114
INIT : Warm boot #1
FS : Mounting...
FS : Mount successful, used 75802 bytes of 113201
INIT : Free RAM:25800
INIT : I2C
INIT : SPI not enabled
WIFI : AP Mode disabled
WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
WIFI : Could not connect to AP!
WIFI : AP Mode enabled
WD : Uptime 0 ConnectFailures 0 FreeMem 20568
Modules with PUYA have continuous bootloop:
PUYA P25Q80H
Bootloop...:
INIT : Booting version: mega-20180114
INIT : Warm boot #2
FS : Mounting...
FS : Mount successful, used 2008 bytes of 113201
FS : Error while reading/writing config.dat in 1013PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 960
FS : Error while reading/writing security.dat in 960
FS : Error while reading/writing notification.dat in 960
FS : Error while reading/writing config.dat in 1013
FS : Error while reading/writing config.dat in 983
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
v09826c6d
~ld
I've replaced PUYA P25Q80H flash chip by WINBOND 25Q32FVSIG (4MByte) and module starts to work:
WINBOND 25Q32FVSIG
Image for 1MB flah chip
Boot OK!INIT : Booting version: mega-20180114
INIT : Warm boot #1
FS : Mounting...
FS : Mount successful, used 75802 bytes of 113201
INIT : Free RAM:25928
INIT : I2C
INIT : SPI not enabled
WIFI : AP Mode disabled
WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
WIFI : Could not connect to AP!
WIFI : AP Mode enabled
WD : Uptime 0 ConnectFailures 0 FreeMem 20696
Image for 4MB flash chip
Boot OK!INIT : Booting version: mega-20180114
INIT : Warm boot #5
FS : Mounting...
FS : Mount successful, used 0 bytes of 957314
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FILE : Saved config.dat
FILE : Saved security.dat
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
v09826c6d
~ldINIT : Booting version: mega-20180114
INIT : Warm boot #6
FS : Mounting...
FS : Mount successful, used 75802 bytes of 957314
INIT : Free RAM:25808
INIT : I2C
INIT : SPI not enabled
WIFI : AP Mode disabled
WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
WIFI : Could not connect to AP!
WIFI : AP Mode enabled
WD : Uptime 0 ConnectFailures 0 FreeMem 20576
So I think PUYA P25Q80H is a bad choice of flash IC for esp8266
ah thanks! since it seemed to work correctly with the legacy ESPEasy (that didnt use SPIFFS), it still might be worth finding out if there is a software workaround/bugfix possible as well.
thanks for shedding a light on it.
Should we log the flash info on boot? Just to simplify debugging on issues like this?
is there a way to detect the flashissues? (besides random read errors)
The CRC pull req. may help I guess?
yeah but that one already logs errors.
hi grigorygn,
good to read about memory compatibility issues, as it was also suspecious for me and ordered same flash chip you mentioned (WINBOND 25Q32FVSIG (4MByte)), in beginning of this month.
To be honest, choosing flash type was a gamble from my side:)
many thanks for letting us know!
If my theory is correct, then it is just a matter of "programming" the flash chip with a signature to make it work again.
This could then be either patched in the ESP core library, or we could add a routine to check at first boot whether the flash size meets the magic string and if not correct it. Then after a reboot it might work again.
But then again it is just a theory, not tested yet.
I will try to create a sketch tomorrow, but it may destroy the flash if it is not the problem.
I created a little test (cannot test myself) by patching the ESP8266 core file esp.cpp:
In this test, getFlashChipSize() calls getFlashChipRealSize() to make sure all calls return the correct value, even when all bytes in the flash are set to 0.
uint32_t EspClass::getFlashChipSize(void)
{
uint32_t data;
uint8_t * bytes = (uint8_t *) &data;
// read first 4 byte (magic byte + flash config)
return getFlashChipRealSize();
if(spi_flash_read(0x0000, &data, 4) == SPI_FLASH_RESULT_OK) {
return magicFlashChipSize((bytes[3] & 0xf0) >> 4);
}
return 0;
}
Please test this version on the affected ESP modules. (and I really hope the library files are all recompiled)
Edit:
The lib was not compiled... will build another one
Edit2: Built another one, now built with the Arduino IDE:
https://www.dropbox.com/s/r5jokfj64yk7nnd/Issue-650_ESPeasy_normal_ESP8266_1024_flashDetectTest.rar?dl=0
It is an older version (week old) of ESPeasy (mega/v2.0, have no idea) of which I had still the directory setup.
here is the result:
~ld
ªU
INIT : Booting version: (custom)
INIT : Warm boot #7
FS : Mounting...
FS : Mount successful, used 1757 bytes of 233681
FS : Error while reading/writing config.dat in 970
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=0x40106f65 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000
depc=0x00000000
ctx: cont
sp: 3fff3db0 end: 3fff4020 offset: 01a0
stack>>>
3fff3f50: 0000001c 00000000 3fff2f38 401004d8
3fff3f60: 3fff0e38 0000004e 3fff518c 40202e21
3fff3f70: 00000000 00000001 0000011c 4010020c
3fff3f80: 0000001c 00000000 3fff2f38 00000000
3fff3f90: 0000001c 00000000 3fff2f38 4023a1b8
3fff3fa0: 00000001 3fff2dd8 00000000 40201aa3
3fff3fb0: 3fffdad0 3fff2f38 3fff518c 3fff2ff8
3fff3fc0: 3fffdad0 3fff2f38 3fff17ec 40207c71
3fff3fd0: 3fffdad0 3fff2f38 3fff17ec 402272f0
3fff3fe0: 00000000 00000000 00000000 3fff519c
3fff3ff0: 0000002f 00000013 feefeffe feefeffe
3fff4000: 3fffdad0 00000000 3fff2ff2 4023be00
3fff4010: feefeffe feefeffe 3fff3000 40100718
<<
ets Jan 8 2013,rst cause:2, boot mode:(3,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
ªU
INIT : Booting version: (custom)
INIT : Warm boot #8
FS : Mounting...
FS : Mount successful, used 1757 bytes of 233681
FS : Error while reading/writing config.dat i
2018-01-16 22:49 GMT+01:00 Gijs Noorlander notifications@github.com:
I created a little test (cannot test myself) by patching the ESP8266 core
file esp.cpp:
In this test, getFlashChipSize() calls getFlashChipRealSize() to make sure
all calls return the correct value, even when all bytes in the flash are
set to 0.uint32_t EspClass::getFlashChipSize(void)
{
uint32_t data;
uint8_t * bytes = (uint8_t *) &data;
// read first 4 byte (magic byte + flash config)
return getFlashChipRealSize();
if(spi_flash_read(0x0000, &data, 4) == SPI_FLASH_RESULT_OK) {
return magicFlashChipSize((bytes[3] & 0xf0) >> 4);
}
return 0;
}Please test this version on the affected ESP modules. (and I really hope
the library files are all recompiled)
https://www.dropbox.com/s/wq9bgt17oan3s3n/Issue-650_
ESPeasy_normal_ESP8266_1024_flashDetectTest.rar?dl=0—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/letscontrolit/ESPEasy/issues/650#issuecomment-358118660,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARfFwjXM2Wieq0r-uojyA9pkA1M892aWks5tLRlogaJpZM4RKQuO
.
Did you perform a full flash erase before?
In your reply (reply via email :) ) you react to my first post of this, before the edit.
Could you retry with the latest link I supplied?
The first compile did not rebuild the ESP8266 core library :( (tested by adding a syntax error and the compiler did not find it)
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 970
FS : Error while reading/writing config.dat in 940
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:(1,7)
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
wdt reset
rd$|là |
ûgndogâäcpÄlbdrlxóoÃ
Ã
$
#
gã|dìbóogçl
ln
dgsÛo
cÜll
Äx
$ünªU
INIT : Booting version: (custom)
INIT : Cold Boot
FS : Mounting...
FS : Mount successful, used 2008 bytes of 233681
FS : Error while reading/writing config.dat in 970
PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 0
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 970
FS : Error while reading/writing config.dat in 940
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,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
ªU
INIT : Booting version: (custom)
INIT : Warm boot #1
FS : Mounting...
FS : Mount successful, used 2008 bytes of 233681
FS : Error while reading/writing config.dat in 970
PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 1
RESET: formatting...
RESET: formatting done...
FS : Error while reading/writing config.dat in 917
FS : Error while reading/writing security.dat in 917
FS : Error while reading/writing notification.dat in 917
FS : Error while reading/writing config.dat in 970
FS : Error while reading/writing config.dat in 940
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,2)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
ªU
INIT : Booting version: (custom)
INIT : Warm boot #2
FS : Mounting...
FS : Mount successful, used 1757 bytes of 233681
FS : Error while reading/writing config.dat in 970
Hmm too bad... I will sleep a night about it. See what I can come up with.
Maybe @psy0rz can make another build, based on the latest 2.1 sources, but with known for sure the core lib has been compiled (e.g. output to serial when function is called)
i've added a printline to that function and there was no output (also tried saving something). probably need to recompile part of the core which is a PITA.
Hi @TD-er. This is why I asked for people who don't have PUYA chipped module to comment in #748. All the back and forth with long posts that get nowhere just makes the thread hard to follow and so long most people just wouldn't bother to make sense of it.
I am absolutely dumbfounded by the lack of urgency shown by the supposed gurus in the 8266 community in relation to this issue. This issue was raised 3 weeks ago that I know of maybe more. I warned that it was going to quickly become widespread 2 weeks ago. There are now at least 4 current threads on this issue. And still nothing concrete has been done.
I know you're trying to help, but no-one's suggestions have been helpful to date. Even @igrr got me to try a number of modified esp.cpp's to nail it down, but all to no avail. And now, he's just left me hanging as if he's just put it in the too hard basket. If he can't find the problem without a PUYA chipped module in hand I seriously doubt that anyone can.
This isn't a minor issue and it's going to spread exponentially as these PUYA chips are being used by a growing number of manufacturers and I can't see it being restricted to the esp-01 module for long.
Someone who knows what they're doing needs get one of these modules urgently so this issue can be resolved as quickly as possible.
That's why I want to get my hands on them.
So where can I get them for sure with speedy delivery?
I got mine from the following link
https://www.aliexpress.com/item/2PCS-ESP8266-Serial-Esp-01-WIFI-Wireless-Transceiver-Module-Send-Receive-LWIP-AP-STA/32232009463.html?spm=a2g0s.9042311.0.0.EdV3yu
Delivered in 3 weeks
@TD-er, this is where I bought one of the batches(20) from and they all had the PUYA flash chip.
If you want to receive them more quickly you must choose 'ePacket' from the drop down list of postage options.
I will send TD-er one of this esp-01 at the weekend, maybe he can solve this puya problem
any news?
Yep, there is a solution, but we still have to build it.
The problem is in the Arduino ESP8266 core library.
The problem is the implementation of SPIFFS which does rely on a very typical property of flash memory.
With normal flash memory, a bit can only be set from 1 to 0.
To do the other way around, (0 to 1), you have to read a block, erase the entire block, change the data in memory and write the entire block back to flash.
So the SPIFFS implementation relies on this by not erasing, but just writing to the flash.
For example the administration of used blocks is perfect for this.
Just write a 0 to the bit representing the new used block and the rest of your write is just ones (to the bits you don't want to change)
You'll have to keep two of these lists. One for used blocks and one for blocks marked to be erased.
Then after a while almost no free (and erased) blocks are left and thus the index table for free blocks is almost all zeroes.
Then you only have to erase the blocks which are marked accordingly and the block(s) which contain the table of used or ready-to-be-erased blocks.
But with the PUYA chips, the byte written is actually stored the same way as it is offered to the flash memory.
With normal flash: existing pattern: 11110000 => write: 11101111, should result in 11100000
But with PUYA: existing pattern: 11110000 => write: 11101111, results in 11101111
This makes the current bookkeeping implementation useless.
Adding a small piece of code to the write flash function, should be enough to fix all SPIFFS issues.
To be precise, this commit is enough.
Thing is, you don't want this on other chips. So it is not a general solution, so we have to split it into several builds, one specific for PUYA chips.
The reason you don't want it on other chips is that it will increase the number of writes to the chip.
Especially on the addresses where SPIFFS stores its (free/used) block allocation register.
@psy0rz is looking into building the core lib to be used with PUYA builds.
i just tested this on my PUYA chips: writing now seems slow as hell? or is it always slower on ESP01s chips?
trying to get it to build via travis now, so hopefully we'll have a extra PUYA binary in the next nightly.
ok its building, i'm going to sleep, with some luck both nightly builds will now have a dev_ESP8266PUYA_1024 version. keep in mind its slow and wears your flash fast.
there is still hope the upstream guys figure out a way to reconfigure the chip so it behaves normally.
see https://github.com/esp8266/Arduino/issues/4061#issuecomment-365210021
Have got my own PUYA :)

is there a binary downoad avaible for testing?
Yep, but there were some reports of non functional Advanced view.
One of the firmware versions in the last release is for the PUYA.
I have an ESP01 with a Puya IC, and I've tried to upload the latest [env:dev_ESP8266PUYA_1024] built on it !
I don't remember it if was on the _mega_ or _v2.0._ branches (.. well... #997), but it has totally failed : The boot log loops after failing to do something certainly related to the SPIFF partition.
I've always flash_erase using esptool.py before flashing the firmware, but it always ends up crashing after some ESPEASY boot logs , and keeps rebooting.
Is there anything else i should take care of, or is my board simply fried (totally credible) ?
Otherwise, is the PUYA fix supposed to work fine at this time? Don't i have to ALSO patch the ArduinoEspressif framework manually, using the included script?
_I'm gonna receive new (certainly PUYA equipped) ESP01 modules from AliExpress, but it takes time, and for sure I will report further success or not._
@soif try my patch v2 for puya, it will detect if flash is puya and use workaround if necessary.
@uzi18 Thanks for the quick help, but I cant figure out what your "patch v2" is.
I've just seen you own "patch-2" branch which only commit is a9dbb79bd749650893c7fe17e4a0b4f88812aff7 "update Blynk controller".... ???
any link ? 😎
Well OK, understood.
But i'm currently on the 2.4 version and patching pio components is not something I want to experiment/maintain until it is officially merged.
Hence MANY thanks for your efforts 🎉
I now quess that I just have to wait for a potentially fast merge into the Espressif-arduino framework, for the PUYA IC to be supported. I'm pretty sure that they will merge it ASAP:
I just see noone it testing it there.
Just backup Esp.cpp and Esp.h files from core.
i'm quite new to the ESP and ESPeasy, could someone help me choosing a flash chip to change the PUYA ones with? i had a Microchip 25PF020B80-4C-S and a SST 25VF040B at hand but both seem to not work with the ESP. i'd especially appreciate hints as to make & model and where to buy in germany ;) thanks =)
find w25q32 :)
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!
When to expect the new firmware for the ESP-01s boards?
Regards, Bram
It is available in mega/v2 releases.
Thanks, which one should I use, the PUYA_1024.bin or the PUYA_1024_VCC.bin?
PUYA_1024, when you don't use analog-input or use analog from external
&
PUYA_1024_VCC, when you use the measurement from Vcc with the internal ADC
Hello,
I struggled some hours around with an ESP-07 board with 1M... with the PUYA-Version from 20180714 it worked at least to boot. Now I will start testing :).
My ESP-07 has although (flash_id)
Manufacturer: 85
Device: 6014
ChipID: 146085
greets Christian
Most helpful comment
I will send TD-er one of this esp-01 at the weekend, maybe he can solve this puya problem