Skip to content

Commit

Permalink
Merge remote-tracking branch 'menodev/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
hr-ru committed Sep 20, 2023
2 parents e5a022c + 9ef3bcd commit 387bbe0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 8 additions & 4 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
if [[ -z "$INSTALLDIR" ]]; then
INSTALLDIR="$HOME/Documents/Arduino"
fi
if [[ -z "$IDEDIR" ]]; then
IDEDIR="/Applications/Arduino.app/Contents/Java/"
#IDEDIR="../../../"
fi
echo "INSTALLDIR: $INSTALLDIR"

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

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

pushd bin
Expand Down
5 changes: 3 additions & 2 deletions src/ESP32FS.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ private void createAndUpload(){
else
sysExec(new String[]{espota.getAbsolutePath(), "-i", serialPort, "-p", "3232", "-s", "-f", imagePath});
} else {
String mcu = BaseNoGui.getBoardPreferences().get("build.mcu");
String flashMode = BaseNoGui.getBoardPreferences().get("build.flash_mode");
String flashFreq = BaseNoGui.getBoardPreferences().get("build.flash_freq");
System.out.println("[SPIFFS] address: "+spiStart);
Expand All @@ -373,9 +374,9 @@ private void createAndUpload(){
System.out.println("[SPIFFS] freq : "+flashFreq);
System.out.println();
if(esptool.getAbsolutePath().endsWith(".py"))
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});
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});
else
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});
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});
}
}

Expand Down

0 comments on commit 387bbe0

Please sign in to comment.