Skip to content

Commit 79a6a0c

Browse files
authored
Merge pull request #118 from adafruit/develop
Mass clean up
2 parents c01b7f9 + 392f69a commit 79a6a0c

File tree

51 files changed

+740
-1737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+740
-1737
lines changed

Makefile

Lines changed: 182 additions & 210 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ both bootloader and the Nordic SoftDevice, you can freely upgrade/downgrade to a
105105
## How to compile and build
106106

107107
You should only continue if you are looking to develop bootloader for your own.
108-
You must have have a J-Link available to "unbrick" your device.
109-
110-
### Option 1: Build with Makefile
108+
You must have have a J-Link available to "unbrick" your device.
111109

112110
Prerequisites
113111

@@ -117,7 +115,7 @@ Prerequisites
117115
To build:
118116

119117
```
120-
make BOARD=feather_nrf52840_express all combinehex
118+
make BOARD=feather_nrf52840_express all
121119
```
122120

123121
To flash the bootloader with JLink:
@@ -138,12 +136,6 @@ To flash SoftDevice (and chip erase):
138136
make BOARD=feather_nrf52840_express sd
139137
```
140138

141-
To erase all of flash:
142-
143-
```
144-
make BOARD=feather_nrf52840_express erase
145-
```
146-
147139
For the list of supported boards, run `make` without `BOARD=` :
148140

149141
```
@@ -167,13 +159,11 @@ make: *** [_build/main.o] Error 127
167159
```
168160

169161
... you may need to pass the location of the GCC ARM toolchain binaries to `make` using
170-
the variable `GNU_INSTALL_ROOT` as below:
162+
the variable `CROSS_COMPILE` as below:
171163
```
172-
$ make GNU_INSTALL_ROOT=/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ BOARD=feather_nrf52832 all
164+
$ make CROSS_COMPILE=/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi- BOARD=feather_nrf52832 all
173165
```
174166

175-
_Please note that the path needs a trailing path separator (a `/`)_
176-
177167
#### 2. `mergehex: No such file or directory`
178168

179169
Make sure that `mergehex` is available from the command-line. This binary is
@@ -184,22 +174,3 @@ part of Nordic's nRF5x Command Line Tools.
184174
Make sure that `nrfjprog` is available from the command-line. This binary is
185175
part of Nordic's nRF5x Command Line Tools.
186176

187-
On POSIX-type systems you can temporarily add the path to `nrfjprog` via a
188-
variation on the following command:
189-
190-
```
191-
$ export PATH=$PATH:/location/of/nRF5x-Command-Line-Tools_9_7_2_OSX/nrfjprog
192-
```
193-
194-
### Option 2: Build using Segger Embedded Studio
195-
196-
For easier debugging you can also use [SES](https://www.segger.com/products/development-tools/embedded-studio/).
197-
The project file is located at `src/segger/Adafruit_nRF52_Bootloader.emProject`.
198-
199-
> **Note**: SES only flashes the bootloader when you click download, not the SoftDevice.
200-
You need to flash the SoftDevice beforehand if you haven't already done so.
201-
As mentioned above do something like:
202-
203-
```
204-
make BOARD=feather_nrf52840_express sd
205-
```

lib/sdk11/components/libraries/bootloader_dfu/bootloader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ uint32_t bootloader_dfu_sd_update_continue(void)
442442

443443
uint32_t bootloader_dfu_sd_update_finalize(void)
444444
{
445-
dfu_update_status_t update_status = {DFU_UPDATE_SD_SWAPPED, };
445+
dfu_update_status_t update_status = { 0 };
446+
update_status.status_code = DFU_UPDATE_SD_SWAPPED;
446447

447448
bootloader_dfu_update_process(update_status);
448449

0 commit comments

Comments
 (0)