I need to write code for a riscv machine that currently has no support for compressed instructions. Apparently, Rust only supports
riscv32imac, but not
I found a reddit post with the same problem and the accepted answer suggested using the
target-feature compile option, but without further instructions. I thus modified my
.cargo/config to look like this:
[target.riscv32i-unknown-none-elf] rustflags = [ "-C", "link-arg=-Tmemory.x", "-C", "link-arg=-Tlink.x", "-C", "target-feature=m", ] [build] target = "riscv32i-unknown-none-elf"
But as far as I can tell, this had no effect. I also found a blog post that tells me that I need to build Rust from the target from scratch, but the further links for details didn't help me out (probably the relevant part is in Japanese).