#embedded

app cargo-embed

A utility to develop software for embedded ARM and RISC-V cores

6 releases (3 breaking)

new 0.9.1 Sep 15, 2020
0.9.0 Sep 2, 2020
0.8.0 Jun 30, 2020
0.7.0 Jun 2, 2020
0.6.1 Apr 22, 2020

#47 in Embedded development

Download history 16/week @ 2020-05-27 40/week @ 2020-06-03 15/week @ 2020-06-10 19/week @ 2020-06-17 27/week @ 2020-06-24 46/week @ 2020-07-01 63/week @ 2020-07-08 84/week @ 2020-07-15 35/week @ 2020-07-22 15/week @ 2020-07-29 18/week @ 2020-08-05 56/week @ 2020-08-12 33/week @ 2020-08-19 29/week @ 2020-08-26 72/week @ 2020-09-02 43/week @ 2020-09-09

177 downloads per month

MIT/Apache

63KB
1.5K SLoC

cargo-embed

crates.io documentation Actions Status chat

This crate provides a cargo subcommand to work with embedded targets.

It can flash targets, just like cargo-flash but can do much more, such as logging RTT output from the target, opening a GDB server connected to the target, and much more functionality such as ITM to come!

Various chip families including but not limited to nRF5x, STM32 and LPC800 can be worked with using DAPLink, ST-Link or J-Link. It supports all the targets & probes probe-rs supports.

Installation

You can install this utility with cargo:

cargo install cargo-embed

Usage

You can use it like any cargo command would be used

cargo embed <args>

which will then build your binary and download the contents onto the connected target.

Configuration

You can configure cargo-embed with a file called Embed.toml (or .embed.toml) in your project directory. That file should be added to your git history.

For local-only configuration overrides, you can create an Embed.local.toml (or .embed.local.toml) file and add that to your .gitignore.

Config file precedence:

  1. Embed.local.*
  2. .embed.local.*
  3. Embed.*
  4. .embed.*
  5. Default configuration

Instead of a TOML file, you can also use a JSON or YAML file. Choose what suits you best!

You can find all available options in the default.toml. Commented out options are the ones that are None by default.

Dependencies

~17MB
~351K SLoC