4444
4545 - name : Install Embedded Arm Toolchain arm-none-eabi-gcc
4646 if : steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
47- uses : fiam/arm-none-eabi-gcc@v1.0.2
47+ uses : fiam/arm-none-eabi-gcc@v1.0.4
4848 with :
4949 # GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
5050 release : 9-2020-q2
@@ -83,10 +83,16 @@ jobs:
8383 if : steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
8484 run : |
8585 cd ${{ runner.temp }}
86- git clone --branch v1.5.0 https://github.com/JuulLabs-OSS /mcuboot
86+ git clone --branch v1.5.0 https://github.com/mcu-tools /mcuboot
8787
8888 - name : Install imgtool dependencies
89- run : pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
89+ run : |
90+ pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
91+
92+ # cbor is a dependency that is not currently included in mcuboot requirements.txt
93+ - name : Install imgtool dependencies (cbor)
94+ run : |
95+ pip3 install --user cbor
9096
9197 - name : Install adafruit-nrfutil
9298 run : |
99105
100106 - name : Checkout source files
101107 uses : actions/checkout@v2
108+ with :
109+ submodules : recursive
102110
103111 - name : Show files
104112 run : set ; pwd ; ls -l
@@ -110,7 +118,7 @@ jobs:
110118 run : |
111119 mkdir -p build
112120 cd build
113- cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 ../
121+ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../
114122
115123 # ########################################################################################
116124 # Make and Upload DFU Package
@@ -125,19 +133,10 @@ jobs:
125133 cd build
126134 make pinetime-mcuboot-app
127135
128- - name : Create firmware image
129- run : |
130- # The generated firmware binary looks like "pinetime-mcuboot-app-0.8.2.bin"
131- ls -l build/src/pinetime-mcuboot-app*.bin
132- ${{ runner.temp }}/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header build/src/pinetime-mcuboot-app*.bin build/src/pinetime-mcuboot-app-img.bin
133- ${{ runner.temp }}/mcuboot/scripts/imgtool.py verify build/src/pinetime-mcuboot-app-img.bin
134-
135- - name : Create DFU package
136+ - name : Unzip DFU package
136137 run : |
137- ~/.local/bin/adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application build/src/pinetime-mcuboot-app-img.bin build/src/pinetime-mcuboot-app-dfu.zip
138- unzip -v build/src/pinetime-mcuboot-app-dfu.zip
139138 # Unzip the package because Upload Artifact will zip up the files
140- unzip build/src/pinetime-mcuboot-app-dfu.zip -d build/src/pinetime-mcuboot-app-dfu
139+ unzip build/src/pinetime-mcuboot-app-dfu* .zip -d build/src/pinetime-mcuboot-app-dfu
141140
142141 - name : Upload DFU package
143142 uses : actions/upload-artifact@v2
0 commit comments