• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

What is the command line to build a filesystem image? (Arduino on Linux)

Q&A Forum › Category: ESP32 › What is the command line to build a filesystem image? (Arduino on Linux)
0 Vote Up Vote Down
Michael Rogulla asked 4 years ago

Hi all, I installed the AsyncElegantOTA, which works fine! I work with Arduino to program my ESP32, it has a menu entry “Export compiled binary file” and this creates a firmware in a “.bin” file. But there is no menu for building the SPIFFS filesystem image, and I don’t want to switch to Visual Studio Code. I guess there must be a way to create the image just by a command line. Would somebody please tell me this command?
I’m working on Linux (Ubuntu) and Arduino 1.8.15. I added the “ESP32 sketch data upload” tool which creates the bin – file, but the file gets deleted before I could copy it from /tmp.
Best, Michael.

Question Tags: ESP32 SPIFFS Image build
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
 
I find out this article, but I haven’t tried it: https://www.programmersought.com/article/85843256396/
 
You can also check the documentation; https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spiffs.html#mkspiffs
 
Alternatively, you can follow the instructions we suggest in this article: https://randomnerdtutorials.com/esp32-ota-over-the-air-arduino/#update-filesystem-arduino
 
I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Michael Rogulla answered 4 years ago

Hi Sara,
thank you, I tested your three suggestions. The first two depend on the tool “spiffsgen.py” which is part of the ESP-IDE. So to use this approach I have to install ESP-IDE first and then take the tool. This is not really a problem, but there is another drawback: the tool needs some parameters, it gets invoked by “python spiffsgen.py <image_size> <base_dir> <output_file>”. As long as you don’t know the right image_size I would not recommend this approach.
I like the third way much more: just invoke the “ESP32 Sketch Data Upload” without any ESP32 connected. It should give an error (because there is no ESP32 connected) and tell you the path to the .bin file which is generated automatically … but I could not find a file in this path, like I said in my first post.
Now after searching the whole filesystem I found out that the file can be found in a different place (example):
Arduino tells me: “[SPIFFS] upload : /tmp/arduino_build_123456/project1.spiffs.bin”
Filebrowser shows me: /tmp/snap.arduino/tmp/arduino_build_123456/project1.spiffs.bin
Here I can grab the .bin file and upload it via ElegantOTA. Great!
Greetings,
Michael.

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Michael.
I’m glad you find a way to do it.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.