Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge #190
Browse files Browse the repository at this point in the history
190: README.md: Replace ${PROBE_RUN_CHIP} in code example r=Urhengulas a=bobmcwhirter

The example makes it look like using a literal `${PROBE_RUN_CHIP}` in the `config` is viable, while it seems to not actually be.

Co-authored-by: Bob McWhirter <[email protected]>
Co-authored-by: Johann Hemmann <[email protected]>
  • Loading branch information
3 people authored May 7, 2021
2 parents 29c5ce3 + b99f112 commit 4701ed2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,26 @@ manager before installing `probe-run`.
### 1. Set the Cargo runner

The recommend way to use `probe-run` is to set as the Cargo runner of your application.
Add this line to your Cargo configuration (`.cargo/config`) file:
Add this line to your Cargo configuration file (.cargo/config) and adjust ${PROBE_RUN_CHIP} for the particular `--chip` value:


``` toml
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-run --chip ${PROBE_RUN_CHIP}"
```

Instead of `${PROBE_RUN_CHIP}` you can write the name of your microcontroller.
For example, one would use `nRF52840_xxAA` for the nRF52840 microcontroller.
To list all supported chips run `probe-run --list-chips`.

To support multiple devices, or permit overriding default behavior, you may prefer to set the
`${PROBE_RUN_CHIP}` environment variable, and set `runner` (or
`CARGO_TARGET_${TARGET_ARCH}_RUNNER`) to `probe-run`.

``` toml
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
runner = "probe-run"
```

If you have several probes connected, you can specify which one to use by adding
the --probe option to the `runner` or setting the `${PROBE_RUN_PROBE}` environment
variable with a value containing either `${VID}:${PID}` or `${VID}:${PID}:${SERIAL}`:
Expand Down

0 comments on commit 4701ed2

Please sign in to comment.