Skip to content

Commit 387bbe0

Browse files
committed
Merge remote-tracking branch 'menodev/master'
2 parents e5a022c + 9ef3bcd commit 387bbe0

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Diff for: make.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
if [[ -z "$INSTALLDIR" ]]; then
44
INSTALLDIR="$HOME/Documents/Arduino"
55
fi
6+
if [[ -z "$IDEDIR" ]]; then
7+
IDEDIR="/Applications/Arduino.app/Contents/Java/"
8+
#IDEDIR="../../../"
9+
fi
610
echo "INSTALLDIR: $INSTALLDIR"
711

8-
pde_path=`find ../../../ -name pde.jar`
9-
core_path=`find ../../../ -name arduino-core.jar`
10-
lib_path=`find ../../../ -name commons-codec-1.7.jar`
12+
pde_path=`find $IDEDIR -name pde.jar`
13+
core_path=`find $IDEDIR -name arduino-core.jar`
14+
lib_path=`find $IDEDIR -name commons-codec-1.7.jar`
1115
if [[ -z "$core_path" || -z "$pde_path" ]]; then
1216
echo "Some java libraries have not been built yet (did you run ant build?)"
1317
return 1
@@ -19,7 +23,7 @@ echo "lib_path: $lib_path"
1923
set -e
2024

2125
mkdir -p bin
22-
javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
26+
/Library/Java/JavaVirtualMachines/openlogic-openjdk-8.jdk/Contents/Home/bin/javac -target 1.8 -cp "$pde_path:$core_path:$lib_path" \
2327
-d bin src/ESP32FS.java
2428

2529
pushd bin

Diff for: src/ESP32FS.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ private void createAndUpload(){
364364
else
365365
sysExec(new String[]{espota.getAbsolutePath(), "-i", serialPort, "-p", "3232", "-s", "-f", imagePath});
366366
} else {
367+
String mcu = BaseNoGui.getBoardPreferences().get("build.mcu");
367368
String flashMode = BaseNoGui.getBoardPreferences().get("build.flash_mode");
368369
String flashFreq = BaseNoGui.getBoardPreferences().get("build.flash_freq");
369370
System.out.println("[SPIFFS] address: "+spiStart);
@@ -373,9 +374,9 @@ private void createAndUpload(){
373374
System.out.println("[SPIFFS] freq : "+flashFreq);
374375
System.out.println();
375376
if(esptool.getAbsolutePath().endsWith(".py"))
376-
sysExec(new String[]{pythonCmd, esptool.getAbsolutePath(), "--chip", "esp32", "--baud", uploadSpeed, "--port", serialPort, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", ""+spiStart, imagePath});
377+
sysExec(new String[]{pythonCmd, esptool.getAbsolutePath(), "--chip", mcu, "--baud", uploadSpeed, "--port", serialPort, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", ""+spiStart, imagePath});
377378
else
378-
sysExec(new String[]{esptool.getAbsolutePath(), "--chip", "esp32", "--baud", uploadSpeed, "--port", serialPort, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", ""+spiStart, imagePath});
379+
sysExec(new String[]{esptool.getAbsolutePath(), "--chip", mcu, "--baud", uploadSpeed, "--port", serialPort, "--before", "default_reset", "--after", "hard_reset", "write_flash", "-z", "--flash_mode", flashMode, "--flash_freq", flashFreq, "--flash_size", "detect", ""+spiStart, imagePath});
379380
}
380381
}
381382

0 commit comments

Comments
 (0)