Is is possible to upload both application code and spiffs filesystem to the ESP8266 at the same time?
Currently this requires a two stage upload:
pio run -t upload
pio run -t uploadfs
-v output, I see esptool is running:
esptool -vv -cd nodemcu -cb 921600 -cp "/dev/ttyUSB0" -cf .pioenvs/emonesp_fast/firmware.bin
esptool -vv -cd nodemcu -cb 921600 -cp "/dev/ttyUSB0" -ca 0x300000 -cf .pioenvs/emonesp_fast/spiffs.bin
Could these two commands be combined? If this is not possible with Pio, is it possible using epstool to flash the two .bin’s?
Please correct me if I’m wrong but currently is it correct that pio does not have a way to mkspiffs to generate the spiffs.bin without running
uploadfs target? I would like to build the spiffs package together with the application using Pio on TravisCI saving the .bins to github releases then upload later via OTA from the ESP.
Please check a docs. How about as for
Oh dear, how did I miss that
! Thanks a lot
Actually, I know how I missed the
buildfs command. It’s not listed anywhere on the espressif docs page:
Espressif 8266 — PlatformIO v6.1 documentation
buildfs works locally but when I run it on travis I get the error
Do not know how to make File target buildfs’` I get this error even if I ensure spiffs package is installed
$ platformio platform install espressif8266 --with-package tool-mkspiffs
What else needs to be installed for
buildfs to work?
Please sorry, you are right. I added it but docs has not been released yet. Please use latest docs instead stable:
It looks that you have old dev platform on RPi. Try to
pio upgrade & pio update on RPi.
Issue was the TravisCI had cached an older version of framework-arduinoespressif8266.
Thanks a lot for your help
firmware.bin and spiffs.bin are now auto-generated on git release by TravisCI and uploaded to github releases ready for OTA upload
May 11, 2017, 2:52pm
Uhm… I’m sorry, but I’m still missing it… How was this achieved?
targets = uploadfs in my
platformio.ini, but it doesn’t do anything.
Could you try manually
pio run -t uploadfs?
May 16, 2017, 7:33am
I have no problem uploading the FS. I just want to know how to get the IDE to do both
upload in a single command/shortcut. I thought that was the subject of this thread.
But, I’ve since switched to a Makefile and running
make uploadfs upload, which does exactly what I need.
I would also be interested to know if this is possible. I never managed to figure out how to upload application and spiffs at the same time using platformIO.
May 16, 2017, 1:08pm
WAIT! You’re OP!
So you did NOT find a solution?
One thing you could do is create a Makefile (see VIM integration for example), so you can run
make uploadfs upload && pio device montor from any terminal (built-in IDE as well), to get the same result als the build/upload shortcut. That’s what I’m doing.
We have a related issue for that. Maybe, we will implement it in the current PIO Core 3.4 milestone. See
09:42PM - 18 Sep 16 UTC
02:14PM - 26 Jun 17 UTC
Per the discussion in #787, it seems that a single command like:
… n -e nodemcu -t clean -t upload -t monitor`
should be able to replace a common pattern of commands like:
`pio -e nodemcu -t clean && pio -e nodemcu -t upload && pio -e nodemcu device monitor`