Code Monkey home page Code Monkey logo

nrf51-sdk's Introduction

nrf51-sdk

Module to contain files provided by the nordic nRF51 SDK. The latest version of this module uses files from Nordic SDK 9.0.0. The files are extracted from here.

Changes made to Nordic files

The files are kept the same as much as possible to the Nordic SDK. Modifications are made in order to integrate with mbed.

Porting new versions of Nordic SDK

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.

Script usage

python pick_nrf51_files.py [options] <full-noridc-sdk-path> <nrf51-sdk-yotta-module-path>
options: --purge   : to delete all existing files and start again
         --dry-run : to list the files to be copied but not actually copy them

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 pick_nrf51_files.py.

After running the script, the changes in the previous section will have to be applied manually again.

Folder structure or even file name can change between releases of the nordic sdk, hence a degree of manual adjustment is needed when porting.

Using Noridc Headers

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.

extern "C" {
#include "softdevice_handler.h"
}

nrf51-sdk's People

Contributors

liyouzhou avatar ytsuboi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.