NordicSemiconductor/pc-nrfjprog-js

Name: pc-nrfjprog-js

Owner: Nordic Semiconductor

Description: Node.js library that exposes the functionality of the nRF5x Command-Line-Tools. API docs: http://nordicsemiconductor.github.io/pc-nrfjprog-js/

Created: 2016-06-01 08:50:25.0

Updated: 2018-05-24 06:39:59.0

Pushed: 2018-03-12 12:06:35.0

Homepage:

Size: 66486

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

pc-nrfjprog-js

Node.js library that exposes the functionality of the nRF5x Command-Line-Tools, used for development, programming, and debugging of Nordic Semiconductor's nRF5x 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:

Required setup

Before using the library, some platform specific setup is required. If you are seeing errors like Errorcode: CouldNotFindJprogDLL (0x2) or Errorcode: CouldNotLoadDLL (0x3) then please check that the tools described below are properly installed.

Windows

Download nRF-Command-Line-Tools and run the installer (exe). This will install the required nrfjprog libraries and SEGGER J-Link.

Note that the nRF-Command-Line-Tools for Windows is only available in 32-bit at the moment. This means that 32-bit Node.js is required in order to use pc-nrfjprog-js on Windows.

Linux/macOS

SEGGER J-Link must be downloaded and installed. The required nRF-Command-Line-Tools libraries are bundled together with pc-nrfjprog-js on Linux/macOS, so they do not have to be installed.

API documentation

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

Example
t nrfjprogjs = require('pc-nrfjprog-js');

progjs.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

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.