Skip to content

Commit cdb69d5

Browse files
authored
Merge pull request #1 from rpseng/master
Making it work on Linux
2 parents 132e117 + 01c2867 commit cdb69d5

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,16 @@ __NOTE:__ During installation it takes the Arduino IDE a few minutes to extract
3434
[adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) (derived from Nordic pc-nrfutil) is needed to upload sketch via serial port.
3535

3636
- For Windows and macOS, pre-built executable binaries are included in the BSP at `tools/adafruit-nrfutil/`. It should work out of the box.
37-
- Linux user need to run follow command to install it from PyPi
37+
- Linux users need to run the follow commands to install the nrfutil tools:
3838

3939
```
40+
$ pip3 install wheel --user
4041
$ pip3 install adafruit-nrfutil --user
4142
```
43+
Then make sure `adafruit-nrfutil` executable is in your path, if not try to add the following to your `.bashrc` file:
44+
```
45+
PATH="$HOME/.local/bin/:$PATH"
46+
```
4247
4348
### Driver Setup for St-Link
4449

boards.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ dsd6Watch.build.ldscript=armgcc_s132_nrf52832_xxaa.ld
4747
dsd6Watch.menu.softdevice.stockFW=Only Softdevice for Flashing via SWD
4848
dsd6Watch.menu.softdevice.stockFW.flashVariantFile=sd.hex
4949
dsd6Watch.menu.softdevice.stockFW.softdeviceversion=2.0.1
50-
dsd6Watch.menu.softdevice.stockFW.softdevice=S132
50+
dsd6Watch.menu.softdevice.stockFW.softdevice=s132
5151
dsd6Watch.menu.softdevice.onlySoftDevice=Back To Stock Firmware
5252
dsd6Watch.menu.softdevice.onlySoftDevice.flashVariantFile=flash.bin
5353
dsd6Watch.menu.softdevice.onlySoftDevice.softdeviceversion=2.0.1
54-
dsd6Watch.menu.softdevice.onlySoftDevice.softdevice=S132
54+
dsd6Watch.menu.softdevice.onlySoftDevice.softdevice=s132
5555

5656
###########################
5757

platform.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,17 @@ recipe.output.save_file_bin={build.project_name}.save.bin
9898
recipe.output.tmp_file_hex={build.project_name}.hex
9999
recipe.output.save_file_hex={build.project_name}.save.hex
100100

101+
#***************************************************
102+
# adafruit-nrfutil for uploading
103+
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
104+
# pre-built binaries are provided for macos and windows
105+
#***************************************************
106+
tools.nrfutil.cmd=adafruit-nrfutil
107+
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/adafruit-nrfutil.exe
108+
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/adafruit-nrfutil
109+
101110
## Create dfu package zip file
102-
recipe.objcopy.zip.pattern="{runtime.platform.path}/tools/adafruit-nrfutil/adafruit-nrfutil.exe" dfu genpkg --application-version 65535 --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
111+
recipe.objcopy.zip.pattern="{tools.nrfutil.cmd}" dfu genpkg --application-version 65535 --application "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.zip"
103112

104113
## Compute size
105114
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
@@ -109,15 +118,6 @@ recipe.size.regex=\.text\s+([0-9]+).*
109118
recipe.output.tmp_file={build.project_name}.hex
110119
recipe.output.save_file={build.project_name}.{build.variant}.hex
111120

112-
#***************************************************
113-
# adafruit-nrfutil for uploading
114-
# https://github.com/adafruit/Adafruit_nRF52_nrfutil
115-
# pre-built binaries are provided for macos and windows
116-
#***************************************************
117-
tools.nrfutil.cmd=adafruit-nrfutil
118-
tools.nrfutil.cmd.windows={runtime.platform.path}/tools/adafruit-nrfutil/adafruit-nrfutil.exe
119-
tools.nrfutil.cmd.macosx={runtime.platform.path}/tools/adafruit-nrfutil/adafruit-nrfutil
120-
121121

122122

123123
#

0 commit comments

Comments
 (0)