Compare commits

..

5 Commits

Author SHA1 Message Date
Geert Stappers c057499975 [CI] git revert e6167ec6
This reverts commit e6167ec647.

Revert "[CI] Pin the nightly version in the Dockerfile to one that is working"

Because nightly is working again (since a couple of weeks).
2022-06-29 15:35:04 +02:00
Geert Stappers 61a8e0d144 Fix delay dependency to git revision 849918a8dfb2
So we can test it with `blink` before a "crate" of `delay` is published.
2022-06-16 21:44:03 +02:00
Geert Stappers c113fc881e Cargo.toml: more semver for avr_delay
In an attempt to publish it. Current error:
| $ AVR_CPU_FREQUENCY_HZ=8_000_000 cargo +nightly publish --target ./avr-atmega328p.json -Z build-std=core
|     Updating crates.io index
|    Packaging ruduino v0.4.0 (/home/gs0604/src/rust/RustAVR/ruduino)
| error: failed to prepare local package for uploading
|
| Caused by:
|   failed to select a version for the requirement `avr_delay = "^0.4"`
|   candidate versions found which didn't match: 0.3.2, 0.3.1, 0.3.0, ...
|   location searched: crates.io index
|   required by package `ruduino v0.4.0 (/home/gs0604/src/rust/RustAVR/ruduino)`
2022-06-08 15:07:50 +02:00
Geert Stappers ba9e78840c Fixed warning unused no-compiler-rt
The
  warning: target json file contains unused fields: no-compiler-rt
is now gone.
2022-06-08 14:57:40 +02:00
Geert Stappers a33d38a755 Switching from llvm_asm!() to asm!()
Macro llvm_asm is replace by asm.
This a reason to increase the version number.
2022-06-08 12:21:34 +02:00
5 changed files with 7 additions and 8 deletions

View File

@ -6,7 +6,7 @@ members = [
[package] [package]
name = "ruduino" name = "ruduino"
version = "0.3.3" version = "0.4.0"
edition = "2018" edition = "2018"
authors = [ authors = [
"The AVR-Rust Project Developers", "The AVR-Rust Project Developers",
@ -29,7 +29,7 @@ all-mcus = []
[dependencies] [dependencies]
avr-config = { version = "2.0", features = ["cpu-frequency"] } avr-config = { version = "2.0", features = ["cpu-frequency"] }
avr_delay = { git = "https://github.com/avr-rust/delay", version = "0.4" } avr_delay = { git = "https://github.com/avr-rust/delay", rev = "849918a8dfb2" }
avr-std-stub = { version = "1.0", optional = true } avr-std-stub = { version = "1.0", optional = true }
const_env--value = "0.1" const_env--value = "0.1"
target-cpu-macro = "0.1" target-cpu-macro = "0.1"

View File

@ -10,8 +10,7 @@ RUN mkdir -p /code && chown avr-rust:avr-rust /code
USER avr-rust USER avr-rust
# Install Rustup along with nightly # Install Rustup along with nightly
# TODO: Unpin from Jan 2021 nightly. The nightlies broke midway through the month. RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly -c rust-src --quiet
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly-2021-01-05 -c rust-src --quiet
ENV PATH=/home/avr-rust/.cargo/bin:$PATH ENV PATH=/home/avr-rust/.cargo/bin:$PATH
COPY --chown=avr-rust:avr-rust . /code/ruduino COPY --chown=avr-rust:avr-rust . /code/ruduino

View File

@ -8,7 +8,6 @@
"linker-flavor": "gcc", "linker-flavor": "gcc",
"linker-is-gnu": true, "linker-is-gnu": true,
"llvm-target": "avr-unknown-unknown", "llvm-target": "avr-unknown-unknown",
"no-compiler-rt": true,
"os": "unknown", "os": "unknown",
"position-independent-executables": false, "position-independent-executables": false,
"exe-suffix": ".elf", "exe-suffix": ".elf",

View File

@ -1,5 +1,6 @@
//! Routines for managing interrupts. //! Routines for managing interrupts.
use core::arch::asm;
use core::prelude::v1::*; use core::prelude::v1::*;
use core::marker::PhantomData; use core::marker::PhantomData;
@ -22,7 +23,7 @@ pub fn without_interrupts<F, T>(f: F) -> T
impl DisableInterrupts { impl DisableInterrupts {
#[inline(always)] #[inline(always)]
pub fn new() -> DisableInterrupts { pub fn new() -> DisableInterrupts {
unsafe { llvm_asm!("CLI") } unsafe { asm!("CLI") }
DisableInterrupts(PhantomData) DisableInterrupts(PhantomData)
} }
} }
@ -30,7 +31,7 @@ impl DisableInterrupts {
impl Drop for DisableInterrupts { impl Drop for DisableInterrupts {
#[inline(always)] #[inline(always)]
fn drop(&mut self) { fn drop(&mut self) {
unsafe { llvm_asm!("SEI") } unsafe { asm!("SEI") }
} }
} }

View File

@ -1,6 +1,6 @@
//! Definitions of register addresses and bits within those registers //! Definitions of register addresses and bits within those registers
#![feature(llvm_asm)] #![feature(asm_experimental_arch)]
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(lang_items)] #![feature(lang_items)]
#![feature(proc_macro_hygiene)] #![feature(proc_macro_hygiene)]