Commands

Koheron SDK V1 documentation. The V1 branch is recommended for new instrument development and remains under active development ahead of the major release. Boards currently ship with V0; build and install a V1 OS image to follow this workflow. V1 images do not support legacy V0 instruments.

Command pattern

CFG selects the instrument's config.mk; the default target builds its ZIP archive.

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

Daily development workflow

Deploy to a board running a V1 OS image.

# 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

Output: tmp/examples/alpha250/fft/fft.zip, also copied to tmp/alpha250/instruments/fft.zip for image builds.

Available Makefile targets

make help lists the targets:

  • 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.
  • copy: copies the selected instrument's sources to DEST and sets its NAME from the destination directory.
  • list or examples: lists available example instruments.

Copy an instrument

make copy CFG=examples/alpha250/fft/config.mk DEST=examples/alpha250/my-instrument

DEST must not exist; its basename becomes NAME and must differ from the source name. See copying an example for details.

Build only one part

Append fpga, server, web or os to build that component, for example:

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

Run on a board

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

run builds, uploads and starts the instrument, then streams logs. Ctrl+C stops the log stream and leaves the instrument running. The Python upload/run API returns after deployment for scripts and agents.

Build a bootable image

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

Output: tmp/examples/alpha250/fft/alpha250-fft.zip, containing the SD card image, manifest and SHA256 checksum. Rebuild the image for OS, kernel, boot, board support or default instrument changes. Use run for instrument development.

Useful variables

  • CFG: path to the selected instrument config.mk.
  • DEST: new instrument directory for make copy; its directory name becomes NAME.
  • HOST: board IP address for upload/run targets.
  • VERBOSE=1: enable more verbose build output.
  • TMP: output root; defaults to tmp.

Clean

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

Removes generated files for the selected instrument.

See also

hello@koheron.com