Comments (4)
Adding quotes around the value seemed to fix the issue
[env]
AVR_CPU_FREQUENCY_HZ = "16000000"
from blink.
Same problem, same version. If I comment it out, I get an error compiling.
❯ cargo build
Compiling core v0.0.0 (/home/damian/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
warning: target json file contains unused fields: no-compiler-rt
Compiling rustc-std-workspace-core v1.99.0 (/home/damian/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
error: ran out of registers during register allocation
Compiling compiler_builtins v0.1.73
warning: `rustc-std-workspace-core` (lib) generated 1 warning (1 duplicate)
warning: `core` (lib) generated 1 warning
error: could not compile `core` due to previous error; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
warning: `compiler_builtins` (lib) generated 1 warning (1 duplicate)
core compiles if I use release mode (maybe that has always been required?), but then avr_delay complains that llvm_asm macro and feature doesn't exist, which sort of makes sense since there has been talk of deprecating it, though shouldn't it still exist for quite awhile?
from blink.
According https://doc.rust-lang.org/nightly/cargo/reference/config.html#env should it work.
Does it work for you? (So that I know it is just me)
from blink.
Thank you @chinoto, there are now these commits
Compiling with and without ``--release` makes indeed a difference:
stappers@myhost:~/src/rust/RustAVR/blink
$ cargo build
Compiling proc-macro2 v1.0.24
Compiling unicode-xid v0.2.1
Compiling compiler_builtins v0.1.73
Compiling syn v1.0.60
Compiling core v0.0.0 (/home/stappers/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling json v0.12.4
Compiling xml-rs v0.8.3
Compiling lazy_static v1.4.0
Compiling target-cpu-fetch v0.1.3
Compiling xmltree v0.10.2
Compiling target-cpu-macro v0.1.3
Compiling avr-mcu v0.3.5
Compiling quote v1.0.8
Compiling ruduino v0.3.2
Compiling const_env_impl--value v0.1.2
Compiling const_env--value v0.1.2
Compiling rustc-std-workspace-core v1.99.0 (/home/stappers/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
error: ran out of registers during register allocation
error: could not compile `core` due to previous error
warning: build failed, waiting for other jobs to finish...
stappers@myhost:~/src/rust/RustAVR/blink
$ cargo build --release
Compiling proc-macro2 v1.0.24
Compiling unicode-xid v0.2.1
Compiling compiler_builtins v0.1.73
Compiling syn v1.0.60
Compiling core v0.0.0 (/home/stappers/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling json v0.12.4
Compiling xml-rs v0.8.3
Compiling lazy_static v1.4.0
Compiling target-cpu-fetch v0.1.3
Compiling xmltree v0.10.2
Compiling target-cpu-macro v0.1.3
Compiling avr-mcu v0.3.5
Compiling quote v1.0.8
Compiling ruduino v0.3.2
Compiling const_env_impl--value v0.1.2
Compiling const_env--value v0.1.2
Compiling rustc-std-workspace-core v1.99.0 (/home/stappers/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
Compiling avr-config v1.0.0
Compiling avr-std-stub v1.0.2
Compiling avr-config v2.0.1
Compiling avr_delay v0.3.1
error: cannot find macro `llvm_asm` in this scope
--> /home/stappers/.cargo/registry/src/github.com-1ecc6299db9ec823/avr_delay-0.3.1/src/lib.rs:34:17
|
34 | unsafe {llvm_asm!("1: sbiw $0,1
| ^^^^^^^^
error: cannot find macro `llvm_asm` in this scope
--> /home/stappers/.cargo/registry/src/github.com-1ecc6299db9ec823/avr_delay-0.3.1/src/lib.rs:41:13
|
41 | unsafe {llvm_asm!("1: sbiw $0,1
| ^^^^^^^^
error[E0635]: unknown feature `llvm_asm`
--> /home/stappers/.cargo/registry/src/github.com-1ecc6299db9ec823/avr_delay-0.3.1/src/lib.rs:1:12
|
1 | #![feature(llvm_asm)]
| ^^^^^^^^
For more information about this error, try `rustc --explain E0635`.
error: could not compile `avr_delay` due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
stappers@myhost:~/src/rust/RustAVR/blink
$
This issue is now left open as reminder to revert commit 6276e6a.
Work can continue when avr-rust/delay#21 and avr-rust/delay#19 have been solved. (yes, help is appricated)
from blink.
Related Issues (20)
- failed to read libcompiler_builtins/Cargo.toml HOT 4
- Cannot compile libcore HOT 10
- failes to upload on real hardware HOT 3
- /usr/bin/avr-ld: unrecognized option '--eh-frame-hdr' HOT 1
- Failing to build in debug mode HOT 2
- SIGSEGV when compiling on latest nightly HOT 11
- Remove "how to setup a cross compiler" in README.md
- Build resolves incorrect version of ruduino when cargo.lock cleaned HOT 1
- LLVM ERROR: Not supported instr: <MCInst 258 <MCOperand Reg:1> <MCOperand Imm:15> <MCOperand Reg:45>> HOT 7
- similar name exists in the module: `atmega328p` HOT 3
- Simplify cargo build invocation HOT 3
- blinking to fast HOT 3
- Does it work with dependencies? HOT 1
- error: "/usr/lib/rustlib/src/rust/Cargo.lock" does not exist HOT 2
- couldn't allocate input reg for constrain 'w' HOT 4
- cannot find macro `llvm_asm` in this scope HOT 10
- Linker does not support -no-pie command line option.
- FYI: possible moving crate HOT 2
- LLVM ERROR: Expected a constant shift amount HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blink.