va416xx-rs/flashloader
Robin Mueller 7a525b0107
Some checks failed
Rust/va416xx-rs/pipeline/pr-main There was a failure building this commit
Bootloader and Flashloader App
2024-09-12 19:26:04 +02:00
..
slot-a-blinky Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
slot-b-blinky Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
src Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
.gitignore Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
Cargo.toml Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
image-loader.py Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
loader.toml Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
README.md Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00
requirements.txt Bootloader and Flashloader App 2024-09-12 19:26:04 +02:00

VA416xx Flashloader Application

This flashloader shows a minimal example for a self-updatable Rust software which exposes a simple PUS (CCSDS) interface to update the software. It also provides a Python application called the image-loader.py which can be used to upload compiled images to the flashloader application to write them to the NVM.

The software can quickly be adapted to interface with a real primary on-board software instead of the Python script provided here to upload images because it uses a low-level CCSDS based packet interface.

Using the Python image loader

It is recommended to run the script in a dedicated virtual environment. For example, on UNIX systems you can use python3 -m venv venv and then source venv/bin/activate to create and activate a virtual environment.

After that, you can use

pip install -r requirements.txt

to install all required dependencies.

After that, it is recommended to use ./image-load.py -h to get an overview of some options. The flash loader uses the UART0 interface of the VA416xx board to perform CCSDS based communication. The Python image loader application will search for a file named loader.toml and use the serial_port key to determine the serial port to use for serial communication.

Examples

You can use

./image-loader.py -p

to send a ping an verify the connection.

You can use

cd flashloader/slot-a-blinky
cargo build --release
cd ../..
./image-loader.py -t a ./slot-a-blinky/target/thumbv7em-none-eabihf/release/slot-a-blinky

to build the slot A sample application and upload it to a running flash loader application to write it to slot A.

You can use

./image-loader.py -c -t a

to corrupt the image A and test that it switches to image B after a failed CRC check instead.