Skip to content

Commit c4b2c50

Browse files
authored
Merge pull request #366 from JuergenLeber/master
feat: finalize SoftDevice S340 support
2 parents a766738 + 4ca93c5 commit c4b2c50

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,13 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
259259
target_compile_definitions(bootloader PUBLIC DFU_APP_DATA_RESERVED=${DFU_APP_DATA_RESERVED})
260260
endif ()
261261

262+
#----------------------------------
263+
# ANT_LICENSE_KEY handling
264+
#----------------------------------
265+
if (DEFINED ANT_LICENSE_KEY)
266+
target_compile_definitions(bootloader PUBLIC ANT_LICENSE_KEY=${ANT_LICENSE_KEY})
267+
endif
268+
262269
#----------------------------------
263270
# Get UF2 version from git
264271
#----------------------------------

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ endif
130130
SD_NAME_UPPER = $(subst s,S,${SD_NAME})
131131
CFLAGS += -D$(SD_NAME_UPPER)
132132

133+
#----------------------------------
134+
# ANT_LICENSE_KEY handling
135+
#----------------------------------
136+
ifdef ANT_LICENSE_KEY
137+
CFLAGS += -DANT_LICENSE_KEY=\"$(ANT_LICENSE_KEY)\"
138+
endif
139+
133140
#------------------------------------------------------------------------------
134141
# SOURCE FILES
135142
#------------------------------------------------------------------------------

lib/softdevice/s340_nrf52_7.0.1/readme.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ The SoftDevice S340 is closed-source, not publicly available and is only distrib
55
In order to be able to download the required ANT+ capable SoftDevice and place SoftDevice S340 v7.0.1 files here. You need to register an 'ANT+ Adopter' account at [thisisant.com](https://www.thisisant.com/register/). After around one business day you will receive access to the resources there. Then do the following steps:
66
- Download the SoftDevice S340 v7.0.1 [(here)](https://www.thisisant.com/developer/components/nrf52832#tab_protocol_stacks_tab) and extract its contents
77
- Under `lib/softdevice` in this repository there is a folder called `s340_nrf52_7.0.1`
8-
- Copy the API folder `ANT_s340_nrf52_7.0.1.API`, the license agreement `License_Agreement_ANT_Softdevice_rev3_3.pdf` and the hex file `ANT_s340_nrf52_7.0.1.hex` from the extracted contents to it.
8+
- Copy the API folder `ANT_s340_nrf52_7.0.1.API`, the license agreement `License_Agreement_ANT_Softdevice_rev3_3.pdf` and the hex file `ANT_s340_nrf52_7.0.1.hex` from the extracted contents to it
99
- Rename the API folder to `s340_nrf52_7.0.1_API`
1010
- Rename the hex file to `s340_nrf52_7.0.1_softdevice.hex`
11-
- Modify `lib/softdevice/s340_nrf52_7.0.1_API/include/nrf_sdm.h` on line 191 and remove the two slashes at the beginning of `//#define...` to use the *evaluation key* for the ANT SoftDevice.
11+
- Check `lib/softdevice/s340_nrf52_7.0.1_API/include/nrf_sdm.h` on line 191 to get an *evaluation key* for the ANT SoftDevice which can later be used for the `ANT_LICENSE_KEY` parameter
1212
- **VERY IMPORTANT:** You MUST obtain a valid commercial license key BEFORE releasing a product to market that uses the ANT SoftDevice!
1313

14+
To use the SoftDevice S340 with an existing board the `SD_NAME`, `SD_VERSION` and `ANT_LICENSE_KEY` parameters can just be passed to the command line of the `make` command, e.g.:
15+
```
16+
make BOARD=xiao_nrf52840_ble_sense SD_NAME=s340 SD_VERSION=7.0.1 ANT_LICENSE_KEY=<YOUR_LICENSE_KEY_OR_EVALUATION_KEY> all
17+
```
18+
1419
To add or modify a board with an ANT+ capable SoftDevice S340 the `SD_VERSION` and `SD_NAME` parameters in the corresponding `board.mk` file have to be set:
1520
```
1621
SD_VERSION = 7.0.1

0 commit comments

Comments
 (0)