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
Size: 66486
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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).
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:
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.
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.
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.
http://nordicsemiconductor.github.io/pc-nrfjprog-js/
t nrfjprogjs = require('pc-nrfjprog-js');
progjs.getConnectedDevices(function(err, devices) {
console.log('There are ' + devices.length + ' nRF devices connected.');
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