# ESP32 Sketch Data Upload

**URL:** <https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606>\
**Category:** IDE 2.x\
**Created:** [February 16, 2024, 10:01am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606 "2024-02-16T10:01:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [February 16, 2024, 10:01am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/1 "2024-02-16T10:01:18Z")

</div>

ESP32 Sketch Data Upload still not working with new IDE, only with old IDE version

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [February 16, 2024, 10:04am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/2 "2024-02-16T10:04:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [February 16, 2024, 10:19am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/3 "2024-02-16T10:19:25Z")

</div>

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](https://github.com/arduino/Arduino/blob/master/build/shared/tools/howto.txt) 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](https://github.com/arduino/arduino-ide/pull/2110) 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](https://github.com/earlephilhower/arduino-littlefs-upload) 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](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](https://github.com/me-no-dev/arduino-esp32fs-plugin) does is:

1. Generate a SPIFFS filesystem image from the contents of the `data` subfolder of your sketch.
2. Upload the filesystem to the ESP32 board.

It does these things using two command line tools:

- [**mkspiffs**](https://github.com/igrr/mkspiffs)
- [**esptool**](https://github.com/espressif/esptool)

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:

> **[SPIFFS Filesystem - ESP32 - — ESP-IDF Programming Guide v5.5.1 documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/spiffs.html)**

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [February 16, 2024, 4:46pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/4 "2024-02-16T16:46:13Z")

</div>

> [@ptillisch](#):
>
> as was done by the creator of the Arduino IDE 2.x Tool.

Did you mean to say

> as was done by the creator of the Arduino IDE **1.x** Tool.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [February 16, 2024, 5:28pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/5 "2024-02-16T17:28:35Z")

</div>

You are right. Thanks for the correction @UKHeliBob!

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [February 18, 2024, 10:15am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/6 "2024-02-18T10:15:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [February 19, 2024, 6:36am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/7 "2024-02-19T06:36:50Z")

</div>

> [@digiton1](#):
>
> The only solution

I provided two solutions. What about the "alternative" I provided of using the command line tools directly?

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [February 19, 2024, 7:03am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/8 "2024-02-19T07:03:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [February 21, 2024, 7:06am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/9 "2024-02-21T07:06:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 20, 2024, 1:53pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/10 "2024-04-20T13:53:41Z")

</div>

Great news! Support for ESP32 has now been added to the Arduino IDE 2.x filesystem uploader extension I mentioned earlier in this thread:

> **[GitHub - earlephilhower/arduino-littlefs-upload: Build and uploads LittleFS...](https://github.com/earlephilhower/arduino-littlefs-upload)**
>
> Build and uploads LittleFS filesystems for the Arduino-Pico RP2040, ESP8266, and ESP32 cores under Arduino IDE 2.2.1 or higher - earlephilhower/arduino-littlefs-upload

---

<div class="post-metadata">

**Author:** ![zwieblum](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zwieblum/32/427702_2.png) [@zwieblum](https://forum.arduino.cc/u/zwieblum)\
**Post date:** [April 20, 2024, 1:56pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/11 "2024-04-20T13:56:34Z")

</div>

Does this work with encrypted (host generated) LittleFS, too?

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 20, 2024, 2:00pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/12 "2024-04-20T14:00:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [April 24, 2024, 5:55am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/13 "2024-04-24T05:55:55Z")

</div>

Error: 13 INTERNAL: Library install failed: moving extracted archive to destination dir: library not valid. With IDE 2.3.2.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 24, 2024, 1:01pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/14 "2024-04-24T13:01:38Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [April 25, 2024, 7:30am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/15 "2024-04-25T07:30:18Z")

</div>

Done, but:  
ERROR: Only Arduino-Pico RP2040 and ESP8266 supported.  
So not esp32.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 25, 2024, 8:38pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/16 "2024-04-25T20:38:36Z")

</div>

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:

> <https://github.com/earlephilhower/arduino-littlefs-upload/pull/22>
>
> Support for the ESP32 family of microcontrollers was recently added to the exten…sion (https://github.com/earlephilhower/arduino-littlefs-upload/pull/16).
> 
> When a user attempts a filesystem upload while a board of an unsupported architecture is selected in Arduino IDE, the extension displays a helpful error message which includes a list of supported targets. This message was not updated at the time the ESP32 support was added.
> 
> \---
> 
> Originally reported at https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/15

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:

1. Open the sketch you are trying to use the extension with in Arduino IDE.
2. Select **File \> Preferences...** (or **Arduino IDE \> Settings...** for macOS users) from the Arduino IDE menus.  
The " **Preferences**" dialog will open.
3. Check the box next to " **Show verbose output during: ☐ compilation**" in the " **Preferences**" dialog.
4. Click the " **OK**" button.  
The " **Preferences**" dialog will close.
5. Select **Sketch \> Verify/Compile** from the Arduino IDE menus.
6. Wait for the compilation to finish.
7. Right click on the black " **Output**" panel at the bottom of the Arduino IDE window.  
A context menu will open.
8. From the context menu, click **Copy All**.
9. Open a forum reply here by clicking the " **Reply**" button.
10. 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.  
 ![Code block icon on toolbar](https://europe1.discourse-cdn.com/arduino/original/4X/f/3/4/f34b0ef2ecd107da4bf127b3c0bc1c28569e7fe0.png)
11. Press the **Ctrl** + **V** keyboard shortcut ( **Command** + **V** for macOS users).  
This will [paste](https://lifehacker.com/how-to-copy-cut-and-paste-for-beginners-5801525) the compilation output into the code block.
12. Move the cursor outside of the code block markup before you add any additional text to your reply.
13. 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:

1. Open any text editor program.
2. [Paste](https://lifehacker.com/how-to-copy-cut-and-paste-for-beginners-5801525) the copied output into the text editor.
3. Save the file in `.txt` format.
4. Open a forum reply here by clicking the " **Reply**" button.
5. Click the "Upload" icon ( ![Upload icon](https://europe1.discourse-cdn.com/arduino/original/4X/c/0/0/c0067471d5eb440267189d84a0c94cfed541a968.png)) on the post composer toolbar:  
 ![Upload icon on toolbar](https://europe1.discourse-cdn.com/arduino/original/4X/3/0/1/30174157d368457aa9e1c9f5fb673d691a6e1516.png)  
The " **Open**" dialog will open.
6. Select the `.txt` file you saved from the " **Open**" dialog.
7. Click the " **Open**" button.  
The dialog will close.
8. 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.

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [April 26, 2024, 6:50am UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/17 "2024-04-26T06:50:56Z")

</div>

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](https://forum.arduino.cc/uploads/short-url/t4ooZ9bnINxJfbcIAU8ppg9DKtd.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.

---

<div class="post-metadata">

**Author:** ![ptillisch](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@ptillisch](https://forum.arduino.cc/u/ptillisch)\
**Post date:** [April 26, 2024, 3:53pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/18 "2024-04-26T15:53:43Z")

</div>

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:

```plaintext
<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:

```plaintext
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?

---

<div class="post-metadata">

**Author:** ![digiton1](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/digiton1/32/1126377_2.png) [@digiton1](https://forum.arduino.cc/u/digiton1)\
**Post date:** [April 27, 2024, 5:17pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/19 "2024-04-27T17:17:30Z")

</div>

When I try to install the library (zip) I get an error message.  
 ![error](https://europe1.discourse-cdn.com/arduino/original/4X/9/b/6/9b6664b641da0a1f9c213230e370a0b4b8cb2c91.jpeg)  
After this, I unpacked the library and manually placed it in the folder.  
Still the same error message.  
 ![board](https://europe1.discourse-cdn.com/arduino/original/4X/e/8/a/e8ad314a9239886dea22292c7cd273981b4966d6.jpeg)

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [April 27, 2024, 5:25pm UTC](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606/20 "2024-04-27T17:25:50Z")

</div>

> [@digiton1](#):
>
> When I try to install the library

Exactly which library are you trying to install and how are you doing it ?

[Next page](https://forum.arduino.cc/t/esp32-sketch-data-upload/1224606.md?page=2)
