Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Dumping executed commands; build-script improvmenets#36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rpoisel wants to merge1 commit intoesp8266:master
base:master
Choose a base branch
Loading
fromrpoisel:CommandOutput
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
bin/
dist/
*.swp
16 changes: 11 additions & 5 deletionsmake.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
#!/usr/bin/env bash

if [[ -z "$INSTALLDIR" ]]; then
INSTALLDIR="$HOME/Documents/Arduino"
if [[ -z "$TAG" ]]; then
TAG=1.6.12
fi
INSTALLDIR="$HOME/Arduino-$TAG/build/linux/work"
fi
if [[ -L "$INSTALLDIR" ]]; then
INSTALLDIR=$INSTALLDIR/
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${INSTALLDIR} -name pde.jar`
core_path=`find${INSTALLDIR} -name arduino-core.jar`
lib_path=`find${INSTALLDIR} -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
exit 1
fi
echo "pde_path: $pde_path"
echo "core_path: $core_path"
Expand Down
26 changes: 23 additions & 3 deletionssrc/ESP8266FS.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -284,7 +284,9 @@ private void createAndUpload(){
System.out.println("[SPIFFS] block : "+spiBlock);

try {
if(listenOnProcess(new String[]{toolPath, "-c", dataPath, "-p", spiPage+"", "-b", spiBlock+"", "-s", (spiEnd - spiStart)+"", imagePath}) != 0){
String[] buildCmd = new String[]{toolPath, "-c", dataPath, "-p", spiPage+"", "-b", spiBlock+"", "-s", (spiEnd - spiStart)+"", imagePath};
dumpCommand(buildCmd, "build.verbose");
if(listenOnProcess(buildCmd) != 0){
System.err.println();
editor.statusError("SPIFFS Create Failed!");
return;
Expand All@@ -298,6 +300,7 @@ private void createAndUpload(){
editor.statusNotice("SPIFFS Uploading Image...");
System.out.println("[SPIFFS] upload : "+imagePath);

String[] uploadCmd;
if(isNetwork){
String pythonCmd;
if(PreferencesData.get("runtime.os").contentEquals("windows"))
Expand All@@ -307,18 +310,35 @@ private void createAndUpload(){

System.out.println("[SPIFFS] IP : "+serialPort);
System.out.println();
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath});
uploadCmd =new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath};
} else {
System.out.println("[SPIFFS] address: "+uploadAddress);
System.out.println("[SPIFFS] reset : "+resetMethod);
System.out.println("[SPIFFS] port : "+serialPort);
System.out.println("[SPIFFS] speed : "+uploadSpeed);
System.out.println();
sysExec(new String[]{esptool.getAbsolutePath(), "-cd", resetMethod, "-cb", uploadSpeed, "-cp", serialPort, "-ca", uploadAddress, "-cf", imagePath});
uploadCmd =new String[]{esptool.getAbsolutePath(), "-cd", resetMethod, "-cb", uploadSpeed, "-cp", serialPort, "-ca", uploadAddress, "-cf", imagePath};
}
dumpCommand(uploadCmd, "upload.verbose");
sysExec(uploadCmd);
}

public void run() {
createAndUpload();
}

private void dumpCommand(String[] fragments, String preference) {
if (!PreferencesData.getBoolean(preference)) {
return;
}

StringBuffer commandBuf = new StringBuffer(128);
for (int cnt = 0; cnt < fragments.length; cnt++) {
commandBuf.append(fragments[cnt]);
if (cnt < fragments.length - 1) {
commandBuf.append(" ");
}
}
System.out.println(commandBuf.toString());
}
}

[8]ページ先頭

©2009-2025 Movatter.jp