Hi. I'm trying out and mess around with a litex RISC-V CPU. So Im trying to create a demo app in rust that will be later flashed to my board. However, I'm getting this error when cargo building:
> `build.rs`
```rs
use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
// Put the linker script somewhere the linker can find it.
fs::write(out_dir.join("memory.x"), include_bytes!("memory.x")).unwrap();
println!("cargo:rustc-link-search={}", out_dir.display());
println!("cargo:rerun-if-changed=memory.x");
println!("cargo:rerun-if-changed=build.rs");
}
rustup version
[roby@thonkpad app]$ rustup -V
rustup 1.27.0 (bbb9276d2 2024-03-08)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.77.0 (aedd173a2 2024-03-17)`
Can I provide anything more in order to get help?
Thank you
Hi. I'm trying out and mess around with a litex RISC-V CPU. So Im trying to create a demo app in rust that will be later flashed to my board. However, I'm getting this error when cargo building:
extern crate panic_halt;
use riscv_rt::entry;
[entry]
fn main() -> ! { loop { } }
[target.riscv32i-unknown-none-elf] rustflags = [ "-C", "link-arg=-Tmemory.x", "-C", "link-arg=-Tlink.x", ]
[build] target = "riscv32i-unknown-none-elf"
Can I provide anything more in order to get help? Thank you