Code Monkey home page Code Monkey logo

embedded-runner's Introduction

embedded-runner

Cargo runner for embedded projects using OpenOCD.

Usage

  1. Install the crate using cargo install embedded-runner.

  2. Set embedded-runner run as cargo runner at .cargo/config.toml

    [target(<your target configuration>)]
    runner = "embedded-runner run"
    
  3. Create a runner configuration

    By default, embedded-runner will look for a runner configuration at .embedded/runner.toml. A custom path may be set by the --runner-cfg argument before the run command.

    If you use mantra to trace requirements, you may add the [mantra] section to automatically get trace and coverage data from executed tests. Be sure to enable the defmt feature for mantra-rust-macros to get the required coverage logs.

    The configuration allows the following settings:

    # Optional: Load section in the gdb script.
    # 
    # The load section gets resolved using the Tera templating language.
    # Variables `binary_path`, `binary_filepath`, and `binary_filepath_noextension` are passed as context.
    #
    # e.g. "load {{ binary_filepath }}"
    load = "load"
    
    # Optional: Path to a custom OpenOCD configuration
    openocd-cfg = ".embedded/openocd.cfg"
    
    # Optional: Path to write OpenOCD logs to
    openocd-log = ".embedded/openocd.log"
    
    # Optional: RTT port to use
    rtt-port = 19021
    
    # Enables *mantra*
    [mantra]
    
    # Optional: The URL to connect to the *mantra* database
    db-url = "sqlite://.embedded/mantra.db?mode=rwc"
    
    # Optional: Includes traces outside the working directory
    extern_traces = ["../../crate-dep-test"]
    
    
    # Optional: Settings to automatically extract requirements
    [mantra.extract]
    
    # Path to look for requirements
    root = "../reqs.md"
    
    link = "local"
    
    # Kind of origin to extract requirements from.
    # Currently only "GitHub" is supported
    origin = "GitHub"
    
    
    # Optional: Define a command to run before the runner executes the binary.
    # A 'post-runner' may also be set that is run after executing the binary.
    [pre-runner]
    
    # Name of the command
    name = "powershell"
    
    # Arguments passed to the command.
    # The binary path is automatically added as last argument 
    args = ["echo"]
  4. Add your OpenOCD configuration

    By default, embedded-runner will look for .embedded/openocd.cfg, but you may change this in the runner configuration.

  5. Create and run your defmt-test tests

    Consult the defmt-test documentation on how to create and manage tests using the defmt framework.

License

MIT Licensed

embedded-runner's People

Contributors

mhatzl avatar

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.