Oliver Galvin 37d92fe1d1 typo 5 years ago
..
README.md 37d92fe1d1 typo 5 years ago
lpf.rs 1b18673ff1 First commit 5 years ago
makefile 1b18673ff1 First commit 5 years ago
pseudocode ab55acba56 downloading image code 5 years ago

README.md

Leyden Firmware

This is the firmware that runs on the charge controller itself. It is written in Rust, and can interface with a computer via a serial connection.

Installing

The easiest way to install or update the fimware is to use the Leyden management program (in the software folder).
leyden will download the prebuilt firmware image, check its integrity by verifying its signature and checksum, and flash it to the microcontroller over a serial connection.

Building

This should work in any POSIX environment (GNU/Linux, BSD, macOS, Cygwin, etc.)

To compile, you will need the Rust toolchain for the RISCV target.
First, get rustup, either with your package manager or:

curl https://sh.rustup.rs -sSf | sh

Then add the riscv32imac target:

rustup target add riscv32imac-unknown-none-elf

You should now have the toolchain installed (rustc and cargo).
Now build the firmware:

cargo build

To check it compiled properly, compare the result of sha512sum lpf.rom to the checksums in the signed sha512sums file, the firmware should be reproducible.

Signing

Files will be signed with the PGP key of odg@riseup.net:
491E 0D9E E7AA 9E15 D089 950A 7879 6625 7046 CC21