Remote Development - Uploading filesystem

I have setup remote development and successfully uploaded firmware to an ESP32-DevKit board.
However, I can’t find an option anywhere to upload the “Filesystem Image”.
Is there a way to do this with Platformio’s remote development?

1 Like

I also don’t see this option in the graphical interface, i.e. just

grafik

but per documentation you should be able to open a CLI and execute

pio remote -t uploadfs --force-remote

to trigger the remote filesystem upload.

EDIT: Added --force-remote to make it actually work.

1 Like

Thanks maxgerhardt, I had been looking under pio remote, when I need to look under pio run. I tried your suggestion but needed to add run and specify my environment.
It appears to build the filesystem but fails to updload with message
“Could not find the file with partitions table.”

Any suggestions appreciated.

Abbreviated output below:

$ pio remote run -e esp32dev -t uploadfs -v
Building project locally
    Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino; lib_deps: bblanchon/ArduinoJson@^6.17.2, FS, SPIFFS, davetcc/IoAbstraction@^1.6.7; test_port: COM13; test_ignore: test_desktop; build_flags: -Wno-packed-bitfield-compat, -Wno-parentheses)
--------------------------------------------------------------------------------------------------------------------------------------
    CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
    PLATFORM: Espressif 32 (3.2.0) > Espressif ESP32 Dev Module
    HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
    DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
    PACKAGES: 
     - framework-arduinoespressif32 3.10006.210326 (1.0.6) 
     - tool-esptoolpy 1.30000.201119 (3.0.0) 
     - tool-mkspiffs 2.230.0 (2.30) 
     - toolchain-xtensa32 2.50200.97 (5.2.0)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 38 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- <ArduinoJson> 6.17.3 (/home/dobrien/workspace/MB_P0003_SerialUI/.pio/libdeps/esp32dev/ArduinoJson)
    |-- <FS> 1.0 (/home/dobrien/.platformio/packages/framework-arduinoespressif32/libraries/FS)
    |-- <SPIFFS> 1.0 (/home/dobrien/.platformio/packages/framework-arduinoespressif32/libraries/SPIFFS)
    |   |-- <FS> 1.0 (/home/dobrien/.platformio/packages/framework-arduinoespressif32/libraries/FS)
   ...
    Building in release mode
    "mkspiffs_espressif32_arduino" -c data -p 256 -b 4096 -s 1507328 .pio/build/esp32dev/spiffs.bin
    /factory_config.json
    =========================================================================== [SUCCESS] Took 0.95 seconds =============================================================================

    Environment    Status    Duration
    -------------  --------  ------------
    esp32dev       SUCCESS   00:00:00.952
    native         IGNORED
    =============================================================================== 1 succeeded in 00:00:00.952 ===============================================================================
    Uploading firmware remotely
    Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino; lib_deps: bblanchon/ArduinoJson@^6.17.2, FS, SPIFFS, davetcc/IoAbstraction@^1.6.7; test_port: COM13; test_ignore: test_desktop; build_flags: -Wno-packed-bitfield-compat, -Wno-parentheses)
    --------------------------------------------------------------------------------

    Could not find the file  with partitions table.
    ========================== [FAILED] Took 0.69 seconds ==========================
    Environment    Status    Duration
    -------------  --------  ------------
    esp32dev       FAILED    00:00:00.692
    native         IGNORED
    ==================== 1 failed, 0 succeeded in 00:00:00.692 ====================

Can you try pio remote -t uploadfs --force-remote -v instead?

What is the platformio.ini of the project?

2 Likes

Thanks maxgerhardt. I really appreciate your help.
pio remote run -t uploadfs --force-remote -v
or
pio remote run -e esp32dev -t uploadfs --force-remote -v
successfully uploads the filesystem remotely for me.

Do you want to edit your solution to include the missing ‘run’ command and I’ll mark it as the solution for others to find (your command as written fails).

In summary, I can use the pio remote by forcing remote build which resolves the issue for me. However, I don’t understand why it won’t work without forcing. Happy to run more tests if it is valuable to track down the cause.

Also here is my platformio.ini file for the project

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = 
	bblanchon/ArduinoJson@^6.17.2
	FS
	SPIFFS
	davetcc/IoAbstraction@^1.6.7
test_port = COM13
test_ignore = test_desktop
build_flags = 
    -Wno-packed-bitfield-compat
    -Wno-parentheses

[env:native]
platform = native
test_ignore = test_embedded, test_common
lib_compat_mode = off
lib_deps = 
   https://github.com/maxgerhardt/ArduinoFake.git
    davetcc/IoAbstraction@^1.6.7
    bblanchon/ArduinoJson@^6.17.2
; map conversion arrays to 0. 
; will crash if anyone tries to use it, but shouldn't be used.
build_flags = 
    -D port_to_output_PGM=(uint8_t*)0
    -D digital_pin_to_port_PGM=(uint8_t*)0
    -D port_to_input_PGM=(uint8_t*)0
    -Wno-packed-bitfield-compat
    -Wno-parentheses

For context my use case is:

  • ESP32-Devkit-VE connected via USB to windows 10 host machine running platformio
  • Ubuntu 18.04 VM running on Hyper-V as I want to develop using platformio on linux VM
  • Using platformio remote because no usb pass through is possible from Linux VM via Hyper-V

Maybe @ivankravets knows more about this, or it can be added in the docs for ‘Remote Uploading Filesystem Image’ for ESP32 (and ESP8266 I guess).