From b2b1bfec76c89579f76373a77901880029133176 Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Thu, 12 Dec 2024 13:26:55 +0100 Subject: [PATCH] Update build script --- firmware/Cargo.lock | 2 +- scripts/build.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/firmware/Cargo.lock b/firmware/Cargo.lock index e8ad3f8..88d3927 100644 --- a/firmware/Cargo.lock +++ b/firmware/Cargo.lock @@ -1567,7 +1567,7 @@ dependencies = [ [[package]] name = "watchful" -version = "0.2.5" +version = "0.2.6" dependencies = [ "bt-hci", "byte-slice-cast", diff --git a/scripts/build.sh b/scripts/build.sh index 4a8a8da..cb14e6e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,3 +1,9 @@ +#!/usr/bin/env bash +set -e +pushd firmware +cargo clean cargo build --release -cargo objcopy --release -- -O ihex app.hex -nrfutil pkg generate --debug-mode --application app.hex app.zip +cargo objcopy --release -- -O binary watchful.bin +popd +./tools/mcuboot/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header ./firmware/watchful.bin watchful-image.bin +adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application watchful-image.bin watchful-dfu.zip