Skip to content

probe-rs/cargo-embed

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

408: Bump env_logger from 0.9.3 to 0.10.0 r=Tiwalun a=dependabot[bot]

Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to 0.10.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's changelog</a>.</em></p>
<blockquote>
<h2>[0.10.0] - 2022-11-24</h2>
<p>MSRV changed to 1.60 to hide optional dependencies</p>
<h3>Fixes</h3>
<ul>
<li>Resolved soundness issue by switching from <code>atty</code> to <code>is-terminal</code></li>
</ul>
<h3>Breaking Changes</h3>
<p>To open room for changing dependencies:</p>
<ul>
<li>Renamed <code>termcolor</code> feature to <code>color</code></li>
<li>Renamed <code>atty</code> feature to <code>auto-color</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/rust-cli/env_logger/commit/ff029fa8b6258ed926134f51d38ee85ebd553c35"><code>ff029fa</code></a> chore: Release</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/389cc52d5a14b45286c6478b00148abeaeccf4a7"><code>389cc52</code></a> docs: Fix changelog links</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/2979c4b7b8a42e0247dee69a513249976afcd1ed"><code>2979c4b</code></a> docs: Update changelog</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/4c379170f7824ac10eab9af52f5645ecae9214cd"><code>4c37917</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-cli/env_logger/issues/248">#248</a> from epage/atty</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/d55d26980f338179e5d1829fb8d16b1d509530f1"><code>d55d269</code></a> style: Make clippy happy</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/066c2192c187f047ae178e786ff36e6cabed21f7"><code>066c219</code></a> fix: Replace atty with is_terminal</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/4db5e8793162e33e17efce36057afaa41d988788"><code>4db5e87</code></a> fix!: Rename termcolor/atty features</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/660cf7feb27e07bd308c3952637c5ae21c438846"><code>660cf7f</code></a> fix: Bump MSRV to 1.60.0</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/e572d048722c0af9c891df4ac8ef0716353c807d"><code>e572d04</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/rust-cli/env_logger/issues/244">#244</a> from epage/update</li>
<li><a href="https://github.com/rust-cli/env_logger/commit/f1ff331fa2e3f1111cd918ba91b22ad5a7070777"><code>f1ff331</code></a> docs: Fix typos</li>
<li>Additional commits viewable in <a href="https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=env_logger&package-manager=cargo&previous-version=0.9.3&new-version=0.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ed571a3

Git stats

Files

Permalink
Failed to load latest commit information.

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.

Support

If you think cargo-embedded makes your embedded journey more enjoyable or even earns you money, please consider supporting the project on Github Sponsors for better support and more features.

Installation

You can install this utility with cargo after installing the prerequisites listed below:

cargo install cargo-embed

Usage

You can use it like any cargo command would be used

cargo embed <args>

This will do following in sequence:

  1. build your binary
  2. detect a probe
  3. (if enabled) upload the contents onto the connected target
  4. (if enabled) reset the target
  5. (if enabled) start RTT host side
  6. (if enabled) start gdb debugging

RTT UI

If you've enabled rtt (see Configuration) the RTT UI will appear automatically.

Keyboard shortcuts

Command Action
^c Quit
Fn{n} Switch to tab n
Any character Add the character to the pending input
Backspace Delete the last character of the pending input
Enter Send the pending input
PgUp Scroll up
PgDn Scroll Down
^l Clear current tab

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.

Building

cargo-embed can be built using cargo, after installing the necessary prerequisites. See the list below for your operating system.

FTDI Support

FTDI support is optional. You can enable it with the ftdi feature. You also need the correct prerequisites from the next section installed.

Prerequisites

cargo-embed depends on the libusb and optionally on libftdi libraries, which need to be installed to build cargo-embed.

Linux

On Ubuntu or Debian, the following packages need to be installed:

> sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev libudev-dev

For Fedora or CentOS

> dnf install systemd-devel

You may also need to remove old versions of libusb:

> sudo apt remove libusb-dev

Windows

On Windows you can use vcpkg to install the prerequisites:

# dynamic linking 64-bit
> vcpkg install libftdi1:x64-windows libusb:x64-windows
> set VCPKGRS_DYNAMIC=1

# static linking 64-bit
> vcpkg install libftdi1:x64-windows-static-md libusb:x64-windows-static-md

macOS

On macOS, homebrew is the suggested method to install libftdi:

> brew install libftdi

Sentry logging

We use Sentry to record crash data. This helps us trace crashes better. No data will ever be transmitted without your consent! All data is transmitted completely anonymously. This is an OPT-IN feature. On crash, cargo-embed will ask you whether to transmit the data or not. You can also set whether to do this for all times with an environment variable to omit the message in the future. If you do not wish to have sentry integrated at all, you can also build cargo-embed without sentry by using --no-default-features.