Openblt composite hex (#212)

* composite OpenBLT+Wideband hex file

* Install srecord for srec_cat

---------

Co-authored-by: Andrey Gusakov <dron0gus@gmail.com>
Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-03-06 04:32:34 -05:00 committed by GitHub
parent 248794965d
commit fa2b205583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -34,6 +34,10 @@ jobs:
- name: Test Compiler
run: arm-none-eabi-gcc -v
- name: Install srecord for srec_cat
run: |
sudo apt-get install srecord
- name: Build Firmware
working-directory: ./firmware/boards/${{matrix.build-target}}
run: ./build_wideband.sh

View File

@ -31,10 +31,12 @@ rm -f ${DELIVER_DIR}/*
if uname | grep "NT"; then
HEX2DFU=./ext/encedo_hex2dfu/hex2dfu.exe
SREC_CAT=srec_cat.exe
else
HEX2DFU=./ext/encedo_hex2dfu/hex2dfu.bin
chmod u+x $HEX2DFU
SREC_CAT=srec_cat
fi
chmod u+x $HEX2DFU
echo ""
echo "Creating deliveries:"
@ -55,9 +57,12 @@ if [ $USE_OPENBLT = "yes" ]; then
echo "OpenBLT bin (for DFU another util)"
cp -v boards/${BOARD}/openblt/bin/openblt_${BOARD}.bin ${DELIVER_DIR}/openblt.bin
OPENBLT_HEX=boards/${BOARD}/openblt/bin/openblt_${BOARD}.hex
echo ""
echo "Invoking hex2dfu for composite OpenBLT+Wideband image (for DFU util)"
$HEX2DFU -i boards/${BOARD}/openblt/bin/openblt_${BOARD}.hex -i build/wideband.hex -C 0x1C -o ${DELIVER_DIR}/wideband.dfu -b ${DELIVER_DIR}/wideband.bin
$HEX2DFU -i ${OPENBLT_HEX} -i build/wideband.hex -C 0x1C -o ${DELIVER_DIR}/wideband.dfu -b ${DELIVER_DIR}/wideband.bin
echo "Combining two hex files into composite hex file"
$SREC_CAT ${OPENBLT_HEX} -Intel build/wideband.hex -Intel -o ${DELIVER_DIR}/wideband.hex -Intel
else
echo "Bin for raw flashing"
cp build/wideband.bin ${DELIVER_DIR}/wideband.bin