mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
f42a93b764
commit
2b6c55d47b
|
@ -0,0 +1,22 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="TS2C fsioTable1" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.rusefi.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<option name="MAIN_CLASS_NAME" value="com.rusefi.TS2C" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="currenttune.msq fsioTable1LoadBins fsioTable1RpmBins fsioTable1 8" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="models" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -39,7 +39,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20170119;
|
||||
public static final int CONSOLE_VERSION = 20170120;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
|
@ -10,7 +10,7 @@ public class EraseChip extends ProcessStatusWindow {
|
|||
private final JButton button = new JButton("Erase Chip");
|
||||
|
||||
private static final String OPEN_OCD_COMMAND = FirmwareFlasher.OPENOCD_BIN +
|
||||
" -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 0x080000\" -c shutdown";
|
||||
" -c init -c targets -c \"halt\" -c \"flash erase_address 0x08000000 0x080000\" -c shutdown";
|
||||
|
||||
public EraseChip() {
|
||||
button.addActionListener(new AbstractAction() {
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.io.*;
|
|||
public class FirmwareFlasher extends ProcessStatusWindow {
|
||||
public static final String IMAGE_DEBUG_FILE = "rusefi_debug.bin";
|
||||
public static final String IMAGE_RELEASE_FILE = "rusefi_release.bin";
|
||||
static final String OPENOCD_BIN = "openocd/bin/openocd-0.8.0.exe";
|
||||
static final String OPENOCD_BIN = "openocd.exe -f stm32f429disc1.cfg";
|
||||
private static final String SUCCESS_MESSAGE_TAG = "shutdown command invoked";
|
||||
private static final String FAILED_MESSAGE_TAG = "failed";
|
||||
private static final String NO_DRIVER_MESSAGE_TAG = "failed with LIBUSB_ERROR_NOT_SUPPORTED";
|
||||
|
@ -50,7 +50,7 @@ public class FirmwareFlasher extends ProcessStatusWindow {
|
|||
wnd.appendMsg(fileName + " not found, cannot proceed !!!");
|
||||
return;
|
||||
}
|
||||
StringBuffer error = executeCommand(OPENOCD_BIN + " -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c \"program " +
|
||||
StringBuffer error = executeCommand(OPENOCD_BIN + " -c \"program ../" +
|
||||
fileName +
|
||||
" verify reset exit 0x08000000\"");
|
||||
if (error.toString().contains(NO_DRIVER_MESSAGE_TAG)) {
|
||||
|
|
|
@ -2,10 +2,7 @@ package com.rusefi.maintenance;
|
|||
|
||||
import com.rusefi.ui.StatusWindow;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* (c) Andrey Belomutskiy 2013-2017
|
||||
|
@ -57,7 +54,8 @@ public class ProcessStatusWindow {
|
|||
StringBuffer output = new StringBuffer();
|
||||
StringBuffer error = new StringBuffer();
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec(command);
|
||||
File workingDir = new File("openocd");
|
||||
Process p = Runtime.getRuntime().exec(command, null, workingDir);
|
||||
startStreamThread(p, p.getInputStream(), output);
|
||||
startStreamThread(p, p.getErrorStream(), error);
|
||||
p.waitFor();
|
||||
|
@ -66,6 +64,7 @@ public class ProcessStatusWindow {
|
|||
} catch (InterruptedException e) {
|
||||
wnd.appendMsg("WaitError: " + e);
|
||||
}
|
||||
wnd.appendMsg("Done!");
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue