Code Monkey home page Code Monkey logo

pc-nrfjprog-js's Introduction

pc-nrfjprog-js

Node.js library that exposes the functionality of the nRF Command Line Tools, used for development, programming, and debugging of Nordic Semiconductor's SoCs (System on Chip).

Installing

The library can be installed from npm, using:

npm install pc-nrfjprog-js

This will pull down precompiled binaries for your platform/runtime environment. If precompiled binaries do not exist, then npm will try to compile them, which requires:

  • Node.js (>=4)
  • npm (>=3.7.0)
  • CMake (>=2.8.12)
  • A C/C++ toolchain

As part of the installation procedure, pc-nrfjprog-js will check if it can access the nrfjprog libraries, and verify that they are up to date. If not, it will try to install/upgrade these libraries.

Building from source

The library can be built from source, using:

npm run build

The library can be build from source while installing, using:

npm install --build-from-source

Building from source requires the tools from Installing to be installed.

Required setup

SEGGER J-Link Software must be downloaded and installed.

If you are seeing errors like Errorcode: CouldNotLoadDLL (0x3) then please check that the J-Link library is properly installed.

API documentation

https://nordicsemiconductor.github.io/pc-nrfjprog-js/

Example

const nrfjprogjs = require('pc-nrfjprog-js');

nrfjprogjs.getConnectedDevices(function(err, devices) {
    console.log('There are ' + devices.length + ' nRF devices connected.');
});

Tests

The project has integration tests that run against a devkit/dongle. Note that these tests will erase the contents on the connected devkit/dongle. To run the tests:

npm test

pc-nrfjprog-js's People

Contributors

chunfantasy avatar bencefr avatar mrodem avatar ivansanchez avatar kenr avatar coqrogue avatar bihanssen avatar mathiasap avatar datenreisender avatar riphiphip avatar coderbyheart 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.