mirror of https://github.com/rusefi/rusefi.git
only: renaming StLink flasher
This commit is contained in:
parent
2ac6703b16
commit
6066870836
|
@ -7,7 +7,7 @@ import com.rusefi.core.MessagesCentral;
|
|||
import com.rusefi.io.CommandQueue;
|
||||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.io.serial.BaudRateHolder;
|
||||
import com.rusefi.maintenance.FirmwareFlasher;
|
||||
import com.rusefi.maintenance.StLinkFlasher;
|
||||
import com.rusefi.maintenance.VersionChecker;
|
||||
import com.rusefi.ui.*;
|
||||
import com.rusefi.ui.console.MainFrame;
|
||||
|
@ -76,7 +76,7 @@ public class ConsoleUI {
|
|||
setFrameIcon(ConsoleUI.staticFrame);
|
||||
log.info("Console " + CONSOLE_VERSION);
|
||||
|
||||
log.info("Hardware: " + FirmwareFlasher.getHardwareKind());
|
||||
log.info("Hardware: " + StLinkFlasher.getHardwareKind());
|
||||
|
||||
getConfig().getRoot().setProperty(PORT_KEY, port);
|
||||
getConfig().getRoot().setProperty(SPEED_KEY, BaudRateHolder.INSTANCE.baudRate);
|
||||
|
|
|
@ -9,7 +9,7 @@ import com.rusefi.core.ui.FrameHelper;
|
|||
import com.rusefi.io.LinkManager;
|
||||
import com.rusefi.io.serial.BaudRateHolder;
|
||||
import com.rusefi.maintenance.DriverInstall;
|
||||
import com.rusefi.maintenance.FirmwareFlasher;
|
||||
import com.rusefi.maintenance.StLinkFlasher;
|
||||
import com.rusefi.maintenance.ProgramSelector;
|
||||
import com.rusefi.ui.LogoHelper;
|
||||
import com.rusefi.ui.util.HorizontalLine;
|
||||
|
@ -25,7 +25,6 @@ import javax.swing.*;
|
|||
import javax.swing.border.TitledBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import static com.devexperts.logging.Logging.getLogging;
|
||||
|
@ -40,7 +39,7 @@ import static javax.swing.JOptionPane.YES_NO_OPTION;
|
|||
* <p/>
|
||||
* 2/14/14
|
||||
* @see SimulatorHelper
|
||||
* @see FirmwareFlasher
|
||||
* @see StLinkFlasher
|
||||
*/
|
||||
public class StartupFrame {
|
||||
private static final Logging log = getLogging(Launcher.class);
|
||||
|
|
|
@ -26,10 +26,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static com.rusefi.core.ui.FrameHelper.appendBundleName;
|
||||
|
||||
/**
|
||||
* @see FirmwareFlasher
|
||||
* @see StLinkFlasher
|
||||
*/
|
||||
public class DfuFlasher {
|
||||
private static final String DFU_BINARY_LOCATION = Launcher.TOOLS_PATH + File.separator + "STM32_Programmer_CLI/bin";
|
||||
|
|
|
@ -8,7 +8,7 @@ import javax.swing.*;
|
|||
import java.awt.event.ActionEvent;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
import static com.rusefi.maintenance.FirmwareFlasher.TITLE;
|
||||
import static com.rusefi.maintenance.StLinkFlasher.TITLE;
|
||||
|
||||
/**
|
||||
* Andrey Belomutskiy, (c) 2013-2020
|
||||
|
@ -32,13 +32,13 @@ public class EraseChip {
|
|||
StatusAnimation sa = new StatusAnimation(wnd);
|
||||
ExecHelper.submitAction(() -> {
|
||||
try {
|
||||
FirmwareFlasher.executeOpenOCDCommand(getEraseCommand(), wnd);
|
||||
StLinkFlasher.executeOpenOCDCommand(getEraseCommand(), wnd);
|
||||
} catch (FileNotFoundException ex) {
|
||||
wnd.append(ex.toString());
|
||||
wnd.error();
|
||||
}
|
||||
sa.stop();
|
||||
wnd.setStatus(FirmwareFlasher.DONE);
|
||||
wnd.setStatus(StLinkFlasher.DONE);
|
||||
}, EraseChip.this.getClass() + " extProcessThread");
|
||||
}
|
||||
});
|
||||
|
@ -46,7 +46,7 @@ public class EraseChip {
|
|||
|
||||
@NotNull
|
||||
private String getEraseCommand() {
|
||||
return FirmwareFlasher.getOpenocdCommand() + ERASE_COMMAND_SUFFIX;
|
||||
return StLinkFlasher.getOpenocdCommand() + ERASE_COMMAND_SUFFIX;
|
||||
}
|
||||
|
||||
public JButton getButton() {
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ProgramSelector {
|
|||
case ST_LINK:
|
||||
job = updateOperationCallbacks -> {
|
||||
// todo: add ST-LINK no-assert mode? or not?
|
||||
FirmwareFlasher.doUpdateFirmware(FirmwareFlasher.IMAGE_FILE, updateFirmware);
|
||||
StLinkFlasher.doUpdateFirmware(StLinkFlasher.IMAGE_FILE, updateFirmware);
|
||||
};
|
||||
break;
|
||||
case DFU_SWITCH:
|
||||
|
|
|
@ -19,7 +19,10 @@ import static com.rusefi.core.preferences.storage.PersistentConfiguration.getCon
|
|||
* Andrey Belomutskiy, (c) 2013-2020
|
||||
* 2/4/15
|
||||
*/
|
||||
public class FirmwareFlasher {
|
||||
public class StLinkFlasher {
|
||||
/**
|
||||
* this file is used for ST-LINK flashing option, do we still need it at all?
|
||||
*/
|
||||
public static final String IMAGE_FILE = INPUT_FILES_PATH + "/" + "rusefi.bin";
|
||||
/**
|
||||
* SWD ST-LINK/V2 mode
|
||||
|
@ -34,7 +37,7 @@ public class FirmwareFlasher {
|
|||
|
||||
private final JButton button;
|
||||
|
||||
public FirmwareFlasher(String fileName, String buttonTest, String tooltip) {
|
||||
public StLinkFlasher(String fileName, String buttonTest, String tooltip) {
|
||||
button = new JButton(buttonTest);
|
||||
button.setToolTipText(tooltip);
|
||||
button.addActionListener(event -> doUpdateFirmware(fileName, button));
|
||||
|
@ -50,7 +53,7 @@ public class FirmwareFlasher {
|
|||
wnd.getFrame().setLocationRelativeTo(parent);
|
||||
wnd.showFrame(TITLE);
|
||||
|
||||
ExecHelper.submitAction(() -> doFlashFirmware(wnd, fileName), FirmwareFlasher.class + " extProcessThread");
|
||||
ExecHelper.submitAction(() -> doFlashFirmware(wnd, fileName), StLinkFlasher.class + " extProcessThread");
|
||||
}
|
||||
|
||||
public static String getOpenocdCommand() {
|
|
@ -10,6 +10,9 @@ import cz.jaybee.intelhex.IntelHexException;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* prototype of our own DFU frontend, not used in real life
|
||||
*/
|
||||
public class DfuTool {
|
||||
public static void run(String[] args) throws IOException, IntelHexException {
|
||||
if (args.length < 2) {
|
||||
|
|
Loading…
Reference in New Issue