Skip to content

Examples of embedded application in minimalistic style for RISC-V in Rust

Notifications You must be signed in to change notification settings

elfmimi/embedded-example

Repository files navigation

Examples of embedded application in minimalistic style for RISC-V in Rust

How to build

  • Install Rust following instructions on this page

  • rustup +nightly component add rust-src

  • rustup +nightly target add riscv64gc-unknown-none-elf

  • cargo install cargo-xbuild

  • cargo +nightly xbuild --release

optionally

  • rustup +stable component add llvm-tools-preview

  • cargo install cargo-binutils

then this will work.

rustup run stable rust-objcopy -O binary target/riscv64gc-unknown-none-elf/release/step1-puts step1-puts.text

or you may use gnu binutils' objdump or llvm-objdmp with proper riscv support from your distributyon or elsewhere.

for instance you can find riscv64-unknown-elf toolchain here.

Other notes

  • link.x includes a few assembler instructions to setup the stack pointer and the program counter.

  • Use rvemu to run the generated codes.

About

Examples of embedded application in minimalistic style for RISC-V in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published