Nordic nrf51 sdk sources. Mirrored from

Dependents:   nRF51822 nRF51822

Mon Apr 11 16:13:57 2016 +0000
Thanks to web-ide, it is not possible to add files to .hgignore.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vcoubard 4:7019f1d6317d 1 # nrf51-sdk
vcoubard 32:6335323e4327 2 Module to contain files provided by the nordic nRF51 SDK. The latest version of this module uses files from Nordic SDK 10.0.0. The files are extracted from [here](
vcoubard 4:7019f1d6317d 3
vcoubard 4:7019f1d6317d 4 ## Changes made to Nordic files
vcoubard 16:1bedf466155d 5 The files are kept the same as much as possible to the Nordic SDK. Modifications are made in order to integrate with mbed.
vcoubard 40:5f862d7e2d0a 6 - ble/common/ble_conn_state.c: Preprocessor tests regarding S110, S120 or S130 macro should be replace by TARGET_MCU_NRF51_XXK_SXXX tests
vcoubard 44:12eac0290243 7 - `ble.h` in `source/nordic_sdk/components/softdevice/s130/headers/ble.h` has to be renamed `nrf_ble.h`. All files which include this file should be updated accordingly.
vcoubard 44:12eac0290243 8
vcoubard 4:7019f1d6317d 9
vcoubard 4:7019f1d6317d 10 ## Porting new versions of Nordic SDK
vcoubard 8:6a9544c0fdc5 11 A list of files currently requierd by mbed is maintained in [script/required_files.txt]( [A python script]( is written to help porting from nordic sdk releases. **required_files.txt** is parsed to find a list of filenames. The script searches for these filenames in the sdk folder, and copy then into the yotta module mirroring the folder structure in the sdk. **extraIncludes** is automatically added to module.json to allow direct inclusion of noridc headers with just the filename.
vcoubard 4:7019f1d6317d 12
vcoubard 4:7019f1d6317d 13 ### Script usage
vcoubard 4:7019f1d6317d 14 ```
vcoubard 17:03954fd2b563 15 python [options] <full-noridc-sdk-path> <nrf51-sdk-yotta-module-path>
vcoubard 17:03954fd2b563 16 options: --purge : to delete all existing files and start again
vcoubard 17:03954fd2b563 17 --dry-run : to list the files to be copied but not actually copy them
vcoubard 4:7019f1d6317d 18 ```
vcoubard 4:7019f1d6317d 19
vcoubard 5:ce89fa3dfbaf 20 There are files in the sdk with the same filename but in different folder. This is dealt with by excluding certain directories. The excluded directories are listed in [](
vcoubard 5:ce89fa3dfbaf 21
vcoubard 5:ce89fa3dfbaf 22 After running the script, the changes in [the previous section](#changes-made-to-nordic-files) will have to be applied manually again.
vcoubard 5:ce89fa3dfbaf 23
vcoubard 5:ce89fa3dfbaf 24 Folder structure or even file name can change between releases of the nordic sdk, hence a degree of manual adjustment is needed when porting.
vcoubard 5:ce89fa3dfbaf 25
vcoubard 6:ac5a8f5c2d96 26 ## Using Noridc Headers
vcoubard 5:ce89fa3dfbaf 27 The nordic sdk is written in C and yotta modules support C++. If you are trying to include Nordic files in a cpp program, you need to use the `extern "C"` keyword around the includes.
vcoubard 5:ce89fa3dfbaf 28 ```c
vcoubard 5:ce89fa3dfbaf 29 extern "C" {
vcoubard 5:ce89fa3dfbaf 30 #include "softdevice_handler.h"
vcoubard 5:ce89fa3dfbaf 31 }
vcoubard 5:ce89fa3dfbaf 32 ```