Update 'Software Setup'
parent
9854f9331c
commit
f09d1b9540
|
@ -1,4 +1,62 @@
|
|||
# Software Setup
|
||||
## Installing Rust Components
|
||||
## Prerequisites
|
||||
+ Native Rust compiler managed by [rustup](https://rustup.rs/)
|
||||
+ Basic native C development tools
|
||||
+ A working `git` installation
|
||||
## Installing Rust Cross-compiling Components
|
||||
> rustup target add thumbv7m-none-eabi
|
||||
|
||||
## Flash/Debug Tools
|
||||
### Debian/Ubuntu Prerequisites
|
||||
To build the Rust debugger tools, the following packages need to be installed:
|
||||
|
||||
> sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev
|
||||
|
||||
You may also need to remove old versions of libusb:
|
||||
|
||||
> sudo apt remove libusb-dev
|
||||
### Windows Prerequisites
|
||||
If you don't have `vcpkg`, install that first:
|
||||
|
||||
> git clone https://github.com/microsoft/vcpkg
|
||||
> .\vcpkg\bootstrap-vcpkg.bat
|
||||
|
||||
Then use it to install `libusb` and `libftdi`
|
||||
|
||||
> vcpkg install libusb:x64-windows-static-md libftdi1:x64-windows-static-md
|
||||
|
||||
### macOS Prerequisites
|
||||
If you don't have `brew` installed, install that first:
|
||||
|
||||
> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
|
||||
Then install `libftdi`
|
||||
|
||||
> brew install libftdi
|
||||
|
||||
### Install cargo plugins
|
||||
These are the tools that interface `cargo` to the STLinkV2 clone:
|
||||
|
||||
> cargo install cargo-flash
|
||||
> cargo install cargo-embed
|
||||
|
||||
### Windows STLink Drivers
|
||||
You won't be able to use the STLinkV2 clone debugger without the [STLink driver](https://www.st.com/en/development-tools/stsw-link009.html).
|
||||
|
||||
### Linux `udev` rules
|
||||
This `udev` rule lets you use the STLinkV2 clone without root privilege.
|
||||
|
||||
Create the file `/etc/udev/rules.d/70-st-link.rules` with the contents shown below.
|
||||
|
||||
```
|
||||
# ST-LINK/V2
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", TAG+="uaccess"
|
||||
|
||||
# ST-LINK/V2-1
|
||||
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", TAG+="uaccess"
|
||||
```
|
||||
Then reload all the udev rules with:
|
||||
|
||||
sudo udevadm control --reload-rules
|
||||
|
||||
## Crate Setup
|
Loading…
Reference in New Issue