Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round two with install and probe instructions #114

Merged
merged 2 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions src/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,60 @@ description: "How to install probe-rs."
order: 20
---

# Quickly
## Using install scripts

Run the setup command specific to your system:

## Linux, macOS
### Linux, macOS

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-installer.sh | sh
```

## Windows (PowerShell)
### Windows

```sh
```ps
irm https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-installer.ps1 | iex
```

## [`cargo binstall`](https://crates.io/crates/cargo-binstall)
## From package managers

### [homebrew](https://brew.sh/)

```bash
brew tap probe-rs/probe-rs
brew install probe-rs
```

### [cargo binstall](https://crates.io/crates/cargo-binstall)

```bash
cargo binstall probe-rs
```

# Installing from source (`cargo install`)
## Installing from source (`cargo install`)

## Prerequisites
### Prerequisites

To build probe-rs from source, you will need a working Rust toolchain. The easiest way is to follow the [rustup installation instructions](https://rustup.rs).

### Debian-based Linux
#### Debian-based Linux

On Debian and derived distros (e.g. Ubuntu), the following packages need to be installed:

```bash
sudo apt install -y pkg-config libudev-dev
```

### RPM-based Linux (Fedora, CentOS)
#### RPM-based Linux (Fedora, CentOS)

```bash
dnf install libusbx-devel libudev-devel
```

### macOS, Windows
#### macOS, Windows

No additional setup is required.

## Installation
### Installation

Install with `cargo install`. This will install the `probe-rs`, `cargo-flash` and `cargo-embed` binaries and put them in `$PATH`.

Expand Down
72 changes: 36 additions & 36 deletions src/docs/getting-started/probe-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ description: "How to set up your debug probe to work with probe-rs."
order: 20
---

## Platform specifics

probe-rs supports multiple probes out of the box.

Most of them require little to no setup. For linux, [udev](#udev-rules) rules
Most of them require little to no setup. For linux, [udev](#linux%3A-udev-rules) rules
are required for non admin access.

## udev rules
### Linux: udev rules

By default, the debug probes are only accessible by users with root privileges
on Linux based systems. It is recommend to use appropriate udev rules to allow
Expand All @@ -29,6 +31,14 @@ rules do not get applied properly. See
[this Github discussion](https://github.com/systemd/systemd/issues/4288#issuecomment-348166161)
for more information.

### Windows: WinUSB drivers

Some of the probe implementations are implemented using [nusb](https://crates.io/crates/nusb) which
uses the WinUSB drivers on Windows. For these devices you will need to download
[Zadig](https://zadig.akeo.ie/) and select WinUSB as the driver for your probe. This will uninstall
any official drivers, which means that the official tools will most likely not work anymore after
this.

## CMSIS-DAP

CMSIS-DAP is a standard for debug probes which is managed by ARM. All probes
Expand All @@ -40,13 +50,9 @@ implementing this standard are supported by probe-rs.

No additional drivers are required to use CMSIS-DAP based probes on Linux
systems. To ensure that users without root privileges can use the debug probe,
it is recommended to configure udev as described in [udev rules](#udev-rules).

#### Windows

No driver installation required.
it is recommended to configure udev as described in [udev rules](#linux%3A-udev-rules).

#### Mac OS
#### Windows, macOS

No driver installation required.

Expand All @@ -55,39 +61,39 @@ No driver installation required.
The ST-Link is a debug probe from ST Microelectronics. It is commonly found on
their evaluation boards, such as the Discovery and Nucleo boards.

### Supported Versions

The following versions of the ST-Link are supported:

- ST-Link V2, Firmware version 2.26 or higher
- ST-Link V3, Firmware version 3.2 or higher

If you get an error message indicating that the firmware is outdated, please use
the official ST tools to update the firmware. The update tool can be found on
the [ST website](https://www.st.com/en/development-tools/stsw-link007.html).

### Setup

#### Linux

No additional drivers are required to use a ST-Link debug probe on Linux
systems. To ensure that users without root privileges can use the debug probe,
it is recommended to configure udev as described in [udev rules](#udev-rules).
it is recommended to configure udev as described in [udev rules](#linux%3A-udev-rules).

#### Windows

To use the ST-Link on Windows, you need to install the official drivers, which
can be found on the
[ST website](https://www.st.com/en/development-tools/stsw-link009.html).

#### Mac OS
#### macOS

No driver installation required.

### Supported Versions

The following versions of the ST-Link are supported:

- ST-Link V2, Firmware version 2.26 or higher
- ST-Link V3, Firmware version 3.2 or higher

If you get an error message indicating that the firmware is outdated, please use
the official ST tools to update the firmware. The update tool can be found on
the [ST website](https://www.st.com/en/development-tools/stsw-link007.html).

## SEGGER J-Link

The J-Link is a debug probe from [Segger](https://www.segger.com/). It is
available as a stand-alone product, but also integrated into evaluation boards
available as a stand-alone product, but also integrated into some evaluation boards
directly.

Due to the proprietary nature of the J-Link, probe-rs will not achieve the same
Expand All @@ -99,18 +105,15 @@ speed as the official J-Link tools.

No additional drivers are required to use a J-Link debug probe on Linux systems.
To ensure that users without root privileges can use the debug probe, it is
recommended to configure udev as described in [udev rules](#udev-rules).
recommended to configure udev as described in [udev rules](#linux%3A-udev-rules).

#### Windows

Unfortunately, probe-rs doesn't work with the official drivers on Windows. To
use probe-rs it is necessary to install a generic WinUSB driver. The recommended
way of doing this is by using [Zadig](https://zadig.akeo.ie/) and selecting
WinUSB as the driver for the J-Link probe. This will uninstall the official
driver, which means that the official Segger tools will not work anymore after
this.
way of doing this is by using [Zadig](#windows%3A-winusb-drivers).

#### Mac OS
#### macOS

No driver installation required.

Expand Down Expand Up @@ -144,18 +147,15 @@ The following devices are known to work with probe-rs:

No additional drivers are required to use a FTDI-based debug probe on Linux systems.
To ensure that users without root privileges can use the debug probe, it is
recommended to configure udev as described in [udev rules](#udev-rules).
recommended to configure udev as described in [udev rules](#linux%3A-udev-rules).

#### Windows

Unfortunately, probe-rs doesn't work with the official (VCP or D2xx) drivers on Windows. To
use probe-rs it is necessary to install a generic WinUSB driver. The recommended
way of doing this is by using [Zadig](https://zadig.akeo.ie/) and selecting
WinUSB as the driver for the FTDI probe. This will uninstall the official
driver, which means that the official FTDI tools will not work anymore after
this.
way of doing this is by using [Zadig](#windows%3A-winusb-drivers).

#### Mac OS
#### macOS

No driver installation required.

Expand All @@ -171,8 +171,8 @@ there's a good chance the one marked as `USB` can act as a debug probe.

No additional drivers are required to use an ESP32 built-in debug interface on Linux systems.
To ensure that users without root privileges can use the debug probe, it is
recommended to configure udev as described in [udev rules](#udev-rules).
recommended to configure udev as described in [udev rules](#linux%3A-udev-rules).

#### Windows, Mac OS
#### Windows, macOS

No driver installation required.