I cannot figure out how to upload a spiffs image


#1

I cannot figure out how to upload a spiffs image. I don’t have an “Upload File System Image” task in any menu.

What steps do I take?

Thanks


#2

What is yor platformio.ini and what is the IDE you are working with?

Does uploading via the command pio run -t uploadfs (see docs) work?


#3

Thanks maxgerhardt
I am running the Arduino platform for esp8266 with a NodeMCU

platform.ini:
[env:nodemcu]
platform = espressif8266
board = nodemcu
framework = arduino

when I run “pio run -t uploadfs” I get the following:

Error: Not a PlatformIO project. platformio.ini file has not been found in current working directory (/home/henry). To initialize new project please use platformio init command

Thanks


#4

You must execute this command within your project fodler. Navigate to it using the cd command of your shell.


#5

Also I’d need to know your OS and your IDE.


#6

ubuntu 16.04
Atom with Platformio
Arduino


#7

As you suggested, I went to the project directory where I had added a data directory with my files to be uploaded. Everything is there, ready to upload.

I ran “pio run -t uploadfs”
and I got:

Building SPIFFS image from ‘data’ directory to .pioenvs/nodemcu/spiffs.bin
/SSIDFile
/query.html
/PassFile
/response.html
/initial.html
/submit.html
Looking for upload port…
Auto-detected: /dev/ttyUSB0
Uploading .pioenvs/nodemcu/spiffs.bin
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed


#8

Is your NodeMCU connected properly to your PC and you don’t have a serial monitor open? Can you put the ESP8266 into bootloader mode (hold down FLASH button, press RESET once while FLASH is being pressed) and retry the upload.


#9

I ran “pio run -t uploadfs” from the terminal built into platformio (Platformio->terminal) and it worked.
Still don’t have the Platformio menu item “Upload File System Image”. Any idea why I don’t.
Otherwise, thanks for your help, I can now up load data files inside of Platformio.

H.


#10

I think when you open the Command Palettte inside Atom and type in “Upload” that menu option should appear. (see https://flight-manual.atom.io/getting-started/sections/atom-basics/)


#11

Yes and “Alt+SHIFT+CMD+F” will do it automatically.
Thanks, it all works great.

H.