Hi. I am following the Building webservers with the ESP32 and ESP2866. I am using ESP2866 (Nodemcu V1.0) Everything works ok right up to utilising the Littlefs. The files are put in the data directory and the “build filesystem image” completes ok. However whatever I do I get
No such file or directory: ‘.pio\\build\\nodemcuv2\\littlefs.bin’
*** [uploadfs] Error 2
When I try to upload the filesystem image!
On checking, even though the “build filesystem image” completes with no errors there is never a littlefs.bin file made.
I have used the downloaded project files from the links in the book to see if its my files but the downloaded project files give the same output.
Any ideas anyone?
I am a newbie with platformIO for programing the ESP devices so is there something a beginner would overlook and not mentioned in the book?
Thanks in advance.
Hi-.
Can you give more details about the error? Or is that everything you get?
What does your platform.ini file look like?
Regards,
Sara
Hello Sarah.
Thankyou for the prompt reply. I have attached the Platformio.ini? Then the output for the failed upload task and then finally the output for the prior “successful” buildfs task.
; 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:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 115200
lib_deps = ESP Async WebServer
board_build.filesystem = littlefs
***********THIS IS THE COMPLETE FAILED TASK OUTPUT.****************
Executing task: C:\Users\USER\.platformio\penv\Scripts\platformio.exe run –target uploadfs –environment esp12e
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
————————————————————————–Verbose mode can be enabled via `-v, –verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 (4.2.1) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
– framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
– tool-esptool @ 1.413.0 (4.13)
– tool-esptoolpy @ 1.30000.201119 (3.0.0)
– tool-mklittlefs @ 1.203.210628 (2.3)
– tool-mkspiffs @ 1.200.0 (2.0)
– toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies…
Dependency Graph
|– ESP Async WebServer @ 1.2.3
|– ESP8266WiFi @ 1.0
|– ESPAsyncTCP @ 1.2.2
|– LittleFS @ 0.1.0
Building in release mode
Building file system image from ‘data’ directory to .pio\build\esp12e\littlefs.bin
Looking for upload port…
Auto-detected: COM5
Uploading .pio\build\esp12e\littlefs.bin
usage: esptool write_flash [-h] [–erase-all]
[–flash_freq {keep,40m,26m,20m,80m}]
[–flash_mode {keep,qio,qout,dio,dout}]
[–flash_size FLASH_SIZE]
[–spi-connection SPI_CONNECTION] [–no-progress]
[–verify] [–encrypt]
[–ignore-flash-encryption-efuse-setting]
[–compress | –no-compress]
<address> <filename> [<address> <filename> …]esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: ‘.pio\\build\\esp12e\\littlefs.bin’
*** [uploadfs] Error 2
======================= [FAILED] Took 2.40 seconds =======================
* The terminal process “C:\Users\USER\.platformio\penv\Scripts\platformio.exe ‘run’, ‘–target’, ‘uploadfs’, ‘–environment’, ‘esp12e'” terminated with exit code: 1.
*********THIS IS THE OUTPUT FOR THE BUILDFS TASK THAT SUCCEEDS***********
Executing task: C:\Users\USER\.platformio\penv\Scripts\platformio.exe run –target buildfs –environment esp12e
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
————————————————————————–Verbose mode can be enabled via `-v, –verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 (4.2.1) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
– framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
– tool-esptool @ 1.413.0 (4.13)
– tool-esptoolpy @ 1.30000.201119 (3.0.0)
– tool-mklittlefs @ 1.203.210628 (2.3)
– tool-mkspiffs @ 1.200.0 (2.0)
– toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies…
Dependency Graph
|– ESP Async WebServer @ 1.2.3
|– ESP8266WiFi @ 1.0
|– ESPAsyncTCP @ 1.2.2
|– LittleFS @ 0.1.0
Building in release mode
Building file system image from ‘data’ directory to .pio\build\esp12e\littlefs.bin
====================== [SUCCESS] Took 2.22 seconds ======================
* Terminal will be reused by tasks, press any key to close it.
Hello Sara ( Sorry I mis-spelled it before).
OK I found the problem, and it is working now.
I recently changed my security program to Trend and it was blocking some Littlefs functionality. The previous security, Avast always had pop-ups when blocking but this Trend seems to default to “do not make a fuss just block it”, Or else I clicked on something!
These are the files that were blocked.
“C:\Users\USER\.platformio\packages\toolchain-xtensa\bin\xtensa-lx106-elf-ar.exe”
“C:\Users\USER\.platformio\packages\toolchain-xtensa\libexec\gcc\xtensa-lx106-elf\10.3.0\cc1.exe”
“C:\Users\USER\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\bin\as.exe”
“C:\Users\USER\.platformio\packages\tool-mklittlefs\mklittlefs.exe”
Sorry to have wasted your time. If it had happened 2 months ago I would have caught it straight away.
Regards .
Alan.