Skip to content
Rob Moran edited this page Jun 24, 2018 · 2 revisions

Vision

The vision for DAPjs is to enable access to the CMSIS-DAP interface exposed by firmware such as DAPLink as a JavaScript compatible library.

This will include read and write access to AP and DP registers as well as transfer functionality (including bulk transfer).

It is envisioned that multiple transports may be used to access USB in order to increase usability across JavaScript environments including Web (using WebUSB) and desktop/server (using HID/USB in Node.js).

Compatability

The library aims to be compatible with the latest LTS release of Node.js (currently 6.x.x until April 2019) as well as WebUSB compatible browsers (currently Chrome only).

Support for newer JavaScript features (such as async/await) should be considered based on the target environments above. Please check the Node.js compatibility site for feature support in Node.js.

Language

DAPjs is written using Typescript to take advantage of type checking and newer language features.

Visual Studio Code is a good environment for developing the project.

Abstraction Points

The DAPjs library is designed to have abstraction points to promote flexibility.

Transport

The transport layer abstracts the physical access to the debug interface with implementations for:

  • WebUSB - allowing access from a WebUSB compatible browser or from Node.js using a shim
  • HID - allowing access from Node.js to the USB HID interface using the node-hid npm package
  • USB - allowing access from Node.js directly over USB using the usb npm package

Interface

The interface layer abstracts the debug interface. Currently this supports the Arm Debug Interface over CMSIS-DAP.

Processor

The processor layer abstracts the processor being debugged. Currently this supports CortexM.

Clone this wiki locally