ESP32 Sketch Data Upload still not working with new IDE, only with old IDE version
You started a topic in the Uncategorised category of the forum
Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics
Hi @digiton1. Arduino IDE 2.x is a complete rewrite of the Arduino IDE on a different framework and in a new language. The "Tools" system of Arduino IDE 1.x used by the Tool (AKA "plugin") you were using with the old IDE is very specific to the Java language that version series of Arduino IDE was written in, so it was not possible to add support for Arduino IDE 1.x Tools to Arduino IDE 2.x.
Full support for making equivalent (and even better) expansions on the default capabilities of Arduino IDE was added to Arduino IDE starting from version 2.2.0. However, it will still be necessary for the community to create Arduino IDE 2.x extensions to replace the Arduino IDE 1.x tools, and as far as I know nobody has done that yet for the ESP32 filesystem upload tools (though it has now been done for the ESP8266 and RP2040 microcontrollers so there is reason to hope it might happen sometime in the near future). Maybe you will be the one to take on this project of creating the extension. This is a great opportunity for someone to make a significant contribution to the Arduino community as was done by the creator of the Arduino IDE 2.x Tool.
For now, the most simple solution is to use Arduino IDE 1.x when you need to upload a filesystem to your ESP32 board. The download links for Arduino IDE 1.x are listed here:
https://www.arduino.cc/en/software#legacy-ide-18x
You can have Arduino IDE 1.x and 2.x installed at the same time without any problems, so if you prefer Arduino IDE 2.x you can continue to use it except for when you need to use the tool to upload a filesystem.
Alternative Solution
An alternative solution is to use command line tools to directly upload filesystems to your ESP32.
Under the hood, what the "ESP32 sketch data upload" Tool does is:
- Generate a SPIFFS filesystem image from the contents of the
data
subfolder of your sketch. - Upload the filesystem to the ESP32 board.
It does these things using two command line tools:
So instead of using the "ESP32 sketch data upload" Tool from Arduino IDE, you can just work directly with those two tools from the command line terminal.
There is some information on that here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spiffs.html
Did you mean to say
as was done by the creator of the Arduino IDE 1.x Tool.
You are right. Thanks for the correction @UKHeliBob!
The only solution is to use an old version (1) of Arduino to upload data because it doesn't work with the new version (2). Wonder how everyone is doing this now? Are you all just using the old version?
I provided two solutions. What about the "alternative" I provided of using the command line tools directly?
I am familiar with the old method, but with the new one as you mentioned I really have to find out. I have no experience with this at all. Will see if I can find examples on youtube.
I've searched how to upload the spiffs via the command line, but can't find anything about it. just the old method. Where can I find information about this?
Great news! Support for ESP32 has now been added to the Arduino IDE 2.x filesystem uploader extension I mentioned earlier in this thread:
Does this work with encrypted (host generated) LittleFS, too?
Unfortunately, although I am reasonably knowledgeable about the Arduino IDE-related aspects of this subject, I don't know anything at all about using filesystems with ESP32. Hopefully one of the other forum members will be able to provide an answer.
Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: library not valid. With IDE 2.3.2.
Hi @digiton1. "arduino-littlefs-upload" is not an Arduino library so it is expected that attempting to install it as a library will fail. Please carefully follow the installation instructions provided by the extension author:
https://github.com/earlephilhower/arduino-littlefs-upload?tab=readme-ov-file#installation
If you have any questions or problems while following those instructions, let me know and I'll provide assistance.
Done, but:
ERROR: Only Arduino-Pico RP2040 and ESP8266 supported.
So not esp32.
The extension does indeed support ESP32. They just forgot to update that error message when ESP32 support was added. I have submitted an update for the message:
However, that doesn't explain why you are getting this error message. In order to understand the problem, I'm going to ask you to post the full verbose output from a compilation.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Open the sketch you are trying to use the extension with in Arduino IDE.
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
- Click the "OK" button.
The "Preferences" dialog will close. - Select Sketch > Verify/Compile from the Arduino IDE menus.
- Wait for the compilation to finish.
- Right click on the black "Output" panel at the bottom of the Arduino IDE window.
A context menu will open. - From the context menu, click Copy All.
- Open a forum reply here by clicking the "Reply" button.
- Click the
<CODE/>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the compilation output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to post the output.
In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt
file and then attach that file to a reply here:
- Open any text editor program.
- Paste the copied output into the text editor.
- Save the file in
.txt
format. - Open a forum reply here by clicking the "Reply" button.
- Click the "Upload" icon (
) on the post composer toolbar:
The "Open" dialog will open. - Select the
.txt
file you saved from the "Open" dialog. - Click the "Open" button.
The dialog will close. - Click the "Reply" button to publish the post.
Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt
file onto the post composer field to attach it.
I'm using a code that already works at the moment and uploaded the images with the IDE 1.8.
I now have this code in IDE 2.32. loaded and tried with CTRL+Shipt+P and then the UPLOAD option as mentioned.
I immediately get this message. Still ran the code with another ESP32, but NO images.
I emptied the entire library myself and only used the libraries that are in the code. Same problem
esp32esp32esp32.txt (293,8 KB).
The data folder contains all the images. Again, if I use the same code with IDE 1.8, I can upload the image without any problems and everything works as it should.
I'm perplexed. Each board has a machine identifier, which is referred to as the "fully qualified board name" (FQBN). The FQBN has the following format:
<vendor ID>:<architecture ID>:<board ID>
When you run the "Upload LittleFS to Pico/ESP8266/ESP32" command in Arduino IDE, the arduino-littlefs-upload extension queries Arduino IDE for the FQBN of the board currently selected from the Tools > Board menu and checks the <architecture ID>
component of the FQBN to see if it is one of the following values:
rp2040
esp8266
esp32
If the architecture of the selected board is something other than one of those, it shows this "ERROR: Only Arduino-Pico RP2040 and ESP8266 supported.
" message.
So we expect the error if you have something like the Arduino Uno (FQBN arduino:avr:uno
) selected in Arduino IDE. The reason I requested the verbose compilation output from you is because the FQBN of the selected board is shown there. I see it here:
FQBN: esp32:esp32:esp32
So this should work fine with the extension. I just tried a filesystem upload using the extension with that same Tools > Board > esp32 > ESP32 Dev Module selection in the Arduino IDE menus as you had during the compilation that generated the compilation output you shared and it worked perfectly for me.
Do you have version 1.1.1 or newer of the arduino-littlefs-upload extension installed? You can see the version number in the filename under the C:\Users\digiton\.arduinoIDE\plugins
folder on your hard drive.
Do you have multiple copies of the extension installed (i.e., multiple arduino-littlefs-upload-*.vsix
files under C:\Users\digiton\.arduinoIDE\plugins
)?
Are you certain you had Tools > Board > esp32 > ESP32 Dev Module selected from the Arduino IDE menus when you ran the "Upload LittleFS to Pico/ESP8266/ESP32" command that generated the "ERROR: Only Arduino-Pico RP2040 and ESP8266 supported.
" message?
When I try to install the library (zip) I get an error message.
After this, I unpacked the library and manually placed it in the folder.
Still the same error message.
Exactly which library are you trying to install and how are you doing it ?