Comments (3)
What I did to get a succesfull build:
--- a/src/main.rs
+++ b/src/main.rs
@@ -3,7 +3,7 @@
#![no_std]
#![no_main]
-use ruduino::cores::atmega328 as avr_core;
+use ruduino::cores::atmega328p as avr_core;
use ruduino::Register;
use avr_core::{DDRB, PORTB};
I don't know how good or how evil that is.
Thing I'm trying to say: blink
did not compile for me, I had to make a modification to get a target/avr-atmega328p/release/blink.elf
.
Note: How good that blink.elf
is, is currently unknown.
from blink.
I recently updated the main.rs
file so that rather than hardcoding the atmega328
, it uses use ruduino::cores::current::{DDRB, PORTB};
, using ruduino
to detect the device that is being targeted. I suspect this issue is fixed now, specifically in cfb8451.
from blink.
Reporting a clean compile, taking #29 workaround in account.
gs0604@trancilo:~/src/rust/RustAVR/blink
$ cargo +nightly-2021-01-07 build -Z build-std=core --target avr-atmega328p.json --release
Compiling proc-macro2 v1.0.24
Compiling unicode-xid v0.2.1
Compiling syn v1.0.60
Compiling compiler_builtins v0.1.36
Compiling core v0.0.0 (/home/gs0604/.rustup/toolchains/nightly-2021-01-07-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 quote v1.0.8
Compiling avr-mcu v0.3.5
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/gs0604/.rustup/toolchains/nightly-2021-01-07-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
Compiling blink v0.1.0 (/home/gs0604/src/rust/RustAVR/blink)
Finished release [optimized] target(s) in 7.26s
gs0604@trancilo:~/src/rust/RustAVR/blink
$
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
- 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
- could not load config key `env.AVR_CPU_FREQUENCY_HZ` HOT 4
- 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.