console uses .hex Looks like I broke MRE and Proteus with OpenBLT #4199

console to use .bin file
This commit is contained in:
rusefillc 2022-05-25 10:27:27 -04:00
parent 4e0f28df04
commit e0da9e1c37
2 changed files with 5 additions and 10 deletions

View File

@ -46,8 +46,6 @@ else
# standalone images (for use with no bootloader)
cp build/rusefi.bin deliver/
cp build/rusefi.dfu deliver/
# rusEFI console DFU uses rusefi*.hex file
cp build/rusefi.hex deliver/
fi
# bootloader and composite image
@ -65,11 +63,8 @@ if [ $USE_OPENBLT = "yes" ]; then
echo "$SCRIPT_NAME: invoking hex2dfu for composite rusEFI+OpenBLT image"
$HEX2DFU -i build-openblt/openblt_$PROJECT_BOARD.hex -i build/rusefi.hex -C 0x1C -o deliver/rusefi.dfu -b deliver/rusefi.bin
#todo: how to create 'signed' hex and srec? Do we need?
# rusEFI console DFU uses rusefi*.hex file TODO FIX ME
cp build/rusefi.hex deliver/
fi
echo "$SCRIPT_NAME: build folder content:"
ls -l build

View File

@ -179,14 +179,14 @@ public class DfuFlasher {
private static String getDfuWriteCommand() throws FileNotFoundException {
String prefix = "rusefi";
String suffix = ".hex";
String hexFileName = IniFileModel.findFile(Launcher.INPUT_FILES_PATH, prefix, suffix);
if (hexFileName == null)
String suffix = ".bin";
String fileName = IniFileModel.findFile(Launcher.INPUT_FILES_PATH, prefix, suffix);
if (fileName == null)
throw new FileNotFoundException("File not found " + prefix + "*" + suffix);
// we need quotes in case if absolute path contains spaces
String hexAbsolutePath = quote(new File(hexFileName).getAbsolutePath());
String hexAbsolutePath = quote(new File(fileName).getAbsolutePath());
return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -w " + hexAbsolutePath + " -v -s";
return DFU_BINARY_LOCATION + "/" + DFU_BINARY + " -c port=usb1 -w " + hexAbsolutePath + " 0x08000000 -v -s";
}
private static String quote(String absolutePath) {