Starts adding rust in the toolchain
This commit is contained in:
7
bench/programs_rust/hello_rust/Cargo.toml
Normal file
7
bench/programs_rust/hello_rust/Cargo.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "hello_rust"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
fpga_lib = { path = "../fpga_lib" }
|
||||
18
bench/programs_rust/hello_rust/src/main.rs
Normal file
18
bench/programs_rust/hello_rust/src/main.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use core::arch::asm;
|
||||
|
||||
use fpga_lib::panic_handler;
|
||||
|
||||
panic_handler! {}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
unsafe {
|
||||
asm! {
|
||||
"li x31, 0xdead0"
|
||||
}
|
||||
}
|
||||
loop {}
|
||||
}
|
||||
Reference in New Issue
Block a user