Skip to content

Commit eeb21f3

Browse files
authored
Merge branch 'master' into fix_merge
2 parents aaa5335 + 9efcdb7 commit eeb21f3

File tree

5 files changed

+602
-544
lines changed

5 files changed

+602
-544
lines changed

README.md

+61-8
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,87 @@
11
# Arduino ESP32 filesystem uploader
22

3-
Arduino plugin which packs sketch data folder into SPIFFS filesystem image,
4-
and uploads the image to ESP32 flash memory.
3+
- Arduino plugin which packs sketch data folder into SPIFFS, LittleFS or FatFS filesystem image,
4+
and uploads the image to ESP32 flash memory.
5+
- Added a choice to "Erase all flash"
6+
- You can have only one of three filesystems on same Arduino project.
7+
8+
## Notes for SPIFFS
9+
10+
- This is the default filesystem implemented in esp-32 core for /data folder
11+
- Go to Arduino IDE menu: ***Tools > Partition Scheme*** and select an entry with SPIFFS partition
12+
13+
14+
## Notes for LittleFS
15+
16+
- Same partition scheme as SPIFFS
17+
- Until implemented to esp-32 core needs extra library
18+
- See [LITTLEFS esp32 library](https://github.com/lorol/LITTLEFS) for more details
19+
- You need an additional [mklittlefs tool](https://github.com/earlephilhower/mklittlefs) . Download the [release](https://github.com/earlephilhower/mklittlefs/releases) or find it [archived at latest release here](https://github.com/lorol/arduino-esp32fs-plugin/releases )
20+
- Copy **mklittlefs[.exe]** to **/tools** folder of esp32 platform where **espota** and **esptool** (.py or.exe) tools are located
21+
22+
## Notes for FatFS
23+
24+
- Go to Arduino IDE menu: ***Tools > Partition Scheme*** and select an entry with FAT partition
25+
- You need additional binary files for Windows or Linux, thanks [@lbernstone](https://github.com/lbernstone) for compiling - or take them from the author [here - mkfatfs tool](https://github.com/labplus-cn/mkfatfs/releases/tag/v1.0) , thanks to [labplus-cn](https://github.com/labplus-cn/mkfatfs) or take from [archived at latest release here](https://github.com/lorol/arduino-esp32fs-plugin/releases )
26+
- Copy **mkfatfs[.exe]** to **/tools** folder of esp32 platform where **espota** and **esptool** (.py or.exe) tools are located
27+
- The usable size of FAT partition is reduced with 1 sector of 4096 bytes (0x1000) to resolve wear leveling space requirement. The image file is flashed with +4096 bytes (0x1000) offset of partition address of csv table entry
28+
- You may need to decrease **maxOpenFiles** at FFat.begin() of your sketch , [see this note](http://marc.merlins.org/perso/arduino/post_2019-03-30_Using-FatFS-FFat-on-ESP32-Flash-With-Arduino.html)
29+
>The FFAT module uses 8KB plus 4KB per concurrent file that can be opened. By default, it allows 10 files to be opened, which means it uses 48KB. IF you want to reduce its memory use, you can tell it to only support one file, and you will save 36KB, leaving you with only 12KB used.
30+
```
31+
if (!FFat.begin(0, "", 1)) die("Fat FS mount failed. Not enough RAM?");
32+
```
33+
- To flash the data folder as FAT partition by **network port (uses espota)**, replace your esp32-core Update library with the [modified files here](https://github.com/lorol/arduino-esp32fatfs-plugin/tree/master/extra/esp32-modified-Update-lib-ffat-espota.zip)
534

635
## Installation
736

837
- Make sure you use one of the supported versions of Arduino IDE and have ESP32 core installed.
9-
- Download the tool archive from [releases page](https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/latest).
38+
- Download **esp32fs.zip** zipped tool from [latest release](https://github.com/lorol/arduino-esp32fs-plugin/releases)
1039
- In your Arduino sketchbook directory, create tools directory if it doesn't exist yet.
1140
- Unpack the tool into tools directory (the path will look like ```<home_dir>/Arduino/tools/ESP32FS/tool/esp32fs.jar```).
41+
- Make sure you have **mklittlefs[.exe]** and **mkfatfs[.exe]** available at **/tools** folder or in sub-folder there
42+
- See at [latest release](https://github.com/lorol/arduino-esp32fs-plugin/releases) for copies of archived binaries in question.
43+
- You can also use provided **package_esp32_index.template.json** to run **get.py** with it and download the missing binary files
1244
- Restart Arduino IDE.
1345

14-
On the OS X create the tools directory in ~/Documents/Arduino/ and unpack the files there
15-
1646
## Usage
1747

1848
- Open a sketch (or create a new one and save it).
1949
- Go to sketch directory (choose Sketch > Show Sketch Folder).
2050
- Create a directory named `data` and any files you want in the file system there.
21-
- Make sure you have selected a board, port, and closed Serial Monitor.
22-
- Select *Tools > ESP32 Sketch Data Upload* menu item. This should start uploading the files into ESP32 flash file system.
51+
- Make sure you have selected a board, port, partition scheme and closed Serial Monitor.
52+
- Select ***Tools > ESP32 Sketch Data Upload*** menu item.
53+
- On drop-down list, select SPIFFS, LittleFS or FatFS you want to make from your /data folder.
54+
- Clicking OK should start uploading the files into ESP32 flash file system.
55+
56+
When done, IDE status bar will display the status of Image Uploaded message. Might take a few minutes for large file system sizes.
57+
58+
## Screenshot
59+
60+
![Screenshot](tool.png)
61+
62+
## Quick build on Win:
2363

24-
When done, IDE status bar will display SPIFFS Image Uploaded message. Might take a few minutes for large file system sizes.
64+
- Install Java JDK
65+
- Find the path of javac.exe and jar.exe
66+
- Edit **make_win.bat** accordingly
67+
- Copy files **arduino-core.jar , commons-codec-1.7.jar , pde.jar** from your Arduino IDE installation to the folder where is located **make_win.bat**
68+
- Run **make_win.bat**
69+
- Find the **jar** file in /bin directory
2570

2671
## Credits and license
2772

73+
### The Original Arduino ESP32 filesystem uploader
74+
2875
- Copyright (c) 2015 Hristo Gochkov (hristo at espressif dot com)
2976
- Licensed under GPL v2 ([text](LICENSE))
3077
- Maintained by Hristo Gochkov (hristo at espressif dot com)
3178

79+
### Other people, sources and binary files
80+
81+
- https://github.com/earlephilhower
82+
- https://github.com/labplus-cn/mkfatfs
83+
- https://github.com/lbernstone
84+
3285
## Issues and suggestions
3386

3487
File issues here on github, or ask your questions on the [esp32.com forum](http://esp32.com).

0 commit comments

Comments
 (0)