Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM ERROR: Not supported instr: <MCInst 258 <MCOperand Reg:1> <MCOperand Imm:15> <MCOperand Reg:45>> #29

Closed
stappersg opened this issue Jan 20, 2021 · 7 comments

Comments

@stappersg
Copy link
Member

This issue is a pointer to rust-lang/compiler-builtins#400
it is about

"LLVM ERROR: Not supported instr" on avr-unknown-gnu-atmega328
@stappersg
Copy link
Member Author

See also Rahix/avr-hal#124 (comment) for how to use nighty.

@ghost
Copy link

ghost commented Feb 25, 2021

just change to this version (I am on windows)

rustup default nightly-2021-01-07-x86_64-pc-windows-msvc
rustup default nightly-2021-01-07-x86_64-pc-windows-msvc
cargo build -Z build-std=core --target avr-atmega328p.json --release

and you will be back in business.

@TheNotary
Copy link

Don't forget to:

rustup override unset

Since the README has you lock in the latest nightly. That override was soo confusing, I don't really work with rust but in one of the issues someone mentioned using a rust-toolchain file in the root. Can we do this instead?

(rust-toolchain)

[toolchain]
channel = "nightly-2021-01-07"
components = ["rust-src"]

@stappersg
Copy link
Member Author

Can we do this instead?

That this is proposed in #32 and might be inspired by Rahix/avr-hal#124 (comment)

@chinoto
Copy link
Contributor

chinoto commented Apr 19, 2021

@stappersg Nah, I was aware of rust-toolchain beforehand and didn't like having to include +nightly-2021-01-07 (and the avr hertz and target arch) each time, but I had to lookup how to do the TOML variant so it would automatically fetch the rust-src too. Reminds me of "convergent evolution", we naturally came to the same solutions because they work well.

@stappersg
Copy link
Member Author

rust-lang/compiler-builtins#400 is reported as being closed.

Next challenge is the llvm_asm! to asm! switch. Yes that is our #38 ...

@stappersg
Copy link
Member Author

#38 is fixed, blink does compile again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants