Skip to content

Commit 2576295

Browse files
Merge pull request #10 from romancardenas/mecall
New MECALL backend
2 parents ea92353 + b04abd7 commit 2576295

File tree

25 files changed

+406
-3322
lines changed

25 files changed

+406
-3322
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ runner = "qemu-system-riscv32 -machine sifive_e,revb=true -nographic -kernel"
44
# runner = "probe-run --chip fe310-g002 --verbose"
55
rustflags = [
66
"-C", "link-arg=-Thifive1-link.x",
7+
"--cfg", "portable_atomic_target_feature=\"zaamo\"",
78
]
89

910
[build]

.github/workflows/ci.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: "-C link-arg=-Thifive1-link.x --cfg portable_atomic_target_feature=\"zaamo\""
1112

1213
jobs:
1314
# On Linux, we check that the crate builds and links for all the toolchains and targets.
1415
ci-linux:
1516
strategy:
1617
matrix:
17-
# All generated code should be running on stable now, MRSV is 1.75.0
18+
# All generated code should be running on stable now, MRSV is 1.76.0
1819
toolchain:
1920
- stable
2021
- nightly
21-
- 1.75.0
22+
- 1.76.0
2223
cargo_flags:
2324
- "clint-backend"
25+
- "mecall-backend"
2426
include:
2527
# Nightly is only for reference and allowed to fail
2628
- rust: nightly
@@ -34,10 +36,14 @@ jobs:
3436
toolchain: ${{ matrix.toolchain }}
3537
targets: riscv32i-unknown-none-elf,riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,riscv64gc-unknown-none-elf
3638
- name: Build riscv32i-unknown-none-elf
37-
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --workspace --target riscv32i-unknown-none-elf --features=${{ matrix.cargo_flags }}
39+
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32i-unknown-none-elf --features=${{ matrix.cargo_flags }}
3840
- name: Build riscv32imc-unknown-none-elf
39-
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --workspace --target riscv32imc-unknown-none-elf --features=${{ matrix.cargo_flags }}
41+
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32imc-unknown-none-elf --features=${{ matrix.cargo_flags }}
4042
- name: Build riscv32imac-unknown-none-elf
41-
run: RUSTFLAGS="-C link-arg=-Thifive1-link.x" cargo build --target riscv32imac-unknown-none-elf --workspace --features=${{ matrix.cargo_flags }}
43+
run: RUSTFLAGS=$RUSTFLAGS cargo build --target riscv32imac-unknown-none-elf --features=${{ matrix.cargo_flags }}
4244
- name: Build riscv64gc-unknown-none-elf (no example)
4345
run: cargo build --target riscv64gc-unknown-none-elf --features=${{ matrix.cargo_flags }}
46+
- name: Build CLINT backend examples
47+
run: RUSTFLAGS=$RUSTFLAGS cargo build --package tests-clint
48+
- name: Build MECALL backend examples
49+
run: RUSTFLAGS=$RUSTFLAGS cargo build --package tests-mecall

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
members = [
33
"riscv-slic",
44
"riscv-slic-macros",
5-
"hifive1-test",
5+
"tests-clint",
6+
"tests-mecall",
67
]
78
default-members = [
89
"riscv-slic",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# riscv-slic: Software-Level Interrupt Controller for RISC-V Microcontrollers
1+
# Software-Level Interrupt Controller for RISC-V Microcontrollers
22

33
Crate for enabling vectored handling of software interrupts for RISC-V targets inspired by PLIC.
File renamed without changes.

hifive1-test/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)