Skip to content

Commit ea89bb4

Browse files
Allow override via preferences.txt for partition scheme
1 parent 278ffa0 commit ea89bb4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ echo "lib_path: $lib_path"
1919
set -e
2020

2121
mkdir -p bin
22-
javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
22+
javac -source 1.8 -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
2323
-d bin src/ESP32FS.java
2424

2525
pushd bin

src/ESP32FS.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,14 @@ private void createAndUpload(){
219219
return;
220220
}
221221

222+
String boardId = BaseNoGui.getTargetBoard().getId();
223+
String customPartitionScheme = PreferencesData.get("custom_PartitionScheme");
224+
if (customPartitionScheme != null && customPartitionScheme.startsWith(boardId)) {
225+
partitions = customPartitionScheme.substring(boardId.length() + 1);
226+
}
227+
222228
File partitionsFile = new File(platform.getFolder() + "/tools/partitions", partitions + ".csv");
229+
System.out.println("Using partition file : " + partitionsFile);
223230
if (!partitionsFile.exists() || !partitionsFile.isFile()) {
224231
System.err.println();
225232
editor.statusError("SPIFFS Error: partitions file " + partitions + ".csv not found!");

0 commit comments

Comments
 (0)