Skip to content

Commit 2c71408

Browse files
committed
Added batch for Windows quick build
1 parent f490215 commit 2c71408

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

Diff for: README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ and uploads the image to ESP32 flash memory.
1212
## Notes for FatFS
1313

1414
- On Arduino IDE menu: *Tools > Partition Scheme* select one with FAT partition
15-
- The usable size of FAT partition is reduced with 1 sector of 4096 bytes (0x1000) to resolve wear leveling space requirement
16-
- For same reason, the image file is flashed with +4096 bytes (0x1000) offset of partition address csv table entry
15+
- The usable size of FAT partition is reduced with 1 sector of 4096 bytes (0x1000) to resolve wear leveling space requirement. Also file is flashed with +4096 bytes (0x1000) offset of partition address csv table entry
1716
- 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)
1817
- 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)
1918
>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.
@@ -27,7 +26,7 @@ if (!FFat.begin(0, "", 1)) die("Fat FS mount failed. Not enough RAM?");
2726
- Download the tool from [here](https://github.com/lorol/arduino-esp32fs-plugin/releases/download/2.0/esp32fs.zip)
2827
- In your Arduino sketchbook directory, create tools directory if it doesn't exist yet.
2928
- Unpack the tool into tools directory (the path will look like ```<home_dir>/Arduino/tools/ESP32FS/tool/esp32fs.jar```).
30-
- For LITTLEFS, you need an additional [mklittlefs tool](https://github.com/earlephilhower/mklittlefs) Download the [release](https://github.com/earlephilhower/mklittlefs/releases)
29+
- For LITTLEFS, you need an additional [mklittlefs tool](https://github.com/earlephilhower/mklittlefs) Download the [release](https://github.com/earlephilhower/mklittlefs/releases) or see below
3130
- For FatFS, you need additional binary files for Windows and Linux (thanks @lbernstone for compiling) or take it 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)
3231
- Copy **mklittlefs[.exe]** and **mkfatfs[.exe]** to **/tools** folder of esp32 platform where **espota** and **esptool** (.py or.exe) tools are located
3332
- Alternatively see [here](https://github.com/lorol/arduino-esp32fs-plugin/releases/tag/2.0) , there are copy of the binaries. You can also use **package_esp32_index.template.json** and run get.py instead
@@ -41,10 +40,19 @@ if (!FFat.begin(0, "", 1)) die("Fat FS mount failed. Not enough RAM?");
4140
- Create a directory named `data` and any files you want in the file system there.
4241
- Make sure you have selected a board, port, and closed Serial Monitor.
4342
- Select *Tools > ESP32 Sketch Data Upload* menu item. This should start uploading the files into ESP32 flash file system.
44-
- When prompted, select SPIFFS or LITTLEFS image you want to make from your data folder.
43+
- On drop-down list select SPIFFS, LITTLEFS or FATFS you want to make from your data folder.
4544

4645
When done, IDE status bar will display the status of Image Uploaded message. Might take a few minutes for large file system sizes.
4746

47+
## Quick build on Win:
48+
49+
- Install Java JDK
50+
- Find the path of javac.exe and jar.exe
51+
- Edit make_win.bat accordingly
52+
- 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**
53+
- Run **make_win.bat**
54+
- Find the **build jar** in /bin directory
55+
4856
## Credits and license
4957

5058
- Copyright (c) 2015 Hristo Gochkov (hristo at espressif dot com)

Diff for: src/bin/placeholder

Whitespace-only changes.

Diff for: src/make_win.bat

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
del bin\*.*
2+
"C:\Program Files (x86)\Java\jdk1.8.0_152\bin\javac.exe" -target 1.8 -cp ".;arduino-core.jar;commons-codec-1.7.jar;pde.jar" -d bin ESP32FS.java
3+
cd bin
4+
"C:\Program Files (x86)\Java\jdk1.8.0_152\bin\jar.exe" cvfM esp32fs.jar *
5+
pause

0 commit comments

Comments
 (0)