Skip to content

TinyTapeout/caravel-firmware-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caravel Firmware with Rust

A blinky example for Caravel LiteX VexRiscv Core, written in Rust.

Toolchain setup

Run the following commands to install the toolchain:

cargo install cargo-binutils
rustup component add llvm-tools-preview
rustup target add riscv32i-unknown-none-elf
pip install bincopy

Compiling HEX file

cargo objcopy --release -- -O ihex firmware.hex

Compiling Verilog memory file (for simulation)

cargo objcopy --release -- -O binary firmware.bin
bincopy convert -i binary -o verilog_vmem firmware.bin firmware.vmem

Note: we use binary as the intermediate format as we need to relocate the code offset from 0x10000000 to 0x00000000.

Viewing the generated assembly

cargo objdump --release -- -d -S -C

License

Copyright (C) 2023 Uri Shaked. Release under the Apache 2.0 LICENSE.

About

Rust blinky example for the Caravel LiteX VexRiscv Core

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published