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

New MECALL backend #10

Open
wants to merge 8 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
1 change: 1 addition & 0 deletions hifive1-test/.cargo/config.toml → .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ runner = "qemu-system-riscv32 -machine sifive_e,revb=true -nographic -kernel"
# runner = "probe-run --chip fe310-g002 --verbose"
rustflags = [
"-C", "link-arg=-Thifive1-link.x",
"--cfg", "portable_atomic_target_feature=\"zaamo\"",
]

[build]
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ on:

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C link-arg=-Thifive1-link.x --cfg portable_atomic_target_feature=\"zaamo\""

jobs:
# On Linux, we check that the crate builds and links for all the toolchains and targets.
ci-linux:
strategy:
matrix:
# All generated code should be running on stable now, MRSV is 1.75.0
# All generated code should be running on stable now, MRSV is 1.76.0
toolchain:
- stable
- nightly
- 1.75.0
- 1.76.0
cargo_flags:
- "clint-backend"
- "mecall-backend"
include:
# Nightly is only for reference and allowed to fail
- rust: nightly
Expand All @@ -34,10 +36,14 @@ jobs:
toolchain: ${{ matrix.toolchain }}
targets: riscv32i-unknown-none-elf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,riscv64gc-unknown-none-elf
- name: Build riscv32i-unknown-none-elf
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --workspace --target riscv32i-unknown-none-elf --features=${{ matrix.cargo_flags }}
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32i-unknown-none-elf --features=${{ matrix.cargo_flags }}
- name: Build riscv32imc-unknown-none-elf
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --workspace --target riscv32imc-unknown-none-elf --features=${{ matrix.cargo_flags }}
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32imc-unknown-none-elf --features=${{ matrix.cargo_flags }}
- name: Build riscv32imac-unknown-none-elf
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --target riscv32imac-unknown-none-elf --workspace --features=${{ matrix.cargo_flags }}
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32imac-unknown-none-elf --features=${{ matrix.cargo_flags }}
- name: Build riscv64gc-unknown-none-elf (no example)
run: cargo build --target riscv64gc-unknown-none-elf --features=${{ matrix.cargo_flags }}
- name: Build CLINT backend examples
run: RUSTFLAGS=$RUSTFLAGS cargo build --package tests-clint
- name: Build MECALL backend examples
run: RUSTFLAGS=$RUSTFLAGS cargo build --package tests-mecall
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
members = [
"riscv-slic",
"riscv-slic-macros",
"hifive1-test",
"tests-clint",
"tests-mecall",
]
default-members = [
"riscv-slic",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# riscv-slic: Software-Level Interrupt Controller for RISC-V Microcontrollers
# Software-Level Interrupt Controller for RISC-V Microcontrollers

Crate for enabling vectored handling of software interrupts for RISC-V targets inspired by PLIC.
File renamed without changes.
14 changes: 0 additions & 14 deletions hifive1-test/Cargo.toml

This file was deleted.

Loading
Loading