Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@connectedyard/node-jlink
Advanced tools
NodeJS driver for the Segger JLink command line tool, jlinkexe, including conveniences found in nrfjprog (Nordic's commandline tool for the NRF series of micro-controllers).
Calls the jlinkexe cli tool for maximum compatibility. Tested on Windows, MacOSX and Raspberry Pi.
All commands return promises.
var jlink = require("node-jlink");
jlink.reset(); // resets the device attached to the jlink programmer
var readMyMemCommands = ["h", "mem 0x10001004, 0x20"];
jlink.executeCommands( readMyMemCommands )
.then( function( results ){
console.log( result.stdout );
});
The following nrfjprog commands are implemented as follows.
These commands return a Promise, resolve( true ) on success, reject( error ) on failure.
jlink.reset(); // nrfjprog --reset
jlink.pinReset(); // nrfjprog --pinreset
jlink.eraseAll(); // nrfjprog --eraseAll
jlink.program( firmwareFilePath ); // nrfjprog --program <firmwareFilePath>
Flash memory is returned in a buffer.
jlink.readmem( address, numBytes) // nrfjprog --memrd <address> --w 32 --n <numBytes>
.then( function( buffer ){
})
.catch( function( error ){
});
Arbitrary JLinkEXE scripts can be executed by passing an array of commands into jlink.executeCommands( commands )
. An Promise is returned, and on resolve the Result be as follows:
{
stdout: String, captured from jlinkexe stdout stream, or empty string
stderr: String, captured from jlinkexe stdout stream, or empty string
code: Integer, captured from jlinkexe exit code, or 0
error: Error, from jlinkexe or internal error, or null
}
A complete list of JLinkEXE commands are available at https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf
By default, the JLinkEXE command is expected to be found on the path as jlinkexe
. The default commandline options to jlinkexe are "-device nrf51822 -if swd -speed 4000"
.
To change these values, set jlink.JLinkExe
and jlink.JLinkExeOptions
.
FAQs
jLinkexe driver for nodejs
The npm package @connectedyard/node-jlink receives a total of 42 weekly downloads. As such, @connectedyard/node-jlink popularity was classified as not popular.
We found that @connectedyard/node-jlink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.