Skip to content

Commit

Permalink
add a script to get the nrf5 sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongyihui committed Jul 22, 2020
1 parent a7fdb9b commit 9af71c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nrf_sdks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Download the SDK package from [www.nordicsemi.com](https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK/).

The latest version is `15.2.0`, it can be downloaded directly here: [nRF5_SDK_v15.2.0_9412b96](https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK/Download#infotabs)
The examples are based on nRF5 SDK 15.2.0, it can be downloaded directly here: [nRF5_SDK_v15.2.0_9412b96](https://www.nordicsemi.com/Software-and-Tools/Software/nRF5-SDK/Download#infotabs)

Extract the zip file into this directory. This should give you the following folder structure:

Expand All @@ -20,6 +20,8 @@ Extract the zip file into this directory. This should give you the following fol
└── tools
```

If you have `wget` and `unzip`, you can run `./get.sh` to download and extract the sdk.

Config the toolchain path in `makefile.windows` or `makefile.posix` depending on platform you are using. That is, the `.posix` should be edited if your are working on either Linux or macOS. These files are located in:

``` sh
Expand Down
14 changes: 14 additions & 0 deletions nrf_sdks/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

NRF5_SDK=nRF5_SDK_15.2.0_9412b96
NRF5_SDK_ARCHIVE=${NRF5_SDK}.zip
NRF5_SDK_MAJOR=`echo ${NRF5_SDK} | sed -e "s/nRF5_SDK_\([0-9]*\)\..*/\1/g"`
NRF5_SDK_URL=https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v${NRF5_SDK_MAJOR}.x.x/${NRF5_SDK_ARCHIVE}

echo ${NRF5_SDK_URL}

if [ ! -d ${NRF5_SDK} ]
then
wget -c ${NRF5_SDK_URL}
unzip ${NRF5_SDK_ARCHIVE} -d .
fi

0 comments on commit 9af71c2

Please sign in to comment.