Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic File system upload SPIFFS to ESP8266 using VS2019 (Read 124 times)
Maestro
Junior Member
**
Offline


Posts: 24
Location: West Virginia
Joined: Oct 12th, 2024
File system upload SPIFFS to ESP8266 using VS2019
Oct 15th, 2025 at 3:33pm
Print Post  
I converted a project written in VS2017 to VS2019. I used the File System Upload SPIFFS and the output shows it was successful. 
However, when using LittleFS in code to open the files it fails because the files do not exist. 

I am able to read and write files in code, but the uploading seems to fail even though it shows it was successful. 

Visual Micro version: 2.2024.0926
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2807
Joined: Feb 13th, 2019
Re: File system upload SPIFFS to ESP8266 using VS2019
Reply #1 - Oct 15th, 2025 at 3:41pm
Print Post  
Are you using the SPIFFs code to check the files uploaded, or the LittleFS code (can you provide a quick example so we are on the same page?)
  
Back to top
IP Logged
 
Maestro
Junior Member
**
Offline


Posts: 24
Location: West Virginia
Joined: Oct 12th, 2024
Re: File system upload SPIFFS to ESP8266 using VS2019
Reply #2 - Oct 15th, 2025 at 8:06pm
Print Post  
Here's a basic example. File System Upload Tool is set SPIFFS which is what I've always used. The data upload says it was a success but when I use LittleFS in code the file read fails. 

But I can create, save and read files in code using LittleFS. I just can't access the file that was uploaded if it was even uploaded.

#include "LittleFS.h"

/*
Initialize LittleFS
*/
void initFS() {
     if (!LittleFS.begin()) {
           Serial.println("Error mounting LittleFS");
     }
     else {
           Serial.println("LittleFS mounted");
     }

}

void setup()
{
     // Serial port for debugging purposes
     Serial.begin(115200);

     initFS();

     File file = LittleFS.open("/AddFooter.png", "r");
     if (!file) {
           Serial.println("Error openning AddFooter.png for reading.");
     }
     else {
           Serial.println("Success openning AddFooter.png for reading.");
           file.close();
     }


}

void loop()
{


}

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Maestro
Junior Member
**
Offline


Posts: 24
Location: West Virginia
Joined: Oct 12th, 2024
Re: File system upload SPIFFS to ESP8266 using VS2019
Reply #3 - Oct 15th, 2025 at 8:53pm
Print Post  
Never mind, I changed the File System Upload Tool to LittleFS and the upload and access to the data is working.

This seems strange since the ESP32 app upload with SPIFFS seems to work fine with the same code accessing with LittleFS.

Was this an issue or am I crazy? 

Shouldn't LittleFS be able to read files uploaded with SPIFFS using an ESP8266?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2807
Joined: Feb 13th, 2019
Re: File system upload SPIFFS to ESP8266 using VS2019
Reply #4 - Oct 15th, 2025 at 9:13pm
Print Post  
Thanks for the details and resolution.

To my understanding the LittleFS partitions and files are written differently as an FS so they aren't meant to be interoperable.

I do have a vague recollection of it seeming like that, however it seems if it did work it wasn't by design:
https://forum.arduino.cc/t/littlefs-data-preservation/1064392/3
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint