Skip to content

node-usb/node-usb-test-firmware

Repository files navigation

Node.js USB Test Firmware

Build Status

Test firmware for the node-usb project.

Usage

This project has been built for the STM32F103 Microprocessor, specifically the low-cost blue-pill device.

Grab a binary from the releases and flash it to your hardware.

Execute the node-usb tests and ensure they pass.

Flashing

There are many ways to flash binaries to target hardware, this project was built using an ST-LINK/v2 on MacOS as follows:

Connect 3V3, SWDIO, SWCLK and GND wires of the SWD connector to the ST-LINK device:

connections 1d9cb4d1ed9b7be6277ec46973dacb3303a7c211

Install the OSS ST-LINK tools

> brew install stlink

Confirm the device can be found:

> st-info --probe

Flash the firmware to the device:

> st-flash --reset write firmware.bin 0x08000000

Development

If you want to build this locally (for example to target a different device), clone this repository recursively:

> git clone https://github.com/node-usb/node-usb-test-firmware --recurse-submodules

Ensure the arm-embedded gcc toolchain is installed. eg. on MacOS:

> brew install --cask gcc-arm-embedded

Build the project:

> make -C libopencm3
> make