0

My project wit data that contains SSL certificate fits to my test d1 (ESP8266MOD) board that without problems. I tried to upload the same system to ESP-WROOM-02 system and it failed with error:

A fatal error occurred: File .pio\build\d1\spiffs.bin (length 1024000) at offset 3145728 will not fit in 2097152 bytes of flash. Use --flash-size argument, or change flashing address.

d1 (ESP8266MOD) board autodetects 4mb flash while ESP-WROOM-02 only 2mb. I left only one small file, in data directory, but still got the same error. Does it mean I can't upload file system to my ESP-WROOM-02 at all? I'm using SPIFFS for file system. How to solve this problem?

ESP-WROOM-02 Upload loag :

Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <WifiManager> 0.15.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ArduinoJson> 6.14.0
|-- <PubSubClient> 2.7
|-- <ESP8266WiFi> 1.0
Building in release mode
Building SPIFFS image from 'data' directory to .pio\build\d1\spiffs.bin
/cacert.pem
Looking for upload port...
Auto-detected: COM4
Uploading .pio\build\d1\spiffs.bin
esptool.py v2.8
Serial port COM4
Connecting......
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: cc:50:e3:e9:1b:51
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
*** [uploadfs] Error 2

A fatal error occurred: File .pio\build\d1\spiffs.bin (length 1024000) at offset 3145728 will not fit in 2097152 bytes of flash. Use --flash-size argument, or change flashing address.

d1 (ESP8266MOD) upload log:

Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <WifiManager> 0.15.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ArduinoJson> 6.14.0
|-- <PubSubClient> 2.7
|-- <ESP8266WiFi> 1.0
Building in release mode
Building SPIFFS image from 'data' directory to .pio\build\d1\spiffs.bin
/cacert.pem
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\d1\spiffs.bin
esptool.py v2.8
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 60:01:94:29:dc:10
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1024000 bytes to 2807...

Writing at 0x00300000... (100 %)
Wrote 1024000 bytes (2807 compressed) at 0x00300000 in 0.3 seconds (effective 32640.6 kbit/s)...
vico
  • 17,051
  • 45
  • 159
  • 315

1 Answers1

0

According to the datasheet the ESP-WROOM-02 has only 2MB Flash.

Maybe you could change your partition table to make enough space for the spiff. But if you total flash requirements is above the 2MB, there is no way to make everything fit into the memory.

theSealion
  • 1,082
  • 7
  • 13