-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:rust-embedded/riscv into riscv-rt…
…-asm
- Loading branch information
Showing
35 changed files
with
2,785 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
merge_group: | ||
|
||
name: Build check (riscv-peripheral) | ||
|
||
jobs: | ||
# We check that the crate builds and links for all the toolchains and targets. | ||
build-riscv: | ||
strategy: | ||
matrix: | ||
# All generated code should be running on stable now, MRSV is 1.75.0 | ||
toolchain: [ stable, nightly, 1.75.0 ] | ||
target: | ||
- riscv32i-unknown-none-elf | ||
- riscv32imc-unknown-none-elf | ||
- riscv32imac-unknown-none-elf | ||
- riscv64imac-unknown-none-elf | ||
- riscv64gc-unknown-none-elf | ||
include: | ||
# Nightly is only for reference and allowed to fail | ||
- toolchain: nightly | ||
experimental: true | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
targets: ${{ matrix.target }} | ||
- name: Build (no features) | ||
run: cargo build --package riscv-peripheral --target ${{ matrix.target }} | ||
- name: Build (all features) | ||
run: cargo build --package riscv-peripheral --target ${{ matrix.target }} --all-features | ||
|
||
# On MacOS, Ubuntu, and Windows, we run the tests. | ||
build-others: | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
# - windows-latest issues when testing and external symbols are not found | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Build (no features) | ||
run: cargo test --package riscv-peripheral | ||
- name: Build (all features) | ||
run: cargo test --package riscv-peripheral --all-features | ||
|
||
# Job to check that all the builds succeeded | ||
build-check: | ||
needs: | ||
- build-riscv | ||
- build-others | ||
runs-on: ubuntu-latest | ||
if: always() | ||
steps: | ||
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ resolver = "2" | |
members = [ | ||
"riscv", | ||
"riscv-pac", | ||
"riscv-peripheral", | ||
"riscv-rt", | ||
"riscv-semihosting", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## [Unreleased] | ||
|
||
## [v0.1.0] - 2024-02-15 | ||
|
||
### Added | ||
|
||
- Add `ACLINT`, `CLINT`, and `PLIC` structs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[package] | ||
name = "riscv-peripheral" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.75" | ||
repository = "https://github.com/rust-embedded/riscv" | ||
authors = ["The RISC-V Team <[email protected]>"] | ||
categories = ["embedded", "hardware-support", "no-std"] | ||
description = "Interfaces for standard RISC-V peripherals" | ||
documentation = "https://docs.rs/riscv-peripheral" | ||
keywords = ["riscv", "peripheral", "clint", "plic"] | ||
license = "ISC" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
embedded-hal = "1.0.0" | ||
embedded-hal-async = { version = "1.0.0", optional = true } | ||
riscv = { path = "../riscv", version = "0.11.1" } | ||
riscv-pac = { path = "../riscv-pac", version = "0.1.1" } | ||
|
||
[dev-dependencies] | ||
heapless = "0.8.0" | ||
|
||
[features] | ||
aclint-hal-async = ["embedded-hal-async"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
default-target = "riscv64imac-unknown-none-elf" | ||
targets = [ | ||
"riscv32i-unknown-none-elf", "riscv32imc-unknown-none-elf", "riscv32imac-unknown-none-elf", | ||
"riscv64imac-unknown-none-elf", "riscv64gc-unknown-none-elf", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
[![crates.io](https://img.shields.io/crates/d/riscv-peripheral.svg)](https://crates.io/crates/riscv-peripheral) | ||
[![crates.io](https://img.shields.io/crates/v/riscv-peripheral.svg)](https://crates.io/crates/riscv-peripheral) | ||
|
||
# `riscv-peripheral` | ||
|
||
> Interfaces for standard RISC-V peripherals | ||
This project is developed and maintained by the [RISC-V team][team]. | ||
|
||
## [Documentation](https://docs.rs/crate/riscv-peripheral) | ||
|
||
## Minimum Supported Rust Version (MSRV) | ||
|
||
This crate is guaranteed to compile on stable Rust 1.75 and up. It *might* | ||
compile with older versions but that may change in any new patch release. | ||
|
||
## License | ||
|
||
Copyright 2023-2024 [RISC-V team][team] | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any purpose | ||
with or without fee is hereby granted, provided that the above copyright notice | ||
and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | ||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF | ||
THIS SOFTWARE. | ||
|
||
## Code of Conduct | ||
|
||
Contribution to this crate is organized under the terms of the [Rust Code of | ||
Conduct][CoC], the maintainer of this crate, the [RISC-V team][team], promises | ||
to intervene to uphold that code of conduct. | ||
|
||
[CoC]: CODE_OF_CONDUCT.md | ||
[team]: https://github.com/rust-embedded/wg#the-risc-v-team |
Oops, something went wrong.