Prepare for openblt (#3445)

* Makefile: create and deliver srec file too

srec is used by OpenBLT tools

* Simplify common_make.sh
This commit is contained in:
Andrey G 2021-11-02 14:41:41 +03:00 committed by GitHub
parent 16d377b4ee
commit 564249fa02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View File

@ -345,6 +345,8 @@ OD = $(TRGT)objdump
SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
# OpenBLT flasher expects srec files
SREC = $(CP) -O srec
# ARM-specific options here
AOPT =

View File

@ -10,20 +10,23 @@ mkdir .dep
make -j$(nproc) -r
[ -e build/rusefi.hex ] || { echo "FAILED to compile by $SCRIPT_NAME with $PROJECT_BOARD $DEBUG_LEVEL_OPT and $EXTRA_PARAMS"; exit 1; }
if uname | grep "NT"; then
HEX2DFU=../misc/encedo_hex2dfu/hex2dfu.exe
else
HEX2DFU=../misc/encedo_hex2dfu/hex2dfu.bin
fi
chmod u+x $HEX2DFU
mkdir -p deliver
rm -f deliver/rusefi.dfu
echo "$SCRIPT_NAME: invoking hex2dfu"
if uname | grep "NT"; then
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.exe
../misc/encedo_hex2dfu/hex2dfu.exe -i build/rusefi.hex -o deliver/rusefi.dfu
else
chmod u+x ../misc/encedo_hex2dfu/hex2dfu.bin
../misc/encedo_hex2dfu/hex2dfu.bin -i build/rusefi.hex -o deliver/rusefi.dfu
fi
echo "$SCRIPT_NAME: invoking hex2dfu for RusEFI"
$HEX2DFU -i build/rusefi.hex -o deliver/rusefi.dfu
# rusEFI console does not use .hex files but for Cypress that's the primary binary format
cp build/rusefi.hex deliver/
cp build/rusefi.bin deliver/
cp build/rusefi.srec deliver/
echo "$SCRIPT_NAME: build folder content:"
ls -l build