EEPROM write on the Sparkfun Thing (ESP8266) (SOLVED)

I’m trying to write to the EEPROM on the Sparkfun Thing (ESP8266). I wrote the following sketch:

#include <EEPROM.h>
 
void setup()
{
	unsigned char data;
	Serial.begin(115200);
	EEPROM.begin(10);
	data = EEPROM.read(0);
	Serial.println("Go");

	if(data == 0x55)
	{
		Serial.printf("Valid signature found, ...[0x%02x]\n",data);
	}
	else
	{
		Serial.printf("No signature found, writing...[0x%02x]\n",data);
		EEPROM.write(0,0x55);
		EEPROM.commit();
		delay(10);
	}
}

void loop() 
{
	Serial.println("Loop...");
	delay(1000);
}

Seems like the data never gets written to the EEPROM

Anything I’m missing ?

Well, for those interested, I opened a ticket on the Generic ESP8266 github and got some exchange:

https://github.com/esp8266/Arduino/issu … -128024822

Removed both installed modules and only installed http://arduino.esp8266.com/stable/packa … index.json

For the Sparkfun Thing (WRL-13231) I selected:

Flash module: DIO

Flash Freq: 80MHz

Upload using: Serial

Flash size: 4M (3M SPIFFS)

And now it seems ok.

First boot gives:

Go


No signature found, writing...[0xff]
Loop...
Loop..

Then subsequent reboot gives:

Go


Valid signature found, ...[0x55]
Loop...
Loop...

Which is what I expected.

Maybe it’s a bug in the Sparkfun fork…