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