0

我的项目包含 SSL 证书的数据适合我的测试d1 (ESP8266MOD)板,没有问题。我尝试将相同的系统上传到ESP-WROOM-02系统,但失败并出现错误:

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)板自动检测 4mb 闪存,而ESP-WROOM-02只有 2mb。我只在目录中留下了一个小文件,data但仍然出现同样的错误。这是否意味着我根本无法将文件系统上传到我ESP-WROOM-02的?我正在将 SPIFFS 用于文件系统。如何解决这个问题呢?

ESP-WROOM-02上传日志:

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)上传日志:

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)...
4

1 回答 1

0

根据数据表,ESP-WROOM-02 只有 2MB 闪存。

也许你可以改变你的分区表来为 spiff 腾出足够的空间。但是如果你的总闪存需求超过 2MB,就没有办法让所有东西都适合内存。

于 2020-02-04T10:29:12.150 回答