@@ -21,15 +21,21 @@ desired application.
2121``` bash
2222git clone https://github.com/quartiq/stabilizer
2323```
24- 1 . Get [ rustup] ( https://rustup.rs/ )
24+ 2 . Get [ rustup] ( https://rustup.rs/ )
2525 * The minimum supported Rust version (MSRV) is 1.52.0
26- 1 . Install target support
26+
27+ 3 . Install target support
2728``` bash
2829rustup target add thumbv7em-none-eabihf
2930```
30- 1 . Build Firmware with an optionally-specified MQTT broker IP.
31+ 4 . Build Firmware with an optionally-specified MQTT broker IP.
3132``` bash
33+ # Bash
3234BROKER=" 10.34.16.10" cargo build --release
35+
36+ # Powershell
37+ # Note: This sets the broker for all future builds as well.
38+ $env :BROKER=' 10.34.16.10' ; cargo build --release
3339```
3440
3541## Uploading Firmware
@@ -51,12 +57,16 @@ cargo install cargo-binutils
5157rustup component add llvm-tools-preview
5258```
5359
54- 1 . Generate the binary file
60+ 2 . Generate the binary file
5561``` bash
56- cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin`
62+ # Bash
63+ BROKER=" 10.34.16.10" cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
64+
65+ # Powershell
66+ $env :BROKER=' 10.34.16.10' ; cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
5767```
5868
59- 1 . Copy ` dual-iir.bin` into the ST-Link drive on your computer.
69+ 3 . Copy ` dual-iir.bin ` into the ST-Link drive on your computer.
6070
6171
6272### Alternative: Using USB
@@ -82,11 +92,15 @@ For an interactive flash experience with live logging, utilize `probe-run` as fo
8292``` bash
8393cargo install probe-run
8494```
85- 1 . Build and run firmware on the device
95+ 2 . Build and run firmware on the device
8696``` bash
87- cargo run --release --bin dual-iir
97+ # Bash
98+ BROKER=" 10.34.16.10" cargo run --release --bin dual-iir
99+
100+ # Powershell
101+ $Env :BROKER=' 10.34.16.10' ; cargo run --release --bin dual-iir
88102```
89- 1 . When using debug (non ` --release` ) mode, decrease the sampling frequency significantly.
103+ 3 . When using debug (non ` --release ` ) mode, decrease the sampling frequency significantly.
90104 The added error checking code and missing optimizations may lead to the code
91105 missing deadlines and panicing.
92106
@@ -105,12 +119,13 @@ Stabilizer utilizes a static IP address for broker configuration. Ensure the IP
105119We recommend running Mosquitto through [ Docker] ( https://docker.com ) to easily run Mosquitto on
106120Windows, Linux, and OSX. After docker has been installed, run the following command from
107121the ` stabilizer ` repository:
108- ` ` `
122+ ``` bash
123+ # Bash
109124docker run -p 1883:1883 --name mosquitto -v ` pwd` /mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto:2
110- ` ` `
111125
112- > _Note_: The above command assumes a bash shell. If using powershell, replace ` ` ` pwd` ` ` with
113- > ` ${pwd} `
126+ # Powershell
127+ docker run -p 1883:1883 --name mosquitto -v ${pwd} /mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto:2
128+ ```
114129
115130This command will create a container named ` mosquitto ` that can be stopped and started easily via
116131docker.
0 commit comments