diff --git a/make.sh b/make.sh index 0fa059a..843a4ed 100755 --- a/make.sh +++ b/make.sh @@ -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 @@ -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 diff --git a/src/ESP32FS.java b/src/ESP32FS.java index ce165eb..793df9b 100644 --- a/src/ESP32FS.java +++ b/src/ESP32FS.java @@ -359,6 +359,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); @@ -368,9 +369,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}); } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: