"older st-link" checkbox is not needed anymore!
This commit is contained in:
parent
07c5b196f5
commit
ca1eef2233
|
@ -6,7 +6,6 @@ import com.rusefi.io.tcp.TcpConnector;
|
||||||
import com.rusefi.maintenance.EraseChip;
|
import com.rusefi.maintenance.EraseChip;
|
||||||
import com.rusefi.maintenance.FirmwareFlasher;
|
import com.rusefi.maintenance.FirmwareFlasher;
|
||||||
import com.rusefi.maintenance.ProcessStatusWindow;
|
import com.rusefi.maintenance.ProcessStatusWindow;
|
||||||
import com.rusefi.ui.OlderDiscoveryChecbbox;
|
|
||||||
import com.rusefi.ui.util.HorizontalLine;
|
import com.rusefi.ui.util.HorizontalLine;
|
||||||
import com.rusefi.ui.util.URLLabel;
|
import com.rusefi.ui.util.URLLabel;
|
||||||
import com.rusefi.ui.util.UiUtils;
|
import com.rusefi.ui.util.UiUtils;
|
||||||
|
@ -132,7 +131,6 @@ public class StartupFrame {
|
||||||
|
|
||||||
if (ProcessStatusWindow.isWindows()) {
|
if (ProcessStatusWindow.isWindows()) {
|
||||||
realHardwarePanel.add(new HorizontalLine());
|
realHardwarePanel.add(new HorizontalLine());
|
||||||
realHardwarePanel.add(new OlderDiscoveryChecbbox().getButton());
|
|
||||||
realHardwarePanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_DEBUG_FILE, "Program Firmware/Debug").getButton());
|
realHardwarePanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_DEBUG_FILE, "Program Firmware/Debug").getButton());
|
||||||
realHardwarePanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_RELEASE_FILE, "Program Firmware/Release").getButton());
|
realHardwarePanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_RELEASE_FILE, "Program Firmware/Release").getButton());
|
||||||
realHardwarePanel.add(new EraseChip().getButton());
|
realHardwarePanel.add(new EraseChip().getButton());
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
package com.rusefi.maintenance;
|
package com.rusefi.maintenance;
|
||||||
|
|
||||||
import com.rusefi.ui.OlderDiscoveryChecbbox;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (c) Andrey Belomutskiy 2013-2018
|
* (c) Andrey Belomutskiy 2013-2018
|
||||||
|
@ -37,19 +35,13 @@ public class FirmwareFlasher extends ProcessStatusWindow {
|
||||||
|
|
||||||
wnd.showFrame("rusEfi Firmware Flasher");
|
wnd.showFrame("rusEfi Firmware Flasher");
|
||||||
|
|
||||||
Runnable runnable = new Runnable() {
|
submitAction(() -> doFlashFirmware());
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
doFlashFirmware();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
submitAction(runnable);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getOpenocdCommad() {
|
public static String getOpenocdCommad() {
|
||||||
String cfg = OlderDiscoveryChecbbox.olderMode ? "stm32f4discovery.cfg" : "stm32f429disc1.cfg";
|
String cfg = "stm32f4discovery.cfg";
|
||||||
return BINARY_LOCATION + File.separator + OPENOCD_EXE + " -f openocd/" + cfg;
|
return BINARY_LOCATION + File.separator + OPENOCD_EXE + " -f openocd/" + cfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
package com.rusefi.ui;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.awt.*;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Andrey Belomutskiy *
|
|
||||||
* 11/19/2017
|
|
||||||
*/
|
|
||||||
public class OlderDiscoveryChecbbox {
|
|
||||||
public static boolean olderMode;
|
|
||||||
private final JCheckBox checkBox = new JCheckBox("Older ST-link mode");
|
|
||||||
private Component button;
|
|
||||||
|
|
||||||
public OlderDiscoveryChecbbox() {
|
|
||||||
checkBox.addActionListener(e -> olderMode = checkBox.isSelected());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Component getButton() {
|
|
||||||
return checkBox;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
echo "WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg"
|
|
||||||
source [find openocd/stlink.cfg]
|
|
|
@ -1,2 +0,0 @@
|
||||||
echo "WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg"
|
|
||||||
source [find openocd/stlink.cfg]
|
|
|
@ -1,12 +0,0 @@
|
||||||
#
|
|
||||||
# This is an STM32F429 discovery board with a single STM32F429ZI chip.
|
|
||||||
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090
|
|
||||||
#
|
|
||||||
|
|
||||||
source [find openocd/stlink.cfg]
|
|
||||||
|
|
||||||
transport select hla_swd
|
|
||||||
|
|
||||||
source [find openocd/stm32f4x.cfg]
|
|
||||||
|
|
||||||
reset_config srst_only
|
|
Loading…
Reference in New Issue