-
Notifications
You must be signed in to change notification settings - Fork 54
Architecture
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).
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.
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.
The DAPjs library is designed to have abstraction points to promote flexibility.
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
The interface layer abstracts the debug interface. Currently this supports the Arm Debug Interface over CMSIS-DAP.
The processor layer abstracts the processor being debugged. Currently this supports CortexM.