From a5ba643ec526029e537e418282839915660d7734 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 10 Dec 2020 23:37:28 -0800 Subject: [PATCH] add full build script --- firmware/build_wideband.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 firmware/build_wideband.sh diff --git a/firmware/build_wideband.sh b/firmware/build_wideband.sh new file mode 100755 index 0000000..595085f --- /dev/null +++ b/firmware/build_wideband.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# first build the bootloader +cd bootloader +./build_bootloader.sh +cd .. + +# delete the elf to force a re-link (it might not pick up the bootloader otherwise) +rm -r build/ +rm ../for_rusefi/wideband_image.h + +make -j12 + +# Copy the bin without the bootloader (the image consumed by rusEfi has no bootloader on it) +dd if=build/wideband.bin of=build/wideband_noboot.bin skip=6144 bs=1 + +# Convert to a header file, and tack "static const " on the front of it +xxd -i build/wideband_noboot.bin \ + | cat <(echo -n "static const ") - \ + > ../for_rusefi/wideband_image.h