forked from sinara-hw/assembly
stabilizer: add building and flashing instructions
This commit is contained in:
parent
5659f5b60a
commit
27e552f09b
|
@ -4,9 +4,76 @@
|
|||
* [QUARTIQ Manual](https://quartiq.de/stabilizer/)
|
||||
* [Firmware](https://github.com/quartiq/stabilizer)
|
||||
|
||||
EEM is used for power only, and it can be alternatively powered by 12V barrel jack or PoE.
|
||||
|
||||
## JSON
|
||||
|
||||
No JSON modifications required.
|
||||
Not present in the JSON.
|
||||
|
||||
## Building
|
||||
|
||||
Pick your poison - firmware version: older with Pounder support or newer with USB serial console - the first works with a hardcoded MQTT broker and (static or dynamic) IP address, the latter is configured like the booster - through a serial console.
|
||||
|
||||
There is no Nix Flake support to make things easier, so you need to set up rust and cargo manually. Start with cloning the stabilizer repository and opening a new shell with dfu-util (for flashing) and rustup (for building).
|
||||
|
||||
```
|
||||
nix-shell -p dfu-util rustup
|
||||
```
|
||||
|
||||
Set up the toolchain, this should be done only once:
|
||||
|
||||
```
|
||||
rustup target add thumbv7em-none-eabihf
|
||||
cargo install cargo-binutils
|
||||
rustup component add llvm-tools-preview
|
||||
rustup update
|
||||
rustup default stable
|
||||
```
|
||||
|
||||
Building the older version:
|
||||
|
||||
```
|
||||
BROKER="MQTT BROKER IP" cargo build --release
|
||||
BROKER="MQTT BROKER IP" cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
|
||||
```
|
||||
|
||||
Building the newer version:
|
||||
|
||||
```
|
||||
cargo build --release
|
||||
cargo objcopy --release --bin dual-iir -- -O binary dual-iir.bin
|
||||
```
|
||||
|
||||
The newer version must be configured with USB console later (try ``help`` command first).
|
||||
|
||||
## Flashing
|
||||
|
||||
Once you have the binary (either built, or received from someone), you can now flash it.
|
||||
|
||||
Without firmware on the device or with older firmware, you need to use the jumper method:
|
||||
|
||||
1. Have the Stabilizer disconnected from power.
|
||||
2. Use a jumper of some sort to short BOOT pins on the board.
|
||||
3. Turn on the power.
|
||||
4. You can remove the jumper after few seconds.
|
||||
|
||||
With newer firmware with USB serial console:
|
||||
|
||||
1. Connect the Stabilizer to power.
|
||||
2. Connect USB cable to the Stabilizer.
|
||||
3. Connect with a serial console emulator, usually at ``/dev/ttyACM0``.
|
||||
4. Input ``platform dfu`` in the console.
|
||||
|
||||
And for both:
|
||||
|
||||
5. The device is now in DFU mode.
|
||||
6. Flash the device with the following command:
|
||||
|
||||
```
|
||||
dfu-util -a 0 -s 0x08000000:leave -R -D dual-iir.bin
|
||||
```
|
||||
|
||||
7. Look for "File downloaded successfully".
|
||||
|
||||
## Testing
|
||||
|
||||
|
|
Loading…
Reference in New Issue