Skip to content

Commit b8cb4fa

Browse files
author
Ulf Lilleengen
committed
build in release mode
1 parent 6ceffcf commit b8cb4fa

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
- uses: actions/checkout@v3
2121

2222
- name: Build
23-
run: for p in firmware/boot firmware/app pinetime-flash watchful-ui; do pushd $p; cargo build; popd; done
23+
run: for p in firmware/boot firmware/app pinetime-flash watchful-ui; do pushd $p; cargo build --release; popd; done

blog/part-1.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ You might wonder why the reloader has a bootloader. If you look at the linker sc
130130
To build the reloader, first a hex file of both the boot and app is made:
131131

132132
```
133-
cd app && cargo objcopy --release -- -O ihex app.hex
134-
cd boot && cargo objcopy --release -- -O ihex boot.hex
135-
mergehex -m boot/boot.hex app/app.hex -o combined.bin
133+
cd reloader/app && cargo objcopy --release -- -O ihex app.hex
134+
cd reloader/boot && cargo objcopy --release -- -O ihex boot.hex
135+
mergehex -m reloader/boot/boot.hex reloader/app/app.hex -o reloader.bin
136136
```
137137

138-
Then, the `imgtool.py` tool from MCUBoot is used to create an "image" that can be loaded by MCUBoot:
138+
Then, the `imgtool` tool from MCUBoot is used to create an image that can be loaded by MCUBoot:
139139

140140
```
141-
imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header combined.bin watchful-reloader-image.bin
141+
imgtool create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header reloader.bin watchful-reloader-image.bin
142142
```
143143

144144
The final step is to create a nRF DFU package with the image:
@@ -147,3 +147,4 @@ The final step is to create a nRF DFU package with the image:
147147
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application watchful-reloader-image.bin watchful-reloader-dfu.zip
148148
```
149149

150+
And voilla, you have an MCUBoot image that you can use to brick your PineTime or successfully update to use Watchful.

0 commit comments

Comments
 (0)