我的项目包含 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)...