How to Upload Data to SPIFFS on esp8266 using platformio.
I am using this procedure:
- Create data folder under src folder
- put index.html in data folder
- run command upload File System image.
It results with:
PlatformManager: Installing espressif8266
Downloading [####################################] 100%
Unpacking [####################################] 100%
espressif8266 @ 2.0.4 has been successfully installed!
The platform ‘espressif8266’ has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 29 compatible libraries
Scanning dependencies…
Dependency Graph
|-- 1.3.4
| |-- 1.0.2
|-- 1.0.2
|-- 1.0
| |-- 1.0
|-- 2.1.3
| |-- 1.0
| |-- 1.0
| |-- <Ethernet(esp8266)> 1.0.4
| | |-- 1.0
| |-- 1.0
|-- 1.0
|-- 1.0
Building SPIFFS image from ‘data’ directory to .pioenvs\nodemcuv2\spiffs.bin
warning: can’t read source directory
*** [.pioenvs\nodemcuv2\spiffs.bin] Error 1
======================================================================================================== [ERROR] Took 1.83 seconds ========================================================================================================
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
Executing task: C:\Users\Ivan.platformio\penv\Scripts\platformio.exe run --target uploadfs <
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 29 compatible libraries
Scanning dependencies…
Dependency Graph
|-- 1.3.4
| |-- 1.0.2
|-- 1.0.2
|-- 1.0
|-- 1.0
|-- 2.1.3
| |-- 1.0
| |-- 1.0
| |-- 1.0
| |-- <Ethernet(esp8266)> 1.0.4
| | |-- 1.0
|-- 1.0
| |-- 1.0
Building SPIFFS image from ‘data’ directory to .pioenvs\nodemcuv2\spiffs.bin
warning: can’t read source directory
*** [.pioenvs\nodemcuv2\spiffs.bin] Error 1
My platformio.ini:
[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino