Update 'Software Setup'

master
Levi Pearson 2022-03-09 10:24:55 +00:00
parent fc49e3c55e
commit 8eea46b16a
1 changed files with 32 additions and 3 deletions

@ -1,8 +1,16 @@
# Software Setup
## Prerequisites
If you don't have these set up beforehand, much time will be wasted:
+ Native Rust compiler managed by [rustup](https://rustup.rs/)
+ Basic native C development tools
+ A working `git` installation
Very helpful, but not strictly required, is an editor with good Language Server integration such as:
+ Visual Studio Code
+ Emacs + LSP Mode
+ Some vim/neovim variant with an LSP plugin
Configure to use the `rust-analyzer` LSP server rather than `RLS`.
## Installing Rust Cross-compiling Components
> rustup target add thumbv7m-none-eabi
@ -41,10 +49,10 @@ These are the tools that interface `cargo` to the STLinkV2 clone:
> 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).
If you are using Windows, 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.
This `udev` rule lets you use the STLinkV2 clone without root privileges.
Create the file `/etc/udev/rules.d/70-st-link.rules` with the contents shown below.
@ -59,4 +67,25 @@ Then reload all the udev rules with:
sudo udevadm control --reload-rules
## Crate Setup
## Crate Setup
Get the first workshop crate ready to go:
> git clone https://cgit.pinealservo.com/BluePill_Rust/blue_pill_base.git
> cd blue_pill_base
You should be able to build successfully with `cargo build` even if you don't have the hardware handy.
> cargo build --release
If you do have the hardware handy and set up according to the [Hardware Setup](Hardware-Setup) page, you can try pluggin the STLinkV2 into your computer and running the following to try it out:
> cargo embed --release
## Resource Materials
You should clone this repo as well to have documentation near at hand whenever you need it:
> git clone https://cgit.pinealservo.com/BluePill_Rust/resources.git
This contains pinout diagrams (which you may want to print out for reference), schematics for the BluePill board and external peripherals, a collection of ST's reference PDFs relevant to the BluePill, etc.