Skip to content
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

update toolchain to 2025-02-22 #634

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,51 +57,42 @@ jobs:
examples: true
- type: mcu
name: atmega1280
spec: atmega1280
crate: atmega-hal
- type: mcu
name: atmega32a
spec: atmega32a
crate: atmega-hal
- type: mcu
name: atmega128a
spec: atmega128a
crate: atmega-hal
- type: mcu
name: atmega328p
crate: atmega-hal
- type: mcu
name: atmega328pb
spec: atmega328p
crate: atmega-hal
- type: mcu
name: atmega48p
spec: atmega48p
crate: atmega-hal
- type: mcu
name: atmega88p
spec: atmega88p
crate: atmega-hal
- type: mcu
name: atmega1284p
spec: atmega1284p
crate: atmega-hal
- type: mcu
name: atmega8
spec: atmega8
crate: atmega-hal
- type: mcu
name: attiny85
spec: attiny85
crate: attiny-hal
- type: mcu
name: attiny88
spec: attiny88
crate: attiny-hal
- type: mcu
name: attiny167
spec: attiny167
crate: attiny-hal
- type: mcu
name: attiny2313
spec: attiny2313
crate: attiny-hal
runs-on: ubuntu-latest
steps:
Expand All @@ -110,19 +101,19 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2023-12-28
toolchain: nightly-2025-02-22
components: rust-src
- name: Install avr-gcc, binutils, and libc
run: sudo apt-get install -y avr-libc binutils-avr gcc-avr
- name: Compile board crate and examples
if: "${{ matrix.m.type == 'board' && matrix.m.examples }}"
run: cd "examples/${{ matrix.m.name }}" && cargo build --bins
run: cd "examples/${{ matrix.m.name }}" && cargo build --release --bins
- name: Compile board crate (without examples)
if: "${{ matrix.m.type == 'board' && !matrix.m.examples }}"
run: cd "arduino-hal/" && cargo build --features "${{ matrix.m.name }}"
run: cd "arduino-hal/" && cargo build --release --features "${{ matrix.m.name }}"
- name: Test-compile HAL crate for an MCU
if: "${{ matrix.m.type == 'mcu' }}"
run: cd "mcu/${{ matrix.m.crate }}" && cargo build --features "${{ matrix.m.name }}" -Z build-std=core --target "../../avr-specs/avr-${{ matrix.m.spec }}.json"
run: cd "mcu/${{ matrix.m.crate }}" && RUSTFLAGS="-C target-cpu=${{ matrix.m.name }}" cargo build --release --target=avr-none --features "${{ matrix.m.name }}" -Z build-std=core

ravedude:
name: "ravedude"
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Go into `./examples/arduino-uno` (or the directory for whatever board you want),
cd examples/arduino-uno

# Build and run it on a connected board
cargo run --bin uno-blink
cargo run --release --bin uno-blink
```

## Starting your own project
Expand All @@ -73,9 +73,6 @@ HAL crates for AVR microcontroller families. If you have a custom board, you'll
### `avr-hal-generic` [![avr-hal-generic docs](https://img.shields.io/badge/docs-git-4d76ae)][avr-hal-generic docs]
This is a generic crate containing most of the HAL implementations in the form of macros which are instanciated in each HAL crate for the specific MCUs. If you intend to write drivers that work with any AVR chip, targeting `avr-hal-generic` is probably the best route.

### `avr-specs/`
The `avr-specs/` directory contains rustc target definitions for all supported microcontrollers. You will need these for compiling rust code for AVR. The [`avr-hal-template`](https://github.com/Rahix/avr-hal-template) already includes them for convenience.

### [`ravedude`](./ravedude) [![crates.io page](https://img.shields.io/crates/v/ravedude.svg)](https://crates.io/crates/ravedude)
`ravedude` is a utility for seamlessly integrating avrdude and a serial console into the cargo workflow. With a bit of configuration (check its [README](./ravedude/README.md)!) you can then upload your code to your board and view its output over the serial console by just using `cargo run` as you would normally.

Expand Down
41 changes: 0 additions & 41 deletions avr-specs/avr-atmega1280.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega1284p.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega128a.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega164pa.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega168.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega2560.json

This file was deleted.

41 changes: 0 additions & 41 deletions avr-specs/avr-atmega328.json

This file was deleted.

Loading
Loading