Giter Club home page Giter Club logo

Comments (3)

stappersg avatar stappersg commented on July 23, 2024

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.

dylanmckay avatar dylanmckay commented on July 23, 2024

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.

stappersg avatar stappersg commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.