Skip to content

Repository files navigation

DAPLink Web Console

A browser-based CMSIS-DAP toolkit for probing, flashing, reading, and debugging Cortex-M targets over WebUSB or WebHID.

DAPLink Web Console talks directly to compatible debug probes from the browser. No desktop application, driver bridge, or backend service is required. Firmware files, flash algorithms, device data, and session logs stay in the browser unless you explicitly export them.

Important

The core workflows are implemented, but hardware validation across probe firmware, operating systems, and target families is still in progress. Review the roadmap before using the console on production hardware.

Features

Probe and connect

  • CMSIS-DAP v2 Vendor Bulk transport through WebUSB
  • Legacy CMSIS-DAP v1 HID transport through WebHID
  • Descriptor-based discovery without fixed VID, PID, interface, endpoint, or packet-size assumptions
  • Probe identity, firmware, packet configuration, and capability inspection
  • SWD and JTAG link setup with configurable debug clock
  • SWJ switching, SWD DPIDR probing, target reset, and exportable session logs

Flash programming

  • Intel HEX and raw BIN parsing and validation
  • CMSIS-FLM ELF32 validation, including geometry, sectors, and entry points
  • Local flash-algorithm storage in IndexedDB
  • Sector/chip erase, page programming, read-back verification, and target reset
  • Catalog contribution ZIP export with provenance and verification metadata

See Flash Algorithms for algorithm packaging, validation, licensing requirements, and the contribution workflow.

Flash reading and analysis

  • Cancellable, chunked target-flash reads with progress reporting
  • BIN, Intel HEX, and JSON report exports
  • SHA-256, CRC-32, entropy, blank-range, programmed-range, and sector analysis
  • Cortex-M vector-table validation and printable-string extraction
  • Comparison with a locally selected firmware image

See Flash Read and Analysis for data-handling behavior and current limits.

Cortex-M debugging

  • Halt, run, step, reset, and core-state inspection
  • Core-register snapshots and halted-core register writes
  • Bounded memory reads and writes with a hexadecimal view
  • FPB v1/v2 hardware breakpoints
  • Configurable-fault and hard-fault status decoding

See Debugger for safety rules, supported operations, and remaining hardware validation.

DAPLink serial console

DAPLink Virtual COM Port support uses the Web Serial API. Serial permission and connection are independent from the CMSIS-DAP WebUSB/WebHID session, allowing both channels to remain active at the same time.

  • Configurable baud rate, data bits, stop bits, parity, and flow control
  • Streaming UTF-8 receive and text send with selectable line endings
  • Raw HEX byte send supporting separated, 0x-prefixed, and continuous input
  • DTR/RTS control, per-line timestamped RX/TX records, automatic scrolling, pause, clear, counters, and text-log export
  • VID/PID comparison hint against the connected CMSIS-DAP probe
  • Draggable and resizable floating terminal for monitoring serial output while using the debugger
  • RX text search with match counts, highlighting, and previous/next navigation
  • Optional ANSI terminal color rendering, disabled by default

See Serial Console for the implementation design, browser permission model, and milestone breakdown.

Requirements

  • Desktop Chrome or Edge with WebUSB, WebHID, and Web Serial support
  • HTTPS in production; localhost is accepted during development
  • A CMSIS-DAP v2 Vendor Bulk probe or CMSIS-DAP v1 HID probe
  • A supported Cortex-M target for flash and debugger workflows

Firefox and Safari do not currently expose the required WebUSB/WebHID/Web Serial APIs. Mobile browsers are not supported.

Getting started

npm ci
npm run dev

Open http://127.0.0.1:4173, select the appropriate CMSIS-DAP transport from the connection menu, and grant access to the probe when the browser prompts you.

Build and verify

npm test
npm run typecheck
npm run build

The production build is written to dist/. To preview it locally:

npm run preview

Hardware verification should include a CMSIS-DAP v1 HID probe, a Full-Speed CMSIS-DAP v2 64-byte probe, and a High-Speed CMSIS-DAP v2 512-byte probe before a public release.

Deploy to Cloudflare Pages

Connect the repository in Workers & Pages and use these build settings:

Setting Value
Framework preset Vite
Build command npm run build
Build output directory dist
Node.js version 22

Add the following production environment variable so that exported flash-algorithm contributions can open a prefilled issue in this repository:

VITE_ALGORITHM_CATALOG_URL=https://github.com/imliubo/daplink.dev

Cloudflare Pages provides HTTPS automatically, which is required for WebUSB and WebHID outside local development. You can also deploy an existing build with Wrangler:

npm run build
npx wrangler pages deploy dist --project-name=daplink-web

Documentation

Safety

Flash erase/program operations and debugger writes can permanently change the connected target. Confirm the target family, memory map, power state, and flash algorithm before running them. Keep an independent recovery method available while testing new target support.

License

This project is licensed under the MIT License.

About

A browser-based CMSIS-DAP toolkit for probing, flashing, reading, and debugging Cortex-M targets over WebUSB or WebHID.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages