Arduino IDE 2: Install ESP8266 NodeMCU LittleFS Uploader (Upload Files to the Filesystem)

In this guide, you’ll learn how to install the ESP8266 LittleFS filesystem uploader plugin on Arduino IDE 2 (2.2.1 or higher) and how to upload files to the ESP8266 NodeMCU board filesystem.

Install ESP8266 LittleFS Uploader in Arduino IDE 2 (Upload Files to the Filesystem)

If you want to use LittleFS for the ESP8266 with VS Code + PlatformIO, follow the next tutorial instead:

Table of Contents

If you’re still using Arduino 1.8, you can follow this tutorial instead: Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE.

Currently, there’s isn’t a similar solution for the ESP32 yet. Let us know if that’s not the case.

Introducing LittleFS

LittleFS is a lightweight filesystem created for microcontrollers that lets you access the flash memory like you would do in a standard file system on your computer, but it’s simpler and more limited. You can read, write, close, and delete files. Using LittleFS with the ESP8266 boards is useful to:

Installing the LittleFS Uploader Plugin on Arduino IDE 2

To upload files to the ESP8266 on Arduino IDE 2, we’ll use this LittleFS Uploader plugin that is compatible with Arduino 2.2.1 or higher and can be used for the ESP8266 and Raspberry Pi Pico boards.

Windows Instructions

Follow the next steps to install the filesystem uploader if you’re using Windows (click here for MacOS instructions):

1) Go to the releases page and click the .vsix file to download.

Download vsix file to install filesystem uploader plugin

2) On your computer, go to the following path: C:\Users\<username>\.arduinoIDE\. Create a new folder called plugins if you haven’t already.

Create Plugins Folder Arduino IDE 2

3) Move the .vsix file you downloaded previously to the plugins folder.

Moving LittleFS uploader to the plugins folder arduino ide 2

4) Restart or open the Arduino IDE 2. To check if the plugin was successfully installed, press [Ctrl] + [Shift] + [P] to open the command palette. An instruction called ‘Upload Little FS to Pico/ESP8266‘ should be there.

Upload LittleFS to Pico/ESP8266

That means the plugin was installed successfully. Proceed to this section to test the filesystem uploader plugin.

Mac OS X Instructions

Follow the next steps to install the filesystem uploader if you’re using Mac OS X:

1) Go to the releases page and click the .vsix file to download.

Download vsix file to install filesystem uploader plugin

2) In Finder, type ~/.arduinoIDE/ and open that directory.

In Finder type ~/.arduinoIDE open that directory

3) Create a new folder called plugins.

creating a plugins folder Arduino IDE 2 MacOS

4) Move the .vsix file to the plugins folder.

Moving LittleFS plugin vsix file to Arduino IDE 2 on Mac OS

5) Restart or open the Arduino IDE 2. To check if the plugin was successfully installed, press [⌘] + [Shift] + [P] to open the command palette. An instruction called ‘Upload LittleFS to Pico/ESP8266‘ should be there (just scroll down or search for the name of the instruction).

Arduino IDE 2 Upload Filesystem Image ESP8266

Uploading Files to ESP8266 NodeMCU using the Filesystem Uploader in Arduino IDE 2

To upload files to the ESP8266 NodeMCU filesystem, follow the next instructions.

1) Create an Arduino sketch and save it. For demonstration purposes, you can save an empty sketch.

2) Then, open the sketch folder. You can go to Sketch > Show Sketch Folder. The folder where your sketch is saved should open.

Arduino IDE 2 Show Sketch Folder

3) Inside that folder, create a new folder called data.

Creating a data folder inside the sketch folder

4) Inside the data folder is where you should put the files you want to upload to the ESP8266 filesystem. As an example, create a .txt file with some text called test_example.txt.

Testing the ESP8266 filesystem txt file

5) In the Arduino IDE, in the Tools menu, select the desired flash size (this will depend on the size of your files).

ESP8266 Select Flash Size Arduino IDE

6) Make sure you have the right board (Tools > Board) and COM port selected (Tools > Port).

7) Then, upload the files to the ESP8266 board. Press [Ctrl] + [Shift] + [P] on Windows or [⌘] + [Shift] + [P] on MacOS to open the command palette. Search for the Upload LittleFS to Pico/ESP8266 and click on it.

Upload LittleFS to Pico/ESP8266

Important: ensure the Serial Monitor is closed. Otherwise, the upload will fail.

After a few seconds, you should get the message “Completed upload. “. The files were successfully uploaded to the ESP8266 filesystem.

Troubleshooting

If you get the following error message “ERROR: No port specified, check IDE menus“, restart the Arduino IDE, and try again.

Testing the ESP8266 LittleFS Uploader

Now, let’s check if the file was saved into the ESP8266 filesystem. Upload the following code to your ESP8266 NodeMCU board.

#include "LittleFS.h"
 
void setup() {
  Serial.begin(115200);
  
  if(!LittleFS.begin()){
    Serial.println("An Error has occurred while mounting LittleFS");
    return;
  }
  
  File file = LittleFS.open("/test_example.txt", "r");
  if(!file){
    Serial.println("Failed to open file for reading");
    return;
  }
  
  Serial.println("File Content:");
  while(file.available()){
    Serial.write(file.read());
  }
  file.close();
}
 
void loop() {

}

View raw code

After uploading, open the Serial Monitor at a baud rate of 115200.

Open Arduino IDE 2 Serial Monitor baud rate of 115200

Press the ESP8266 on-board “RST” button. It should print the content of your .txt file in the Serial Monitor.

Testing the ESP8266 Filesystem Uploader Plugin Arduino IDE 2

You’ve successfully uploaded files to the ESP8266 filesystem using the plugin.

Wrapping Up

In this tutorial, we’ve shown you how to upload files to the ESP8266 LittleFS filesystem on Arduino IDE 2 using an uploader plugin.

We’ve shown you how to upload a .txt file, but you can upload other file formats like HTML, CSS, and Javascript files to build a web server, images, or small icons, save configuration files, etc.

We have a project example in which we build a web server using HTML and CSS files saved on the filesystem (simply replace SPIFFS with LittleFS).

If you want to learn more about the ESP8266, check our resources:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Recommended Resources

Build a Home Automation System from Scratch » With Raspberry Pi, ESP8266, Arduino, and Node-RED.

Home Automation using ESP8266 eBook and video course » Build IoT and home automation projects.

Arduino Step-by-Step Projects » Build 25 Arduino projects with our course, even with no prior experience!

What to Read Next…


Enjoyed this project? Stay updated by subscribing our newsletter!

14 thoughts on “Arduino IDE 2: Install ESP8266 NodeMCU LittleFS Uploader (Upload Files to the Filesystem)”

  1. I’m not sure I understand the gist of this article.
    Are you saying that if someone wants to use the littleFS with an ESP32, they are constrained to use Arduino IDE 1.8.x instead of version 2.x.x of the Arduino IDE?
    Regards,
    Ray

    Reply
    • No. IDE 2.x works fine with ESP32. You just can’t directly upload files to the LittleFS file system with it. I get around this by having a routine in the setup section so that, upon booting, it checks for an SD card. If the card is found various files are copied to the file system. Operationally this is better because you can change the files in the field with no computer. I use an INI file to provide wifi credentials and other data so I just need an SD card for each site.

      Reply
    • Hi.
      Yes. At the moment, there isn’t support for the ESP32 Uploader Plugin on Arduino 2.
      You can use the command line on your computer, VS Code, or the old Arduino IDE.
      Regards,
      Sara

      Reply
  2. Small typo / glitch?
    This line :
    2) On your computer, go to the following path: C:\Users.arduinoIDE.
    should be
    2) On your computer, go to the following path: C:\Users\.arduinoIDE.

    Reply
  3. …and what are the Pro’s and Con’s of LittleFS over SPIFFS…?
    The second sentence of this article just let me ask why I would want to use this at all. -Just the information I expect in the introduction of this filesystem.

    Reply
  4. It does work on Windows10. The appearing in the ctrl+sh+p may or may not show it. Type upload in the search window and it appears.

    Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.