8000 doc: Update Building & flashing docs by mchack-work · Pull Request #354 · tillitis/tillitis-key1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

doc: Update Building & flashing docs #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 34 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,47 +87,52 @@ but keep our own copy of it in the repo. See below.

## Building & flashing

These instructions assume you're using a Linux distribution. Most of
them also assume you're using our OCI image
[tkey-builder](https://ghcr.io/tillitis/tkey-builder). If you want to
run native tools, look in `contrib/Dockerfile` and
`contrib/buildtools.sh` for the tools and versions to use.

### FPGA

You need a [TKey
Unlocked](https://shop.tillitis.se/products/tkey-not-provisioned) and
a [TKey Programmer
Board](https://shop.tillitis.se/products/tkey-dev-kit) to use this on
real hardware.

Building is probably easiest using make and Podman. Do this to see all
targets:
Unlocked](https://shop.tillitis.se/products/tkey-not-provisioned), a
[the TP1 TKey Programmer
board](https://shop.tillitis.se/products/tkey-dev-kit), and probably a
[Blinkinlabs CH55x Reset
Controller](https://shop-nl.blinkinlabs.com/products/ch55x-reset-controller)
to use this on real hardware.

```
cd contrib
make
```
Building is probably easiest using make and Podman.

Build the entire FPGA bitstream, which includes the firmware, using
Podman:
To build everything and then flash the resulting bitstream with the
testloadapp in app slot 0 and the partition table copies in one go,
place the TKey Unlocked in the TP1, then do:

```
cd contrib
make run-make
```

To flash the bitstream, the testloadapp in app slot 0 and the
partition table copies in one go, place the TKey Unlocked in the TP1,
then do:

```
make flash
```

This uses the make target `prog_flash` in
`hw/application_fpga/Makefile` behind the scenes, but mounts your TP1
device into the container.

To see all targets:

```
cd contrib
make
```

See the [Tillitis Developer Handbook](https://dev.tillitis.se) for
more.

### USB Controller

The TKey uses a WCH CH552 chip as a USB controller. It has its own
firmware.

Build:

```
Expand All @@ -137,15 +142,21 @@ cd hw/usb_interface/ch552_fw
make
```

To flash the controller you need hardware like the [Blinkinlabs CH55x
Reset
To flash the controller with new firmware 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).

The bootloader identifies itself as USB VID 4348, PID 55e0. To be able
to access it and run `chprog` without root you need to allow your user
to access it. Place `contrib/99-tillitis.rules` in `/etc/udev/rules.d`
and run `udevadm control --reload`. Now you can add your user to the
`dialout` group and access it.

1. Connect the Reset Controller to your computer through "DUT\_IN"/"PC".
2. Connect the TKey to "DUT\_OUT"/"DUT".
3. Press the "Bootloader" button.
Expand Down
0