Giter VIP home page Giter VIP logo

arduino-esp32fs-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arduino-esp32fs-plugin's Issues

Can I use this plugin to create sketch+data firmware (.bin)

How can I create a .bin file that I can pass to a third party user so that he can fully update the arduino esp32 without using any development environment - that is, no special programs and no hassle, the best way is to execute .bat?

.jar not .java??

The ESP32FS plugin, should it not be a .jar file? its a .java.....

Wrong "SPIFFS_write error(-10001): File system is full." ?

Hello
I am using the ver 1.0 of the tool in Arudino 1.8.7 with ESP32 core 1.0.1
I have a filesystem, flat, no directory, of size of 1249718 bytes (1306624 occupied on NTFS file system), composed by 27 files.
When trying to pack and flash it I get this error:

SPIFFS_write error(-10001): File system is full.



error adding file!


SPIFFS Create Failed!

I am using the ESP32 DEV target, 4Mb of Flash with Default partition scheme.
According to the core cvs:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x140000,
app1,     app,  ota_1,   0x150000,0x140000,
eeprom,   data, 0x99,    0x290000,0x1000,
spiffs,   data, spiffs,  0x291000,0x16F000,

The SPIFFS size should be 0x16F000 = 1503232 bytes, so there is approximately 250KB of margin, so I do not understand why the tool says the filesystem is full
I need to go below 1090KB to make it working

Compressed 1503232 bytes to 407675...


Writing at 0x00291000... (4 %)
Writing at 0x00295000... (8 %)
Writing at 0x00299000... (12 %)
................................................................
Writing at 0x002ed000... (96 %)
Writing at 0x002f1000... (100 %)
Wrote 1503232 bytes (407675 compressed) at 0x00291000 in 10.4 seconds (effective 1156.2 kbit/s)...

You see that the 1090KB are compressed down to 407675 bytes, so the tool in my opinion should check the compressed size in the end, but still it seems it miscalculate the size of the files

SPIFFS Error: esptool not found!

Hello. The latest version of ESP32FS (file ESP32FS-1.0.zip dated 2019/01/15) does not work, showing error "SPIFFS Error: esptool not found!" when trying to upload data.

I am using Arduino IDE 1.8.8 and Arduino core installed through "Instructions for Windows" during this week.

java.lang.NumberFormatException: For input string: ""

I get the following error trying to upload using this plugin:

Any clues valued.

Arduino: 1.8.8 (Mac OS X), Board: "ESP32 Dev Module, Disabled, Default, 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"

java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:592)
	at java.lang.Integer.parseInt(Integer.java:615)
	at com.esp32.mkspiffs.ESP32FS.parseInt(ESP32FS.java:156)
	at com.esp32.mkspiffs.ESP32FS.createAndUpload(ESP32FS.java:242)
	at com.esp32.mkspiffs.ESP32FS.run(ESP32FS.java:378)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
For input string: ""

pyserial error when trying to use tool on OSX Big Sur

When trying to use the tool on Mac OSX Big Sur, esptool fails to execute.

Traceback (most recent call last):
  File "esptool.py", line 57, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports.py", line 29, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_posix.py", line 31, in <module>
  File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
  File "serial/tools/list_ports_osx.py", line 32, in <module>
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
Failed to execute script esptool
SPIFFS Upload failed!

I believe this is similar to the problem experienced with the arduino esp32 core (as mentioned here).

ESP32 Sketch Data Upload won't upload after a month of uploading

I am having the most bizarre issue ever. I've been using this plugin for the past month, but today it stopped working. It won't upload anything. It outputs no error. It just does not upload. One moment it worked, the next it didn't.
The flash memory was always formatted using SPIFFS.format().

Now I am trying to upload one simple .txt file, namely inputs.txt and it just doesn't want to upload it.

#include <SPIFFS.h>

void setup() {
  Serial.begin(115200);
  delay(2000);
  if(!SPIFFS.begin(true)){
    Serial.println("Couldn't mount SPIFFS. Formatting... ");
  }
  Serial.println(SPIFFS.exists("/inputs.txt"));
}

void loop() {
  // put your main code here, to run repeatedly:

}

The output of Serial.println(SPIFFS.exists("/inputs.txt")); is 0.

How could it just stop working ?

SPIFFS_write error(-10010): unknown

Thanks so much for releasing this tool, I was waiting on this to continue work on my project (FlyballETS)

I have made an angular v5 web app using Angular-CLI which needs to go on the SPIFFS filesystem. The angular-cli build generates the necessary files for production use. I have uploaded a data.zip file containing the output of this production build: Link

When I put the contents of this zip file in a /data/ folder of my arduino sketch and run the ESP32 Sketch Data Upload, I get the following error:

[SPIFFS] data   : C:\Users\alexg\OneDrive\Projects\FlyballETS-Software\data
[SPIFFS] start  : 2691072
[SPIFFS] size   : 1468
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
/3rdpartylicenses.txt
/assets/mdi.svg
/favicon.ico
/glyphicons-halflings-regular.448c34a56d699c29117a.woff2

SPIFFS_write error(-10010): unknown
error adding file!
SPIFFS Create Failed!

I did some testing and it seems the file name length is the problem, I tried just uploading one file from the package and then started renaming it using trial and error:

NOK	: inline.a44fd682ff3096930d6e.bundle.js
OK	: inline.a44fd6823693.bundle.js
OK	: inline.a44fd68236933.bundle.js
NOK	: inline.a44fd682369333.bundle.js

The 3rd line is 30 characters, 4th line is 31 chars.

Where to place this file in Arduino IDE 2.0 for Mac OS?

I've been finding very limited information about this tool.

First, I've downloaded the zip and it contains just one file: "esp32fs.jar". I've tried to run this .jar from the finder, but it doesn't work. Should it be placed in any specific folder?

I've been reading that it has to be moved to "tools" folder. But Arduino IDE for Mac OS doesn't have any "tools" folder.

I'm stuck here.

Thank you.
Regards

File are corrupt that I upload using this tool.

IF I try to read a file that I uploaded using the tool then it will output special characters and then the ESP32 will reboot when the Watchdog reboots it.

If I create the file with the same data using a sample SPIFF sketch then the file is OK.

wrong flash address for ESP-S3?

I'm trying to upload to the following board: Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "XIAO_ESP32S3, Disabled, Disabled, QIO 80MHz, 8MB (64Mb), Core 1, Core 1, Hardware CDC and JTAG, Enabled, Disabled, Disabled, UART0 / Hardware CDC, Default with spiffs (3MB APP/1.5MB SPIFFS), 240MHz (WiFi), 921600, None, Disabled"

When I do, I receive the following error; it looks like it's picking the wrong offset or address somehow. Is there some method for changing the start address? I'm trying to upload 130KB of data.

[SPIFFS] data : C:\Users\3ricj\Documents\GitHub\lightmacro\data
[SPIFFS] start : 6750208
[SPIFFS] size : 1536
[SPIFFS] page : 256
[SPIFFS] block : 4096
/index.htm
/jquery-3.6.0.min.js
/rangeslider.css
/rangeslider.js
/rangeslider.min.js
[SPIFFS] upload : C:\Users\3ricj\AppData\Local\Temp\arduino_build_755263/lightmacro.spiffs.bin
[SPIFFS] address: 6750208
[SPIFFS] port : COM5
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v4.5.1
Serial port COM5
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:54:75:d8:e8:14
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB

A fatal error occurred: File C:\Users\3ricj\AppData\Local\Temp\arduino_build_755263/lightmacro.spiffs.bin (length 1572864) at offset 6750208 will not fit in 4194304 bytes of flash. Use --flash_size argument, or change flashing address.
SPIFFS Upload failed!

Error for adding contents from images/fonts

When trying to upload image or font files (in my case PNG, SVG and WOFF files), the upload log says:

SPIFFS_write error(-10010): unknown error adding file!
Error for adding content from images!

Or fonts respectively instead of images.
Those files then don't show up on the board.
All other files work just fine.
I am using the original ESP32 Dev Module.

error: Invalid argument or value after --chip (argument #2) 1.0.2 rc1

Hi, there is again the issue with the 1.0.2 rc1 release. I have this error:

[SPIFFS] upload : C:\Users\gregorro\AppData\Local\Temp\arduino_build_409084/TestAsync.spiffs.bin
[SPIFFS] address: 2691072
[SPIFFS] port : COM4
[SPIFFS] speed : 512000
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

error: Invalid argument or value after --chip (argument #2)

SPIFFS Upload failed!

Doesn't work on Arduino Version 2.0.0

Following your steps and installing ESP32 on my computer (Windows).
Arduino upper version as 2.0.0 doesn't work.
Arduino lower version as 2.0.0 works.

Creating SPIFFS crashes

I installed the SPIFFS Toll like described in the installation part.

Arduino: 1.6.8
actual Arduino-ESP32 Core.
I installed the Tool in the \Documents\Arduino\hardware\espressif\esp32\tools folder

After starting the toll from the Arduino IDE I get this error:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: processing.app.Sketch.getBuildPath()Ljava/io/File;
	at com.esp32.mkspiffs.ESP32FS.getBuildFolderPath(ESP32FS.java:118)
	at com.esp32.mkspiffs.ESP32FS.createAndUpload(ESP32FS.java:319)
	at com.esp32.mkspiffs.ESP32FS.run(ESP32FS.java:378)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Error when trying to use tool on MacOS Monterey

when I trying to use tool on MacOS Monterey

_>Traceback (most recent call last): ->esptool.py v3.2-dev _> File "/Users/n/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/esptool.py", line 4930, in <module> _> _main() _> File "/Users/n/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/esptool.py", line 4923, in _main _> main() _> File "/Users/n/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/esptool.py", line 4370, in main ->Serial port /dev/cu.usbserial-2130 SPIFFS Upload failed! _> esp = esp or get_default_connected_device(ser_list, port=args.port, connect_attempts=args.connect_attempts, _> File "/Users/n/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/esptool.py", line 122, in get_default_connected_device _> _esp = chip_class(each_port, initial_baud, trace) _> File "/Users/n/Library/Arduino15/packages/esp32/hardware/esp32/2.0.2/tools/esptool.py", line 326, in __init__ _> self._port = serial.serial_for_url(port) _>AttributeError: module 'serial' has no attribute 'serial_for_url'

Arduino IDE: SPIFFS Not Supported on arduino-esp32

Hi! Came to problem where Arduino IDE does not allow to upload to esp32 . When pushing "ESP32 Sketch Data Upload" it just warns about: SPIFFS Not Supported on arduino-esp32. Tried Arduino 1.8.5. and 1.85 (I am on Windows 10) with no luck. Compilation and upload of firmware works fine.

SPIFFS + ESP32 Sketch Data Upload Problem

Hardware:
Board: ?ESP32 Dev Module?
Core Installation/update date: latest
IDE name: Arduino IDE
Flash Frequency: 40Mhz?
Upload Speed: 115200

Description:
Hello.
I need help.
I have WROOM-32 ESP32 module.
In folder of my ino-project I created folder โ€˜dataโ€™ and put into it some files: css, html, txt by ESP32 Sketch Data Upload (https://github.com/me-no-dev/arduino-esp32fs-plugin), I have uploaded them successfully to my module.
When I try to read file from SPIFFS (previously mounted SPIFFS, of course) (latest arduino-esp32, https://github.com/espressif/arduino-esp32), listDir(SPIFFS, "/", 0) - OK; but while I use readFile(SPIFFS, "/style.css"); there is some trash, but no correct data. When I use write and read file, which was NOT uploaded by ESP32 Sketch Data Upload, it is OK.

By the way, I noticed string: flash read err, 1000 ets_main.c 371

Any ideas?
Thanks.

Sketch:
Debug Messages:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:956
load:0x40078000,len:0
load:0x40078000,len:13076
entry 0x40078a58

Starting device...
ESP32 Chip ID: 9238022
FreeHeap: 126324
ChipRevision: 1
CpuFreqMHz: 240
SdkVersion: v3.1-dev-239-g1c3dd23f-dirty
FlashChipSize: 4194304
FlashChipSpeed: 40000000
FlashChipMode: 2

SPIFFS Mount succesfull:
Listing directory: /
FILE: /door.png SIZE: 846
FILE: /favicon.ico SIZE: 239
FILE: /index.html SIZE: 4875
FILE: /logo.png SIZE: 5075
FILE: /profile.png SIZE: 898
FILE: /style.css SIZE: 5844
FILE: /style.txt SIZE: 101
FILE: /variables.txt SIZE: 41

Started WiFi Station Terminal Access (STA) regim
Current SSID: myssid

ESP32 MAC STA: [D][WiFiGeneric.cpp:293] _eventCallback(): Event: 2 - STA_START
30:AE:A4:06:F6:8C
[D][WiFiGeneric.cpp:293] _eventCallback(): Event: 1 - SCAN_DONE
[D][WiFiGeneric.cpp:293] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:293] _eventCallback(): Event: 7 - STA_GOT_IP

WiFi connected
WiFi channel: 1
WiFi RSSI: -56
192.168.200.162
Reading file: /style.css
Read from file: ัััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััััั

osx installation of tool

Hi,

I have osx and there is a problem if the sketchbook directory has changed:
in the description: On the OS X create the tools directory in ~/Documents/Arduino/ and unpack the files there

The directory name should be changed to "Setup->sketchbook location" in the description

Is this tool now unsupported?

I see that critical issues relating to various newer chips (S3's and C3's) have not been addressed in at least six months. Is this code unsupported now?

esp32s2

[SPIFFS] data : C:\Users\zyx\Desktop\sketch_aug29a\data
[SPIFFS] start : 2686976
[SPIFFS] size : 1472
[SPIFFS] page : 256
[SPIFFS] block : 4096
/index.html
[SPIFFS] upload : C:\Users\zyx\AppData\Local\Temp\arduino_build_540398/sketch_aug29a.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port : COM3
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

error: Invalid argument or value after --chip (argument #2)
SPIFFS Upload failed!

Not working over OTA with authentication enabled

Hi,

SPIFFS data uploader is not working over OTA with authentication turned on. I get error "Authentication failed". When I disable OTA authentication everything is OK.
I have version 1.0.4 of ESP32 Arduino libraries

Failed to Open Image File

I recieved an error like this

SPIFFS Create Failed!

[SPIFFS] data   : E:\RTXs Lab\git\Project\main\data

[SPIFFS] start  : 2686976

[SPIFFS] size   : 1408

[SPIFFS] page   : 256

[SPIFFS] block  : 4096

error: failed to open image file


SPIFFS Create Failed!

Please help me solve this error
tysm

Documentation issues (e.g., "mkspiffs not found", broken links)

Arduino 1.8.4 on Windows with latest Arduino-ESP32.

In attempting this I get the error "SPIFFS Error: mkspiffs not found!" I see another issue here where you mention you can't distribute mkspiffs (as well as notation in the commit history on Arduino-ESP32).

Is the proper mkspiffs available elsewhere for the user to install separately? It'd be useful info to have in the README as to where that tool is and how to install it.

Also, the README has a broken link to the release page as well as a broken example snapshot link.

Edit: it'd also be good to mention that Arduino tools can also be installed in a tools folder in the Arduino workspace (at the same level as the hardware and libraries folders). That keeps users from losing their tools on subsequent upgrades.

Question with executable jar file

Hello, i was wondering if it's possible to use this jar file with start-up commands, without the arduino IDE like:

java -jar esp32fs.jar -folder /data -output data.bin -scheme 1M.cvs

My question is, are these avaible for standalone use?

Latest Arduino ESP32 1.0.1 rc2 doesn't work with the tool

There is seems issue to upload SPIFFS. What can be the problem?

[SPIFFS] upload : C:\Users\gregorro\AppData\Local\Temp\arduino_build_361363/TestAsync.spiffs.bin
[SPIFFS] address: 2691072
[SPIFFS] port : COM4
[SPIFFS] speed : 256000
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

error: Invalid argument or value after --chip (argument #2)

SPIFFS mount failed with error: -10025

Hello, I have tried to put to my ESP32 SPIFFS the jquery pages, however, during the upload, I have this error:

[SPIFFS] data : C:\RH\Sources\RH\RemoteHomeArduinoSketches\WiFi_ESP32\PirSensor\data
[SPIFFS] start : 2691072
[SPIFFS] size : 1468
[SPIFFS] page : 256
[SPIFFS] block : 4096
/favicon.ico

/jquery/dataTables.jqueryui.min.js

SPIFFS mount failed with error: -10025

SPIFFS_write error(-10010): unknown

error adding file!

Error for adding content from jquery!

[SPIFFS] upload : C:\Users\gregorro\AppData\Local\Temp\arduino_build_971420/PirSensor.spiffs.bin
[SPIFFS] address: 2691072
[SPIFFS] port : COM24
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v2.1

Connecting........_

Chip is ESP32D0WDQ6 (revision 1)

Uploading stub...

Running stub...

Stub running...

Changing baud rate to 921600

Changed.

Configuring flash size...

Auto-detected Flash size: 4MB

Compressed 1503232 bytes to 4190...

Writing at 0x00291000... (100 %)
Wrote 1503232 bytes (4190 compressed) at 0x00291000 in 0.1 seconds (effective 150323.3 kbit/s)...

Hash of data verified.

What can be wrong???

Again: "SPIFFS Error: esptool not found!", MacOS12.6, ESP32 core 2.0.7

@me-no-dev : great work but I have no clue how it works and how I can determine whats wrong!

It worked with esp32 core 2.0.5

Environment:

  • MacOS Monterey
  • Arduino IDE 1.8.19
  • ESP32 core 2.0.7
  • arduino-esp32fs-plugin first 1.0, now 1.1 (march 6, 2023)

There is a "esptool" at "/Users/User/Library/Arduino15/packages/esp32/tools/esptool_py/4.5"

What can I do to make this work (again)?
What is the command-line command to make and flash a SPIFFS file system (the Arduino IDE does not show the command used .. which is a pitty).

Thanks in advance for your help!

ESP32 File System Mount Failed (GFX Library Imgviewer Animated Gif)

I have been trying to troubleshoot the issue regarding why the ESP32 file system is not mounting using the program from the GFX library. I have programmed the data using the ESP32 sketch data upload. The upload is only about 1.8kb in size. I keep receiving error code:

E (101) psram: PSRAM ID read error: 0xffffffff
ERROR: File System Mount Failed!

The code is posted below:

/*******************************************************************************

  • Animated GIF Image Viewer
  • This is a simple Animated GIF image viewer exsample
  • Image Source: https://www.pexels.com/video/earth-rotating-video-856356/
  • cropped: x: 598 y: 178 width: 720 height: 720 resized: 240x240
  • optimized with ezgif.com
  • Setup steps:
    1. Change your LCD parameters in Arduino_GFX setting
    1. Upload Animated GIF file
  • FFat (ESP32):
  • upload FFat (FatFS) data with ESP32 Sketch Data Upload:
    
  • ESP32: https://github.com/lorol/arduino-esp32fs-plugin
    
  • LittleFS (ESP32 / ESP8266 / Pico):
  • upload LittleFS data with ESP8266 LittleFS Data Upload:
    
  • ESP32: https://github.com/lorol/arduino-esp32fs-plugin
    
  • ESP8266: https://github.com/earlephilhower/arduino-esp8266littlefs-plugin
    
  • Pico: https://github.com/earlephilhower/arduino-pico-littlefs-plugin.git
    
  • SPIFFS (ESP32):
  • upload SPIFFS data with ESP32 Sketch Data Upload:
    
  • ESP32: https://github.com/lorol/arduino-esp32fs-plugin
    
  • SD:
  • Most Arduino system built-in support SD file system.
    
  • Wio Terminal require extra dependant Libraries:
    
  • - Seeed_Arduino_FS: https://github.com/Seeed-Studio/Seeed_Arduino_FS.git
    
  • - Seeed_Arduino_SFUD: https://github.com/Seeed-Studio/Seeed_Arduino_SFUD.git
    

*****************************************************************************/
/
Wio Terminal */
#if defined(ARDUINO_ARCH_SAMD) && defined(SEEED_GROVE_UI_WIRELESS)
#define GIF_FILENAME "/Blinking.gif"
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
#define GIF_FILENAME "/Blinking.gif"
#elif defined(ESP32)
#define GIF_FILENAME "/Blinking.gif"
#else
#define GIF_FILENAME "/Blinking.gif"
#endif

/*******************************************************************************

  • Start of Arduino_GFX setting
  • Arduino_GFX try to find the settings depends on selected board in Arduino IDE
  • Or you can define the display dev kit not in the board list
  • Defalult pin list for non display dev kit:
  • Arduino Nano, Micro and more: TFT_CS: 9, TFT_DC: 8, TFT_RST: 7, TFT_BL: 6
  • ESP32 various dev board : TFT_CS: 5, TFT_DC: 27, TFT_RST: 33, TFT_BL: 22
  • ESP32-C3 various dev board : TFT_CS: 7, TFT_DC: 2, TFT_RST: 1, TFT_BL: 3
  • ESP32-S2 various dev board : TFT_CS: 34, TFT_DC: 26, TFT_RST: 33, TFT_BL: 21
  • ESP8266 various dev board : TFT_CS: 15, TFT_DC: 4, TFT_RST: 2, TFT_BL: 5
  • Raspberry Pi Pico dev board : TFT_CS: 17, TFT_DC: 27, TFT_RST: 26, TFT_BL: 28
  • RTL872x various dev board : TFT_CS: 18, TFT_DC: 17, TFT_RST: 2, TFT_BL: 23
  • Seeeduino XIAO dev board : TFT_CS: 3, TFT_DC: 2, TFT_RST: 1, TFT_BL: 0
  • Teensy 4.1 dev board : TFT_CS: 39, TFT_DC: 41, TFT_RST: 40, TFT_BL: 22
    ******************************************************************************/
    #include <Arduino_GFX_Library.h>

/* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX gfx = create_default_Arduino_GFX();
#else /
!defined(DISPLAY_DEV_KIT) */

/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
Arduino_DataBus bus = new Arduino_ESP32SPI(27 / DC /, 5 / CS /, 18 / SCK /, 23 / MOSI /, -1 / MISO /, VSPI / spi_num */);

/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
Arduino_GFX gfx = new Arduino_GC9A01(bus, 7 / RST /, 0 / rotation /, true / IPS */);

#endif /* !defined(DISPLAY_DEV_KIT) /
/
******************************************************************************

  • End of Arduino_GFX setting
    ******************************************************************************/

/* Wio Terminal */
#if defined(ARDUINO_ARCH_SAMD) && defined(SEEED_GROVE_UI_WIRELESS)
#include <Seeed_FS.h>
#include <SD/Seeed_SD.h>
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
#include <LittleFS.h>
#include <SD.h>
#elif defined(ESP32)
#include <FFat.h>
// #include <LittleFS.h>
#include <SPIFFS.h>
#include <SD.h>
#elif defined(ESP8266)
#include <LittleFS.h>
#include <SD.h>
#else
#include <SD.h>
#endif

#include "GifClass.h"
static GifClass gifClass;

void setup()
{
Serial.begin(115200);

// Init Display
gfx->begin();
gfx->fillScreen(BLACK);

#ifdef TFT_BL
pinMode(TFT_BL, OUTPUT);
digitalWrite(TFT_BL, HIGH);
#endif

/* Wio Terminal /
#if defined(ARDUINO_ARCH_SAMD) && defined(SEEED_GROVE_UI_WIRELESS)
if (!SD.begin(SDCARD_SS_PIN, SDCARD_SPI, 4000000UL))
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
if (!LittleFS.begin())
// if (!SD.begin(SS))
#elif defined(ESP32)
if (!FFat.begin())
// if (!LittleFS.begin())
// if (!SPIFFS.begin())
// if (!SD.begin(SS))
#elif defined(ESP8266)
if (!LittleFS.begin())
// if (!SD.begin(SS))
#else
if (!SD.begin())
#endif
{
Serial.println(F("ERROR: File System Mount Failed!"));
gfx->println(F("ERROR: File System Mount Failed!"));
}
else
{
/
Wio Terminal */
#if defined(ARDUINO_ARCH_SAMD) && defined(SEEED_GROVE_UI_WIRELESS)
File gifFile = SD.open(GIF_FILENAME, "r");
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
File gifFile = LittleFS.open(GIF_FILENAME, "r");
// File gifFile = SD.open(GIF_FILENAME, "r");
#elif defined(ESP32)
File gifFile = FFat.open(GIF_FILENAME, "r");
// File gifFile = LittleFS.open(GIF_FILENAME, "r");
// File gifFile = SPIFFS.open(GIF_FILENAME, "r");
// File gifFile = SD.open(GIF_FILENAME, "r");
#elif defined(ESP8266)
File gifFile = LittleFS.open(GIF_FILENAME, "r");
// File gifFile = SD.open(GIF_FILENAME, "r");
#else
File gifFile = SD.open(GIF_FILENAME, FILE_READ);
#endif
if (!gifFile || gifFile.isDirectory())
{
Serial.println(F("ERROR: open gifFile Failed!"));
gfx->println(F("ERROR: open gifFile Failed!"));
}
else
{
// read GIF file header
gd_GIF *gif = gifClass.gd_open_gif(&gifFile);
if (!gif)
{
Serial.println(F("gd_open_gif() failed!"));
}
else
{
uint8_t *buf = (uint8_t *)malloc(gif->width * gif->height);
if (!buf)
{
Serial.println(F("buf malloc failed!"));
}
else
{
int16_t x = (gfx->width() - gif->width) / 2;
int16_t y = (gfx->height() - gif->height) / 2;

      Serial.println(F("GIF video start"));
      uint32_t t_fstart, t_delay = 0, t_real_delay, delay_until;
      int32_t res;
      uint32_t duration = 0, remain = 0;
      while (1)
      {
        t_fstart = millis();
        t_delay = gif->gce.delay * 10;
        res = gifClass.gd_get_frame(gif, buf);
        if (res < 0)
        {
          Serial.println(F("ERROR: gd_get_frame() failed!"));
          break;
        }
        else if (res == 0)
        {
          Serial.print(F("rewind, duration: "));
          Serial.print(duration);
          Serial.print(F(", remain: "));
          Serial.print(remain);
          Serial.print(F(" ("));
          Serial.print(100.0 * remain / duration);
          Serial.println(F("%)"));
          duration = 0;
          remain = 0;
          gifClass.gd_rewind(gif);
          continue;
        }

        gfx->drawIndexedBitmap(x, y, buf, gif->palette->colors, gif->width, gif->height);

        t_real_delay = t_delay - (millis() - t_fstart);
        duration += t_delay;
        remain += t_real_delay;
        delay_until = millis() + t_real_delay;
        do
        {
          delay(1);
        } while (millis() < delay_until);
      }
      Serial.println(F("GIF video end"));
      Serial.print(F("duration: "));
      Serial.print(duration);
      Serial.print(F(", remain: "));
      Serial.print(remain);
      Serial.print(F(" ("));
      Serial.print(100.0 * remain / duration);
      Serial.println(F("%)"));

      gifClass.gd_close_gif(gif);
      free(buf);
    }
  }
}

}
}

void loop()
{
}

SPIFFS.begin failed to mount after uploading sketch data folder

It successfully upload sketch data folder, here is the console output:

[SPIFFS] data   : D:\Dropbox\Trial\TestSPIFFS\TestSPIFFS\data
[SPIFFS] start  : 2691072
[SPIFFS] size   : 1468
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
/test.txt

[SPIFFS] upload : C:\Users\INFINI~1\AppData\Local\Temp\arduino_build_382024/TestSPIFFS.spiffs.bin
[SPIFFS] address: 2691072
[SPIFFS] port   : COM4
[SPIFFS] speed  : 921600
[SPIFFS] mode   : dio
[SPIFFS] freq   : 80m

esptool.py v2.1-beta1

Connecting........_

Chip is ESP32D0WDQ6 (revision 0)

Uploading stub...

Running stub...

Stub running...

Changing baud rate to 921600

Changed.

Configuring flash size...

Auto-detected Flash size: 4MB

Compressed 1503232 bytes to 2109...


Writing at 0x00291000... (100 %)
Wrote 1503232 bytes (2109 compressed) at 0x00291000 in 0.0 seconds (effective 353700.0 kbit/s)...

Hash of data verified.



Leaving...

Hard resetting...

Then i tried to open the file with this simple code :

#include <FS.h>
#include <SPIFFS.h>

void setup() {
	Serial.begin(921600);
	if (SPIFFS.begin()) {
		Serial.println("SPIFFS MOUNTED");
	}
	else {
		Serial.println("SPIFFS MOUNT FAIL");
	}
	if (SPIFFS.exists("/test.txt")) {
		Serial.println("FILE EXIST");
	}
	else {
		Serial.println("FILE NOT EXIST");
	}
}

void loop() {
  
}

Can't mount SPIFFS, error :

E (372) SPIFFS: mount failed, -10025
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
SPIFFS MOUNT FAIL
[E][vfs_api.cpp:22] open(): File system is not mounted
FILE NOT EXIST

I can mount SPIFFS again using SPIFFS.begin(true) but ofc all files is deleted.

Didn't work for ESP32-C3

Hi,

I am under windows10/ARDUINO 1.8.13
I install this in /tools sub.
Trying to write in a ESP32-C3 dev I get the message :

esptool.py v3.1
Serial port COM11
Connecting....

A fatal error occurred: This chip is ESP32-C3 not ESP32. Wrong --chip argument?
SPIFFS Upload failed!

I there a way to fix this issue?

spiffs upload plugin doesn't support esp32-s3

Arduino IDE -> tool -> ESP32 sketch data upload, got the error

A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument?

I guess it's a easy fix to change the --chip paramter, but don't know how to config

Pb with esp32-S2 wemos S2 mini

Hello,

[SPIFFS] data : F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook_projets\voilier autonome\EMailSenderEsp32GMailSPIFFSAttachTest\data
[SPIFFS] start : 2686976
[SPIFFS] size : 1472
[SPIFFS] page : 256
[SPIFFS] block : 4096
/logo.jpg
/data.txt
/parcours6.gpx
[SPIFFS] upload : C:\Users\admin\AppData\Local\Temp\arduino_build_990233/EMailSenderEsp32GMailSPIFFSAttachTest.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port : COM7
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v4.2.1
Serial port COM7
Connecting........
Traceback (most recent call last):
File "esptool.py", line 34, in
File "esptool_init_.py", line 1004, in main
File "esptool_init
.py", line 646, in main
File "esptool_init_.py", line 895, in get_default_connected_device
File "esptool\loader.py", line 631, in connect
File "esptool\loader.py", line 572, in _connect_attempt
File "esptool\loader.py", line 435, in sync
File "esptool\loader.py", line 351, in command
File "serial\serialutil.py", line 372, in timeout
File "serial\serialwin32.py", line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'Un p๏ฟฝriph๏ฟฝrique attach๏ฟฝ au syst๏ฟฝme ne fonctionne pas correctement.', None, 31)
[5384] Failed to execute script 'esptool' due to unhandled exception!
SPIFFS Upload failed!
[SPIFFS] data : F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook_projets\voilier autonome\EMailSenderEsp32GMailSPIFFSAttachTest\data
[SPIFFS] start : 2686976
[SPIFFS] size : 1472
[SPIFFS] page : 256
[SPIFFS] block : 4096
/logo.jpg
/data.txt
/parcours6.gpx
[SPIFFS] upload : C:\Users\admin\AppData\Local\Temp\arduino_build_990233/EMailSenderEsp32GMailSPIFFSAttachTest.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port : COM7
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v4.2.1
Serial port COM7
Connecting...

A fatal error occurred: This chip is ESP32-S2 not ESP32. Wrong --chip argument?
SPIFFS Upload failed!
Library EthernetWebServer is already installed in: F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook\libraries\EthernetWebServer
Library Functional-Vlpp is already installed in: F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook\libraries\Functional-Vlpp
Library Ethernet_Generic is already installed in: F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook\libraries\Ethernet_Generic
java.util.ConcurrentModificationException
java.lang.RuntimeException: java.util.ConcurrentModificationException
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onInstallPressed$4(LibraryManagerUI.java:250)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
at java.util.LinkedList$ListItr.next(LinkedList.java:888)
at processing.app.packages.LibraryList.getByName(LibraryList.java:61)
at cc.arduino.contributions.libraries.LibrariesIndexer.addToInstalledLibraries(LibrariesIndexer.java:132)
at cc.arduino.contributions.libraries.LibrariesIndexer.scanLibrary(LibrariesIndexer.java:221)
at cc.arduino.contributions.libraries.LibrariesIndexer.scanInstalledLibraries(LibrariesIndexer.java:203)
at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:163)
at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:681)
at processing.app.Base.onBoardOrPortChange(Base.java:1339)
at processing.app.Base$8.onIndexesUpdated(Base.java:1373)
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onInstallPressed$4(LibraryManagerUI.java:244)
... 1 more
Library EthernetWebServer is already installed in: F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook\libraries\EthernetWebServer
java.util.ConcurrentModificationException
java.lang.RuntimeException: java.util.ConcurrentModificationException
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onInstallPressed$4(LibraryManagerUI.java:250)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
at java.util.LinkedList$ListItr.next(LinkedList.java:888)
at processing.app.packages.LibraryList.getByName(LibraryList.java:61)
at cc.arduino.contributions.libraries.LibrariesIndexer.addToInstalledLibraries(LibrariesIndexer.java:132)
at cc.arduino.contributions.libraries.LibrariesIndexer.scanLibrary(LibrariesIndexer.java:231)
at cc.arduino.contributions.libraries.LibrariesIndexer.scanInstalledLibraries(LibrariesIndexer.java:203)
at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:163)
at cc.arduino.contributions.libraries.LibraryInstaller.rescanLibraryIndex(LibraryInstaller.java:200)
at cc.arduino.contributions.libraries.LibraryInstaller.install(LibraryInstaller.java:122)
at cc.arduino.contributions.libraries.LibraryInstaller.install(LibraryInstaller.java:110)
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onInstallPressed$4(LibraryManagerUI.java:242)
... 1 more
La bibliothรจque est dรฉjร  installรฉe: WiFiMulti_Generic: 1.2.2
La bibliothรจque est dรฉjร  installรฉe: Functional-Vlpp: 1.0.1
La bibliothรจque est dรฉjร  installรฉe: ArduinoSTL: 1.3.3
La bibliothรจque est dรฉjร  installรฉe: ESP_AT_Lib: 1.4.1
[SPIFFS] data : F:\arduino 2022 10\arduino-1.8.19\portable\sketchbook_projets\voilier autonome\EMailSenderEsp32GMailSPIFFSAttachTest\data
[SPIFFS] start : 2686976
[SPIFFS] size : 1472
[SPIFFS] page : 256
[SPIFFS] block : 4096
/logo.jpg
/data.txt
/parcours6.gpx
[SPIFFS] upload : C:\Users\admin\AppData\Local\Temp\arduino_build_990233/EMailSenderEsp32GMailSPIFFSAttachTest.spiffs.bin
[SPIFFS] address: 2686976
[SPIFFS] port : COM7
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v4.2.1
Serial port COM7
Connecting...
Traceback (most recent call last):
File "esptool.py", line 34, in
File "esptool_init_.py", line 1004, in main
File "esptool_init
.py", line 646, in main
File "esptool_init_.py", line 895, in get_default_connected_device
File "esptool\loader.py", line 631, in connect
File "esptool\loader.py", line 572, in _connect_attempt
File "esptool\loader.py", line 435, in sync
File "esptool\loader.py", line 351, in command
File "serial\serialutil.py", line 372, in timeout
File "serial\serialwin32.py", line 222, in _reconfigure_port
serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: PermissionError(13, 'Un p๏ฟฝriph๏ฟฝrique attach๏ฟฝ au syst๏ฟฝme ne fonctionne pas correctement.', None, 31)
[8252] Failed to execute script 'esptool' due to unhandled exception!
SPIFFS Upload failed!

Is the ESP32-C3 Supported?

I've been using your nifty plugin for some time in the Arduino IDE (v 1.8.19) for using SPIFFS in my projects.

I recently bought the cute XAIO dev board with an ESP32-C3 processor. The application compiles fine, but when I try to upload the contents of the data directory using the 'ESP32 Sketch Data Upload' option under tools, I get the following:

[SPIFFS] data : C:\Users\johnp\OneDrive\Documents\Arduino\DigameTRAFx_2\data
[SPIFFS] start : 3997696
[SPIFFS] size : 128
[SPIFFS] page : 256
[SPIFFS] block : 4096
/Digame_Logo_Full_Color.png
/Digame_Logo_Full_Color_2.jpg
/favicon.ico
/index.html
/style.css
[SPIFFS] upload : C:\Users\johnp\AppData\Local\Temp\arduino_build_962618/DigameTRAFx_2.spiffs.bin
[SPIFFS] address: 3997696
[SPIFFS] port : COM5
[SPIFFS] speed : 921600
[SPIFFS] mode : dio
[SPIFFS] freq : 80m

esptool.py v4.5.1
Serial port COM5
Connecting....

A fatal error occurred: This chip is ESP32-C3 not ESP32. Wrong --chip argument?
SPIFFS Upload failed!

Is there a way for me to change the target chip from ESP32 to ESP32-C3?

Many thanks for a very useful plugin!

Cannot OTA on 'fresh' ESP32-CAM

On a 'freshly unpacked' ESP32-CAM (aka AI-cam) SPIFFS OTA upload is not working, Arduino IDE says 'No response'.
Steps -

  • compile ota sketch and prepare data dir
  • ftdi upload sketch
  • disconnect ftdi and reset board
    at this moment further OTA sketch uploads work fine but SPIFFS OTA not at all - No response
  • reconnect ftdi (gnd-IO0-reset)
  • upload SPIFFS tru COMxx - works fine
  • disconnect gnd and IO0, reset
    at this moment all OTA uploads work fine (leaving or disconnecting ftdi does not matter)

repeatable on all AI-Cam boards I could find (over 10 of them)..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.