auto-sync
This commit is contained in:
parent
ee5957ddbe
commit
cdc3fecc00
|
@ -2,6 +2,7 @@
|
|||
rm -rf .dep/
|
||||
|
||||
rm -rf build\rusefi.hex
|
||||
rm -rf build\rusefi.bin
|
||||
|
||||
call update_version.bat
|
||||
|
||||
|
@ -39,7 +40,8 @@ cd ..
|
|||
arm-none-eabi-size --format=berkeley "build\rusefi.elf"
|
||||
|
||||
rem file, let's program the board right away
|
||||
flash.bat
|
||||
cd build
|
||||
../flash_openocd
|
||||
exit
|
||||
|
||||
:error
|
||||
|
|
|
@ -38,18 +38,18 @@ void setMazda626EngineConfiguration(engine_configuration_s *engineConfiguration)
|
|||
|
||||
setCommonNTCSensor(&engineConfiguration->clt);
|
||||
engineConfiguration->clt.bias_resistor = 2700;
|
||||
setCommonNTCSensor(&engineConfiguration->iat);
|
||||
engineConfiguration->iat.bias_resistor = 2700;
|
||||
|
||||
// setCommonNTCSensor(&engineConfiguration->iat);
|
||||
// engineConfiguration->iat.bias_resistor = 2700;
|
||||
//
|
||||
commonFrankensoAnalogInputs(engineConfiguration);
|
||||
engineConfiguration->hasTpsSensor = false;
|
||||
engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
|
||||
// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_0;
|
||||
engineConfiguration->cltAdcChannel = EFI_ADC_12;
|
||||
engineConfiguration->iatAdcChannel = EFI_ADC_11;
|
||||
|
||||
// todo: 8.2 or 10k?
|
||||
engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
// engineConfiguration->hasTpsSensor = false;
|
||||
// engineConfiguration->tpsAdcChannel = EFI_ADC_NONE;
|
||||
//// engineConfiguration->map.sensor.hwChannel = EFI_ADC_4;
|
||||
// engineConfiguration->mafAdcChannel = EFI_ADC_0;
|
||||
// engineConfiguration->cltAdcChannel = EFI_ADC_12;
|
||||
// engineConfiguration->iatAdcChannel = EFI_ADC_11;
|
||||
//
|
||||
// // todo: 8.2 or 10k?
|
||||
// engineConfiguration->vbattDividerCoeff = ((float) (10 + 33)) / 10 * 2;
|
||||
|
||||
}
|
||||
|
|
|
@ -75,12 +75,7 @@ int isInjectorEnabled(int cylinderId) {
|
|||
|
||||
static void printStatus(void) {
|
||||
for (int id = 1; id <= engineConfiguration->specs.cylindersCount; id++) {
|
||||
resetLogging(&logger);
|
||||
|
||||
appendPrintf(&logger, "injector%d%s", id, DELIMETER);
|
||||
appendPrintf(&logger, "%d", isInjectorEnabled(id));
|
||||
appendPrintf(&logger, DELIMETER);
|
||||
scheduleLogging(&logger);
|
||||
scheduleMsg(&logger, "injector_%d_%d", isInjectorEnabled(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
st-link_cli -c SWD ur -ME
|
||||
rem st-link_cli -c SWD ur -ME
|
||||
rem 0x080000 would erase both code and configuration
|
||||
rem use 0x040000 if you want to erase only configuration
|
||||
openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x080000" -c shutdown
|
|
@ -1 +1 @@
|
|||
openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash write_image erase rusefi.elf" -c "verify_image rusefi.elf" -c "reset run" -c shutdown
|
||||
openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c "program rusefi.bin verify reset exit 0x08000000"
|
||||
|
|
|
@ -56,12 +56,12 @@ public enum FileLog {
|
|||
}
|
||||
|
||||
public synchronized void logLine(String fullLine) {
|
||||
System.out.println(fullLine);
|
||||
if (fileLog == null)
|
||||
return;
|
||||
try {
|
||||
fileLog.write((new Date() + END_OF_TIMESTAND_TAG + fullLine + "\r\n").getBytes());
|
||||
fileLog.flush();
|
||||
System.out.println(fullLine);
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.ui.engine.EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher extends FrameHelper {
|
||||
public static final int CONSOLE_VERSION = 20150222;
|
||||
public static final int CONSOLE_VERSION = 20150223;
|
||||
public static final boolean SHOW_STIMULATOR = true;
|
||||
public static final String TAB_INDEX = "main_tab";
|
||||
private final String port;
|
||||
|
|
|
@ -14,17 +14,10 @@ import java.io.*;
|
|||
* 2/4/15
|
||||
*/
|
||||
public class FirmwareFlasher {
|
||||
public static final String IMAGE_ELF = "rusefi.elf";
|
||||
private static final String OPEN_OCD_COMMAND = "openocd/bin/openocd-0.8.0.exe " +
|
||||
"-f interface/stlink-v2.cfg " +
|
||||
"-f board/stm32f4discovery.cfg " +
|
||||
"-c init " +
|
||||
"-c targets " +
|
||||
"-c \"halt\" " +
|
||||
"-c \"flash write_image erase " + IMAGE_ELF + "\" " +
|
||||
"-c \"verify_image " + IMAGE_ELF + "\" " +
|
||||
"-c \"reset run\" " +
|
||||
"-c shutdown";
|
||||
public static final String IMAGE_FILE = "rusefi.bin";
|
||||
private static final String OPEN_OCD_COMMAND = "openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c \"program " +
|
||||
IMAGE_FILE +
|
||||
" verify reset exit 0x08000000\"";
|
||||
public static final String SUCCESS_MESSAGE_TAG = "shutdown command invoked";
|
||||
|
||||
private final JButton button = new JButton("Program Firmware");
|
||||
|
@ -61,8 +54,8 @@ public class FirmwareFlasher {
|
|||
}
|
||||
|
||||
private void doFlashFirmware() {
|
||||
if (!new File(IMAGE_ELF).exists()) {
|
||||
appendMsg(IMAGE_ELF + " not found, cannot proceed !!!");
|
||||
if (!new File(IMAGE_FILE).exists()) {
|
||||
appendMsg(IMAGE_FILE + " not found, cannot proceed !!!");
|
||||
return;
|
||||
}
|
||||
appendMsg("Executing " + OPEN_OCD_COMMAND);
|
||||
|
@ -70,8 +63,8 @@ public class FirmwareFlasher {
|
|||
StringBuffer error = new StringBuffer();
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec(OPEN_OCD_COMMAND);
|
||||
startStreamThread(p, p.getInputStream(), "output", output);
|
||||
startStreamThread(p, p.getErrorStream(), "error", error);
|
||||
startStreamThread(p, p.getInputStream(), output);
|
||||
startStreamThread(p, p.getErrorStream(), error);
|
||||
p.waitFor();
|
||||
} catch (IOException e) {
|
||||
appendMsg("IOError: " + e);
|
||||
|
@ -89,7 +82,7 @@ public class FirmwareFlasher {
|
|||
* This method listens to a data stream from the process, appends messages to UI
|
||||
* and accumulates output in a buffer
|
||||
*/
|
||||
private void startStreamThread(final Process p, final InputStream stream, final String msg, final StringBuffer buffer) {
|
||||
private void startStreamThread(final Process p, final InputStream stream, final StringBuffer buffer) {
|
||||
final Thread t = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -105,7 +98,6 @@ public class FirmwareFlasher {
|
|||
} catch (IOException e) {
|
||||
appendMsg("Stream " + e);
|
||||
}
|
||||
// appendMsg("<EOS> " + msg);
|
||||
}
|
||||
});
|
||||
t.setDaemon(true);
|
||||
|
|
Loading…
Reference in New Issue