I am working with the Hifive (riscv-rust-quickstart) example led_blink and get the following error message.
$ cargo run --example leds_blink
Compiling e310x-hal v0.9.3
error[E0599]: no method named `nr` found for enum `e310x::Interrupt` in the current scope
--> /home/arlen/.cargo/registry/src/github.com-1ecc6299db9ec823/e310x-hal-0.9.3/src/core/plic.rs:186:56
|
186 | (*PLIC::ptr()).claim.write(|w| w.bits(intr.nr() as u32));
| ^^ method not found in `e310x::Interrupt`
For more information about this error, try `rustc --explain E0599`.
Following are the steps that I performed leading up to the error.
- rustup target add riscv32imac-unknown-none-elf
- cargo generate --git GitHub - riscv-rust/riscv-rust-quickstart: A template for building Rust applications for HiFive1 boards
- cd app
- /opt/SEGGER/JLinkGDBServer -device FE310 -if JTAG -speed 4000 -port 3333 -nogui
- cargo build
below is the Cargo.toml file
[package]
name = "app"
version = "0.0.0"
authors = ["Arlen Planting <aplanting@gmail.com>"]
edition = "2018"
license = "ISC"
readme = "README.md"
[dependencies]
embedded-hal = "0.2.3"
hifive1 = { version = "0.9.0", features = ["board-hifive1-revb"] }
panic-halt = "0.2.0"
riscv = "0.6.0"
riscv-rt = "0.8.0"
# this lets you use `cargo fix`!
[[bin]]
name = "app"
test = false
bench = false
[profile.release]
codegen-units = 1 # better optimizations
debug = true # symbols are nice and they don't increase the size on Flash
lto = true # better optimizations