J-Link WebUSB

From SEGGER Wiki
Jump to: navigation, search

J-Link makes use of WebUSB to allow easy programming of application images (hex, mot, bin) into the flash of target MCUs. This technique is used as an easy cross-platform alternative to MSD drag & drop programming. It is mainly used by J-Link OB.

Requirements

The following requirements need to be fulfilled in order to use WebUSB flash programming:

  • A current J-Link OB model with WebUSB support
  • A flash loader being pre-loaded into the J-Link OB (already the case for J-Link OB that supports MSD drag & drop programming)
  • A web browser that supports WebUSB. Today (May 2019) Google Chrome, Microsoft Edge and Opera support WebUSB.

Google Chrome specifics

Experimental web platform features need to be enabled:

  • Go to the address bar in Chrome
  • Enter: chrome://flags/#enable-experimental-web-platform-features
  • Set the feature to "enabled"
  • Restart Chrome

Performance

Flash programming via WebUSB is as fast as MSD drag & drop programming. Usually, the flash of the target system is the bottleneck and J-Link is able to program it at full speed

Why WebUSB

WebUSB allows to easily demonstrate firmware updates via a common interface (web browser) without custom software to be installed. It also provides an easy way of reprogramming an eval board with a new application image without the need to start an IDE etc. This makes it the perfect match for demo applications or learning environments where only the application shall be exchanged without having to learn the whole handling of a specific IDE etc.

Usage

SEGGER hosts a website that allows using WebUSB with J-Links that support it. It demonstrates the easy exchange of a target application by specifying an application image (hex, mot, bin) that shall be downloaded into the target.

WebUSB implementation example

Application image download