Commit Graph

36 Commits

Author SHA1 Message Date
Jonas Thörnblad
08a204dfa6
Minimize number of Dockerfile RUN commands to lower number of
used layers in the image. Too many layers will give an error.
2024-11-22 15:47:41 +01:00
Mikael Ågren
a32ecade54
Fix flash target in contrib/Makefile
Setting the working directory to a directory that exist.

Previously the working directory was set to /build/hw/application_fpga.
But that path does not exist since hw/application_fpga was mounted to
/build. Thus resulting in an error:
'Error: workdir "/build/hw/application_fpga" does not exist on
container'
2024-10-25 12:55:27 +02:00
Jonas Thörnblad
f66617431b
Update toolchain with new versions of FPGA tools and remove fw/apps/programmer toolschains
- Change docker image to ubuntu 24.04

 - Add new versions of:
	* clang (18.1.3, part of ubuntu 24.04)
	* icestorm (commit 738af822905fdcf0466e9dd784b9ae4b0b34987f)
	* yosys (0.45)
	* nextpnr (0.7) + extra patches for RNG seed handling and early exit
	* iverilog (v12)
	* verilator (v5.028)
	* verible (v0.0-3795)
	* cocotb (v1.9.1)
 - Remove:
	* gcc-arm-none-eabi
	* libnewlib-arm-none-eabi
	* libstdc++-arm-none-eabi-newlib
	* pico-sdk
	* golang
2024-10-16 18:43:29 +02:00
Jonas Thörnblad
9e57296d91
Include SPI master in default build
This prevents building without the SPI master, the intention is to use
a different method than if-defs, but it will be introduced at a later
stage.
2024-10-16 12:50:32 +02:00
Daniel Jobson
056ee4d3ee
Add make target to clean testbench files
Add it as default in the contrib Makefile.
2024-10-11 15:50:07 +02:00
Joachim Strömbergson
3bc2453287
A construction of a minimal SPI master.
- NOTE: This is an optional feature, not built by default. Not included
  in the tk1 for sale at Tillitis shop.
- This makes it possible to interface the SPI flash onboard TKey.
- To include the SPI master in the build, use `make application_fpga.bin
  YOSYS_FLAG=-DINCLUDE_SPI_MASTER`.

Signed-off-by: Joachim Strömbergson <joachim@assured.se>
2024-06-11 15:28:29 +02:00
Michael Cardell Widerkrantz
d10c4972d7
Use tkey-builder:4 2024-03-22 10:54:33 +01:00
Michael Cardell Widerkrantz
da40edfc51
tkey-builder: Include clang-tidy & splint
To be able to run statical analysis on source, include clang-tidy and
splint (see make check) in tkey-builder.
2024-03-21 15:03:08 +01:00
Michael Cardell Widerkrantz
48324fe5b3
tp1 fw: Update pico-sdk to 1.5.1 2024-03-21 14:17:01 +01:00
dehanj
57a6ee2a12
Use tkey-builder:3 as default when building 2024-03-20 17:19:59 +01:00
Michael Cardell Widerkrantz
0590445f3d
Add testbench targets on top-level
The testbenches live in their own Makefiles under
hw/application_fpga/core/*/toolruns (except picorv32). Let's add a
top-level target to build and run them.

In order to run core testbenches, use

  cd hw/application_fpga
  make tb

or if using Podman:

  cd contrib
  make run-tb

to run the same target in a container.
2024-03-20 13:47:12 +01:00
Joachim Strömbergson
ea9271292c
Add Icarus Verilog compiler, simulator used by testbenches
Signed-off-by: Joachim Strömbergson <joachim@assured.se>
2024-03-20 13:47:12 +01:00
Michael Cardell Widerkrantz
fcccee8ec8
Tkey-builder: Use Ubuntu-23.10, yosys-0.36 & nextpnr-0.6 2024-03-14 14:22:57 +01:00
Michael Cardell Widerkrantz
5f0a9bec9a
Add flash make podman target
Use the iceprog in the tkey-builder image to program the SPI flash in
the TKey.
2023-09-01 13:39:25 +02:00
Daniel Lublin
ff71f796e3
toolchain: use new image by default
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 17:03:53 +02:00
Daniel Lublin
508d044430
toolchain: revise Makefile for container builds
Use podman primarily. Default to using the fully qualified image from
ghcr.io

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 11:45:43 +02:00
Daniel Lublin
fae06116dd
toolchain: pin yosys to latest tag, icestorm to recent commit, use newer nextpnr
The icebram and nextpnr issues have been resolved.

Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-03-29 11:45:43 +02:00
Matthew Mets
604bbdbd02
Add Pico SDK to docker image, for building tp1 firmware 2023-03-21 14:38:29 +01:00
Matt Mets
8894eb4247
Add picosdk to dockerfile 2023-03-21 14:38:29 +01:00
Matt Mets
df6f66c064
Update udev rule to match new programmer VID/PID 2023-03-21 14:38:29 +01:00
Matthew Mets
17b8cb515b
Update toolchain for raw_usb dependencies
Addresses #82
2023-03-21 14:38:27 +01:00
Matthew Mets
84e2bedef5
Fix udev rules
* USB VID and PID are case sensitive
* Only give permissions for owner and group
2023-03-21 14:38:26 +01:00
Matthew Mets
fc335bfd7a
Update udev rule for raw usb programmer 2023-03-21 14:38:26 +01:00
Joachim Strömbergson
9f7d137227
Add podman pull target for tkey-builder
Signed-off-by: Joachim Strömbergson <joachim@assured.se>
2023-03-16 16:23:48 +01:00
Matthew Mets
938f2b16d7 Pin icestorm in Dockerfile to a known-good commit 2023-03-02 11:08:10 +01:00
Daniel Lublin
9a6a790715
Add github action with basic CI that builds
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2023-02-03 14:28:56 +01:00
Daniel Lublin
b184c0a94d
Let podman/docker remove containers after running 2023-01-27 10:10:18 +01:00
Matthew Mets
072b204d3d
Add (hardware) production tests for the TK-1 and TP-1 (#69)
* ch552 firmware: add ch55x support files directly

* Add sdcc compiler to docker image, for building CH552 firmware

* Rework production test script

* Add menu-based test runner
* Rewrite production test flows as lists of individual tests
* Add both production flows and manual tests to menu

* Switch to using included binaries

* production test: Update message format
* test_txrx_touchpad: Retry if device communications fail
* production test: put all binaries in binaries/ folder
* binaries/top.bin: replace broken binary

* flash_check: Check for explicit flash IDs

* Document most test procedures

* Test plan documentation

* Sample udev rules

* Production test: allow external references to be overridden

* Remove outdated descriptions

* Correct shebang

* Update shebangs to comply with PEP 394

Change the python scripts to call python instead of python3, as this
works cross platform. See:
https://peps.python.org/pep-0394/#for-python-script-publishers

* Move production test to higher-level directory

* Clarify production test setup

* Move USB C connector test to separate directory

Co-authored-by: Michael Cardell Widerkrantz <mc@tillitis.se>
2023-01-11 16:33:01 +01:00
Michael Cardell Widerkrantz
e7e03c21b9
build tools: Add podman support
- Add a small menu of build targets
- Add podman support, both building the image, creating a container of
  the image and running shell, and running make inside a podman image.
2022-12-16 10:14:21 +01:00
Daniel Lublin
3435941eab
Remove version suffixes, no longer needed on ubuntu 22.10 (clang 15)
Signed-off-by: Daniel Lublin <daniel@lublin.se>
2022-11-23 09:47:48 +01:00
Daniel Lublin
c9755e4cca
Add deps for building qemu 2022-09-29 15:24:21 +02:00
Daniel Lublin
8f4f3585f7
Build specific version of nextpnr
Keep our repo-commit notes in /usr/local so they are copied over to
final image.
2022-09-23 12:10:38 +02:00
Daniel Lublin
6ff117cb5d Simplify Dockerfile 2022-09-20 15:45:24 +02:00
Matthew Mets
1d7a8cd506 Reduce final Docker image size
This brings it back to 2.2GB:
docker image ls
REPOSITORY   TAG       IMAGE ID       CREATED                  SIZE
key1         latest    7456feccd2fd   Less than a second ago   2.22GB
2022-09-20 14:24:59 +02:00
Daniel Lublin
0a2cbb2341
Clone correct branch in Dockerfile example 2022-09-20 07:43:28 +02:00
Daniel Lublin
5fd05ab9f0
Add attempt at a docker image for the toolchain 2022-09-19 15:53:01 +02:00