From d9b2c8e44d299781416901c64bed7e2edae271ee Mon Sep 17 00:00:00 2001 From: daylily Date: Mon, 7 Apr 2025 21:46:33 -0400 Subject: [PATCH] add building instructions --- firmware/README.md | 10 ++++++++++ webapp/README.md | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/firmware/README.md b/firmware/README.md index 2b0f1cf..d30b25d 100644 --- a/firmware/README.md +++ b/firmware/README.md @@ -16,6 +16,16 @@ This is the firmware implementation for Inkclip. It implements a USB 2.0 HID dev An ASCII representation of the device's unique serial number. Currently, this is implemented as the base-64 encoding of the 12-byte UID of the STM32 MCU. +## Flashing the Firmware + +If you simply want to flash the firmware onto a completed Inkclip device, you can use the [cargo-dfu](https://github.com/dfu-rs/cargo-dfu) tool. Simply connect the device via USB with BOOT0 pulled up and then run under this directory + +```sh +cargo dfu --release +``` + +If you want to debug this firmware through e.g. [SWD](https://developer.arm.com/documentation/100893/latest/Debug-and-trace-interface/Serial-Wire-Debug-signals) then you can use [probe-rs](https://probe.rs/) with a debugging probe instead. + ## Implementation Details - The USB device sets the maximum current to 100mA, which should be well above the active power draw of the actual hardware (9mA MCU + 8mA e-paper). diff --git a/webapp/README.md b/webapp/README.md index 5ae52cf..4a2b0a6 100644 --- a/webapp/README.md +++ b/webapp/README.md @@ -6,6 +6,10 @@ Write to Inkclip is a web application for writing patterns onto the Inkclip devi This application also supports some primitive image editing functions, such as scaling and cropping, rotation and mirroring, the adjustment of contrast and brightness, and a range of dithering algorithms available to use for converting images to black-and-white. +## Building + +Run `npm run dev` under this directory in order to spin up a Vite development server, and run `npm run build` to bundle the application. + ## Technical matters Write to Inkclip depends on the [WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API) to send data to devices. As a consequence, it is only supported on Chromium-based browsers, which are the only browsers that support WebHID at this time.