Skip to content

Commit 461f665

Browse files
committed
fix path
1 parent 4ebdf57 commit 461f665

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

build.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ set -e
77
WORKSPACE=/spaceinvader
88
cd $WORKSPACE
99

10+
# make a directory for hexadecimal files
11+
mkdir $WORKSPACE/hex
12+
1013
# Initialize and update git submodules
1114
git submodule init
1215
git submodule update
@@ -21,19 +24,22 @@ sed -i "s/\/\* PUBLIC_KEY_PLACEHOLDER \*\//$PUBLIC_KEY_HEX/" $WORKSPACE/apps/fir
2124
# Compile secure bootloader
2225
cd $WORKSPACE/apps/secure_bootloader/build
2326
make
24-
cp $WORKSPACE/apps/firmware/build/_build/secure_bootloader_moko.hex $WORKSPACE/apps/firmware/dfu_images
27+
cp $WORKSPACE/apps/secure_bootloader/build/_build/secure_bootloader_moko.hex $WORKSPACE/hex
2528

2629
# Compile firmware
2730
cd $WORKSPACE/apps/firmware/build
2831
make
32+
cp $WORKSPACE/apps/firmware/build/_build/nrf52810_xxaa.hex $WORKSPACE/hex
33+
34+
# Make hexadecimal files
35+
cd $WORKSPACE/hex
2936

3037
# Generate DFU settings
31-
cd $WORKSPACE/apps/firmware/dfu_images
32-
cp $WORKSPACE/apps/firmware/build/_build/nrf52810_xxaa.hex .
3338
nrfutil settings generate --family NRF52810 --application nrf52810_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 bl_settings.hex
3439

3540
# Merge hex files
36-
mergehex -m bl_settings.hex secure_bootloader_moko.hex nrf52810_xxaa.hex ../../../nRF5_SDK_17.0.2_d674dde/components/softdevice/s112/hex/s112_nrf52_7.2.0_softdevice.hex --output full_dfu.hex
41+
cp $WORKSPACE/nRF5_SDK_17.0.2_d674dde/components/softdevice/s112/hex/s112_nrf52_7.2.0_softdevice.hex $WORKSPACE/hex
42+
mergehex -m bl_settings.hex secure_bootloader_moko.hex nrf52810_xxaa.hex s112_nrf52_7.2.0_softdevice.hex --output full_dfu.hex
3743

3844
# Convert the HEX file to a BIN file
3945
arm-none-eabi-objcopy -I ihex -O binary full_dfu.hex $WORKSPACE/firmware.bin

0 commit comments

Comments
 (0)