File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77WORKSPACE=/spaceinvader
88cd $WORKSPACE
99
10+ # make a directory for hexadecimal files
11+ mkdir $WORKSPACE /hex
12+
1013# Initialize and update git submodules
1114git submodule init
1215git submodule update
@@ -21,19 +24,22 @@ sed -i "s/\/\* PUBLIC_KEY_PLACEHOLDER \*\//$PUBLIC_KEY_HEX/" $WORKSPACE/apps/fir
2124# Compile secure bootloader
2225cd $WORKSPACE /apps/secure_bootloader/build
2326make
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
2730cd $WORKSPACE /apps/firmware/build
2831make
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 .
3338nrfutil 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
3945arm-none-eabi-objcopy -I ihex -O binary full_dfu.hex $WORKSPACE /firmware.bin
You can’t perform that action at this time.
0 commit comments