From 24ef7b412bb9fa4aa7a3fd1193141e7234123f62 Mon Sep 17 00:00:00 2001 From: Michael Cardell Widerkrantz Date: Fri, 23 May 2025 15:43:44 +0200 Subject: [PATCH] doc: Add description on how to build and flash USB controller firmware --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index d247a5f..ac4c9e8 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ but keep our own copy of it in the repo. See below. ## Building & flashing +### FPGA + You need a [TKey Unlocked](https://shop.tillitis.se/products/tkey-not-provisioned) and a [TKey Programmer @@ -124,6 +126,32 @@ device into the container. See the [Tillitis Developer Handbook](https://dev.tillitis.se) for more. +### USB Controller + +Build: + +``` +cd contrib +make run +cd hw/usb_interface/ch552_fw +make +``` + +To flash the controller you need hardware like the [Blinkinlabs CH55x +Reset +Controller](https://shop-nl.blinkinlabs.com/products/ch55x-reset-controller) +and a USB-A to USB-C converter. + +[Reset Controller source](https://github.com/Blinkinlabs/ch55x_programmer). + +You also need [chprog](https://github.com/ole00/chprog). + +1. Connect the Reset Controller to your computer through the "DUT\_IN". +2. Connect the TKey to "DUT\_OUT". +3. Press the "BOOTLOADER" button. +4. Run `make flash_patched` in `hw/usb_interface/ch552_fw` outside of + a container. + ## Updating and working with tkey-libs A copy of [tkey-libs](https://github.com/tillitis/tkey-libs) is kept