Code Monkey home page Code Monkey logo

cheri-examples's Introduction

cheri-examples

Examples of CHERI fundamental operations, interesting corner cases, and simple demonstrative applications.

A Makefile is provided for each supported platform, and a basic build command looks like this:

$ make -f Makefile.<platform>

For most examples, each .c file compiles to a single, self-contained example, and compiles to a binary with the same name (without the .c).

Note that this only builds examples at the top level. Some examples are grouped into their own directories, with their own makefiles. However, the available make targets are consistent, where possible. Refer to their respective README files for details.

Prerequisites

  • An SDK for your <platform>, like those built by cheribuild. By default, the makefiles will search ~/cheri/ for an appropriate SDK, but this can be overridden by defining CHERIBASE. Alternatively, a direct path to the SDK can be given in SDKBASE.
  • For run-<binary> targets, a machine or model that can run the result, reachable by SSH.
  • GNU make. Depending on your platform you might need to specify gmake rather than make.

Usage

Targets available for all example directories are:

  • all, the default, which builds all binaries,
  • clang-format, to format all example code,
  • clean, to remove generated files, for this <platform> only.

The top level examples, and most examples in sub-directories, also allow individual examples to be built or run:

  • bin/<binary>, to build a specific binary,
  • run-<binary>, to scp a binary and run it.

Refer to their respective README files for details.

All build output is stored in bin/<platform>.

Note that the run-<binary> targets require SSHPORT to be defined. RUNUSER and RUNHOST can also be specified if required, but default to root and localhost, respectively, since this is convenient for CheriBSD models.

For example:

$ SSHPORT=12345 make -f Makefile.morello-purecap run-seal

cheri-examples's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.