mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-05-12 11:22:59 -07:00
Fix non-clean builds failure
Fix flash-dfu-* scripts being now broken
This commit is contained in:
+8
-4
@@ -60,15 +60,19 @@ set -xe
|
||||
--merge \
|
||||
settings.hex \
|
||||
application.hex \
|
||||
--output application.hex
|
||||
rm settings.hex
|
||||
--output application_merged.hex
|
||||
|
||||
mergehex \
|
||||
--merge \
|
||||
bootloader.hex \
|
||||
application.hex \
|
||||
application_merged.hex \
|
||||
softdevice.hex \
|
||||
--output fullimage.hex
|
||||
|
||||
zip ${device_type}-binaries.zip *.hex
|
||||
tmp_dir=$(mktemp -d -t cu_binaries_XXXXXXXXXX)
|
||||
cp *.hex "$tmp_dir"
|
||||
mv $tmp_dir/application_merged.hex $tmp_dir/application.hex
|
||||
rm $tmp_dir/settings.hex
|
||||
zip -j ${device_type}-binaries.zip $tmp_dir/*.hex
|
||||
rm -rf $tmp_dir
|
||||
)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $BASH_SOURCE = */* ]]; then
|
||||
cd -- "${BASH_SOURCE%/*}/" || exit
|
||||
fi
|
||||
|
||||
if ! ../resource/tools/enter_dfu.py; then
|
||||
echo "Wait for device to be off"
|
||||
echo "Press B and plug"
|
||||
@@ -9,4 +13,19 @@ while :; do
|
||||
lsusb|grep -q 1915:521f && break
|
||||
sleep 1
|
||||
done
|
||||
nrfutil device program --firmware objects/dfu-app.zip --traits nordicDfu
|
||||
|
||||
device_type=ultra
|
||||
lsusb | grep 1915:521f | grep -q ChameleonLite && device_type=lite
|
||||
|
||||
echo "Flashing $device_type"
|
||||
|
||||
dfu_package=objects/${device_type}-dfu-app.zip
|
||||
|
||||
if [ ! -f $dfu_package ]; then
|
||||
echo "DFU package for $device_type not found, aborting."
|
||||
echo "Build firmware using CURRENT_DEVICE_TYPE=$device_type firmware/build.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nrfutil device program --firmware $dfu_package --traits nordicDfu
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $BASH_SOURCE = */* ]]; then
|
||||
cd -- "${BASH_SOURCE%/*}/" || exit
|
||||
fi
|
||||
|
||||
if ! ../resource/tools/enter_dfu.py; then
|
||||
echo "Wait for device to be off"
|
||||
echo "Press B and plug"
|
||||
@@ -9,4 +13,19 @@ while :; do
|
||||
lsusb|grep -q 1915:521f && break
|
||||
sleep 1
|
||||
done
|
||||
nrfutil device program --firmware objects/dfu-full.zip --traits nordicDfu
|
||||
|
||||
device_type=ultra
|
||||
lsusb | grep 1915:521f | grep -q ChameleonLite && device_type=lite
|
||||
|
||||
echo "Flashing $device_type"
|
||||
|
||||
dfu_package=objects/${device_type}-dfu-full.zip
|
||||
|
||||
if [ ! -f $dfu_package ]; then
|
||||
echo "DFU package for $device_type not found, aborting."
|
||||
echo "Build firmware using CURRENT_DEVICE_TYPE=$device_type firmware/build.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nrfutil device program --firmware $dfu_package --traits nordicDfu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user