Comments on: ESP8266 NodeMCU with VS Code and PlatformIO: Upload Files to Filesystem (LittleFS) https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sat, 15 Jun 2024 19:17:00 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Steve Gale https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-925871 Sat, 15 Jun 2024 19:17:00 +0000 https://randomnerdtutorials.com/?p=100844#comment-925871 In reply to Steve Gale.

It is always the same, I post a problem and then sort of find the solution.

I tend to use my raspberry PI4 for running VSC etc.

That is using VSC version 1.09 and platform IO core 6.1.15 and home 3.4.4

I installed VSC on my MAC,
VSC version 90.1 and platform iIO is the same as my raspberry PI.

It works on my MAC and not the raspberry pi, so I need to see how I can update the version on my PI.

I thought I had updated it, maybe I need to wait until the PI foundation do an update.

Steve

]]>
By: Steve Gale https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-925816 Sat, 15 Jun 2024 16:50:26 +0000 https://randomnerdtutorials.com/?p=100844#comment-925816 My code compiles and uploads to the ESP8266,

Under project tasks I do not have a menu option platform so do not have the option to upload the filesystem.

I have closed and restarted VSC, created a new project and cannot get the option.

If I open a terminal window and enter the command

pio run –target uploadfs

I get an error
sh: 1: mkspiffs: not found

my platformio.ini file is

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:nodemcu]
platform = espressif8266
board = nodemcu
framework = arduino
monitor_speed = 115200
board_build.filesystem = littlefs

Any suggestions as to how to proceed?
I have tried searching for solutions without success, even trying other projects.

The ESP8266 has had other projects downloaded to it, do I need to erase the flash and then try the pio command ?

cheers

Steve

]]>
By: John N https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-887359 Thu, 01 Feb 2024 03:05:24 +0000 https://randomnerdtutorials.com/?p=100844#comment-887359 In reply to Sara Santos.

Hi Sara, Yeah I figured that, thanks for the clarification. For those of us that are from the vacuum tube days it can shake our confidence LOL. Thanks again.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-887247 Wed, 31 Jan 2024 16:25:46 +0000 https://randomnerdtutorials.com/?p=100844#comment-887247 In reply to John N.

Hi.
Even though you’re using LittleFS, you may continue having those messages.
Those are just warning messages and not compilation errors.
That should not prevent the code from compiling or uploading.
Regards,
Sara

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-887245 Wed, 31 Jan 2024 16:23:09 +0000 https://randomnerdtutorials.com/?p=100844#comment-887245 In reply to Mike.

Yes. That’s right.
Regards,
Sara

]]>
By: Mike https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-886997 Tue, 30 Jan 2024 09:59:00 +0000 https://randomnerdtutorials.com/?p=100844#comment-886997 Great staff!! Many thanks ! Just checking, I assume that the cycle of build/upload/build file system image/upload file system image in VS code is necessary every time you make a change in code, right?

]]>
By: John N https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-886881 Mon, 29 Jan 2024 20:38:19 +0000 https://randomnerdtutorials.com/?p=100844#comment-886881 In reply to Sara Santos.

Hi Sara, Since there seems to be so many different iterations of littlefs, LittleFS, LittleFS for ESP32, and various naming convensions dependent on what IDE is being used, there seems to be an inconsistency. After correcting as per your suggestion. I got this. Apparently I have a old/wrong version of AsyncWebServer? It is confusing when adding a library in platform io, as to which “AsyncWebServer” library to choose.

In file included from .pio\libdeps\d1_mini\ESP Async WebServer\src\SPIFFSEditor.cpp:1:
.pio\libdeps\d1_mini\ESP Async WebServer\src\SPIFFSEditor.h:16:101: warning: ‘SPIFFS’ is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]
16 | SPIFFSEditor(const String& username=String(), const String& password=String(), const fs::FS& fs=SPIFFS);
| ^~~~~~
In file included from .pio\libdeps\d1_mini\ESP Async WebServer\src/ESPAsyncWebServer.h:27,
from .pio\libdeps\d1_mini\ESP Async WebServer\src\SPIFFSEditor.h:3,
from .pio\libdeps\d1_mini\ESP Async WebServer\src\SPIFFSEditor.cpp:1:
C:\Users\flagt.platformio\packages\framework-arduinoespressif8266\cores\esp8266/FS.h:286:15: note: declared here
286 | extern fs::FS SPIFFS attribute((deprecated(“SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems.”)));
| ^~~~~~

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-886793 Mon, 29 Jan 2024 10:21:22 +0000 https://randomnerdtutorials.com/?p=100844#comment-886793 In reply to John N.

Hi.
In the code, it should be LittleFS, not littlefs.
Replace “littlefs” with “LittleFS” on your code (not on the platformio.ini)
Regards,
Sara

]]>
By: John N https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-886477 Sat, 27 Jan 2024 14:20:26 +0000 https://randomnerdtutorials.com/?p=100844#comment-886477 In reply to Henner.

Thanks for the reply beginners, but no, I indeed use LittltFS.

]]>
By: Henner https://randomnerdtutorials.com/esp8266-nodemcu-vs-code-platformio-littlefs/#comment-886424 Sat, 27 Jan 2024 07:09:46 +0000 https://randomnerdtutorials.com/?p=100844#comment-886424 In reply to John N.

Hi John,
I am not Sara, and I am a beginner only, but it seems to me that your issue is merely because you used all lowercase for “littlefs”. On my end it works within VScode+PlatformIO with “LittleFS”, like this:
if(!LittleFS.begin()) …
I hardly dare to mention that C/C++ is case-sensitive. Hope you don’t mind.

]]>