Skip to content

Cargo build failes due to errors #4

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

Open
sykacek opened this issue Mar 1, 2025 · 0 comments
Open

Cargo build failes due to errors #4

sykacek opened this issue Mar 1, 2025 · 0 comments

Comments

@sykacek
Copy link

sykacek commented Mar 1, 2025

First, I had to edit line 7 in avr-atmega328p.json to

    "os": "none",

Without the change, build process stops immediately. But cargo build still produces the following error:

Compiling avr-device v0.2.1
warning: target json file contains unused fields: target-env, target-vendor

error: cannot find macro `llvm_asm` in this scope
 --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/asm.rs:6:14
  |
6 |     unsafe { llvm_asm!("nop") }
  |              ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/asm.rs:12:14
   |
12 |     unsafe { llvm_asm!("sleep") }
   |              ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/asm.rs:18:14
   |
18 |     unsafe { llvm_asm!("wdr") }
   |              ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/interrupt.rs:17:9
   |
17 |         llvm_asm!(
   |         ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/interrupt.rs:30:5
   |
30 |     llvm_asm!(
   |     ^^^^^^^^

error: cannot find macro `llvm_asm` in this scope
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/interrupt.rs:46:9
   |
46 |         llvm_asm!(
   |         ^^^^^^^^

error[E0635]: unknown feature `llvm_asm`
  --> /home/mike/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/avr-device-0.2.1/src/lib.rs:23:12
   |
23 | #![feature(llvm_asm)]
   |            ^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
warning: `avr-device` (lib) generated 1 warning
error: could not compile `avr-device` (lib) due to 7 previous errors; 1 warning emitted

Output of rustup show

Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mike/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu
nightly-2024-03-22-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.87.0-nightly (96cfc7558 2025-02-27)

How can I fix it?

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

1 participant