Commands

Koheron SDK V1 documentation. You are reading the documentation for the V1 branch. It uses CFG=.../config.mk, memory.yml, Linux FPGA Manager and device-tree overlays. It is not backward-compatible with 0.x instruments.

Command pattern

All instrument builds use the same pattern:

make -j CFG=<path-to-instrument-config.mk> <target>

For example:

make -j CFG=examples/alpha250/fft/config.mk

CFG selects the instrument. It must point to the instrument config.mk file.

Daily development workflow

Use this workflow when developing an instrument:

# Build the complete instrument archive
make -j CFG=examples/alpha250/fft/config.mk

# Upload and run it on a board
make -j CFG=examples/alpha250/fft/config.mk HOST=192.168.1.100 run

For this example, the working archive is tmp/examples/alpha250/fft/fft.zip. The build also copies it to tmp/alpha250/instruments/fft.zip.

This is the normal edit/build/test loop. You do not need to rebuild the SD card image for every instrument change.

Available Makefile targets

Run make help in the V1 SDK checkout to print the target list. The most useful targets are:

  • all: default target; builds the instrument ZIP from FPGA, server and web artefacts.
  • run: uploads the instrument ZIP to HOST through the HTTP API and starts it.
  • fpga: builds the Vivado FPGA bitstream artefacts.
  • server: builds the C++ server and generated driver metadata.
  • web: builds TypeScript and copies web assets.
  • os: builds operating-system artefacts needed by image generation.
  • image: builds the release ZIP containing the SD card image.
  • block_design: opens the Vivado block-design flow interactively.
  • open_project: opens the generated Vivado project.
  • doctor: checks host tools and, when CFG is set, the selected configuration.
  • validate: validates the selected config.mk and memory.yml.
  • list or examples: lists available example instruments.

Build only one part

Use these targets when debugging a specific layer:

  • Full archive: make -j CFG=examples/alpha250/fft/config.mk
    Builds the normal instrument ZIP.
  • FPGA: make -j CFG=examples/alpha250/fft/config.mk fpga
    You changed HDL, XDC or block_design.tcl.
  • Server: make -j CFG=examples/alpha250/fft/config.mk server
    You changed C++ drivers.
  • Web: make -j CFG=examples/alpha250/fft/config.mk web
    You changed HTML, CSS or TypeScript.
  • OS: make -j CFG=examples/alpha250/fft/config.mk os
    You changed the root filesystem or OS runtime files.
  • Image: make -j CFG=examples/alpha250/fft/config.mk image
    Builds the release archive containing the SD card image.

Run on a board

make -j CFG=examples/alpha250/fft/config.mk HOST=192.168.1.100 run

The run target uploads the working instrument archive to the board through the HTTP API and starts it.

Build a bootable image

make -j CFG=examples/alpha250/fft/config.mk image

For the ALPHA250 FFT example, this creates:

tmp/examples/alpha250/fft/alpha250-fft.zip

The release archive contains the SD card image, manifest and SHA256 checksum. Use this target when the operating system, kernel, boot files, board support files or default instrument must be regenerated. For normal C++/FPGA/web changes, build and run the instrument archive instead.

Useful variables

  • CFG: path to the selected instrument config.mk.
  • HOST: board IP address for upload/run targets.
  • VERBOSE=1: enable more verbose build output.
  • TMP: output root; defaults to tmp.

Example with verbose output:

make -j CFG=examples/alpha250/fft/config.mk VERBOSE=1

Clean

make CFG=examples/alpha250/fft/config.mk clean

Use clean when you need to remove generated artefacts for the selected instrument.

See also

[email protected]