start tutorial
This commit is contained in:
17
tutorial/00-setup-live/README.md
Normal file
17
tutorial/00-setup-live/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 00 - Setup Live (10 min)
|
||||
|
||||
## Goal
|
||||
|
||||
Jede Station kann Rust-Code bauen und eine Bluepill über ST-Link erkennen.
|
||||
|
||||
## Steps
|
||||
|
||||
1. install rustup
|
||||
2. add target
|
||||
3. add probe-rs
|
||||
|
||||
## Done when
|
||||
|
||||
1. `rustc`, `cargo`, `probe-rs` verfügbar.
|
||||
2. `thumbv7m-none-eabi` installiert.
|
||||
3. `probe-rs list` zeigt die Probe.
|
||||
7
tutorial/00-setup-live/task/checklist.md
Normal file
7
tutorial/00-setup-live/task/checklist.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Task Checklist
|
||||
|
||||
- [ ] Rust toolchain installiert (`rustup`, `cargo`, `rustc`)
|
||||
- [ ] Target `thumbv7m-none-eabi` installiert
|
||||
- [ ] `probe-rs-tools` installiert
|
||||
- [ ] ST-Link wird von `probe-rs list` erkannt
|
||||
- [ ] `probe-rs chip list | grep STM32F103C8` liefert Treffer
|
||||
36
tutorial/00-setup-live/task/setup.sh
Executable file
36
tutorial/00-setup-live/task/setup.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "[verify-host] rustup"
|
||||
if ! command -v rustup >/dev/null 2>&1; then
|
||||
echo "rustup not found. Install from https://rustup.rs/ and rerun."
|
||||
echo "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh"
|
||||
exit 1
|
||||
fi
|
||||
rustup --version
|
||||
|
||||
echo "[verify-host] cargo"
|
||||
cargo --version
|
||||
|
||||
echo "[verify-host] rustc"
|
||||
rustc --version
|
||||
|
||||
echo "[setup] ensuring stable toolchain..."
|
||||
rustup toolchain install stable
|
||||
rustup default stable
|
||||
|
||||
echo "[setup] adding embedded target thumbv7m-none-eabi..."
|
||||
rustup target add thumbv7m-none-eabi
|
||||
|
||||
echo "[setup] checking probe-rs..."
|
||||
if ! command -v probe-rs >/dev/null 2>&1; then
|
||||
echo "[setup] installing probe-rs-tools via cargo..."
|
||||
cargo install probe-rs-tools
|
||||
sudo groupadd --system plugdev
|
||||
sudo usermod -a -G plugdev $USER
|
||||
else
|
||||
echo "[setup] probe-rs already installed"
|
||||
probe-rs --version
|
||||
fi
|
||||
|
||||
echo "[setup] done"
|
||||
Reference in New Issue
Block a user