Skip to content

Commit 5558865

Browse files
authored
Merge branch 'rust-embedded:master' into master
2 parents 8899496 + 498924d commit 5558865

38 files changed

+350
-125
lines changed

.github/bors.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
block_labels = ["needs-decision"]
22
delete_merged_branches = true
33
required_approvals = 1
4-
status = ["continuous-integration/travis-ci/push"]
4+
status = [
5+
"ci-linux (stable)",
6+
"ci-linux (1.42.0)",
7+
"build-other (macOS-latest)",
8+
"build-other (windows-latest)",
9+
"Rustfmt"
10+
]

.github/workflows/ci.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
on:
2+
push:
3+
branches: [ staging, trying, master ]
4+
pull_request:
5+
6+
name: Continuous integration
7+
8+
jobs:
9+
ci-linux:
10+
runs-on: ubuntu-20.04
11+
continue-on-error: ${{ matrix.experimental || false }}
12+
strategy:
13+
matrix:
14+
# All generated code should be running on stable now, MRSV is 1.42.0
15+
rust: [nightly, stable, 1.42.0]
16+
17+
include:
18+
# Nightly is only for reference and allowed to fail
19+
- rust: nightly
20+
experimental: true
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions-rs/toolchain@v1
25+
with:
26+
profile: minimal
27+
toolchain: ${{ matrix.rust }}
28+
override: true
29+
- name: Install all Rust targets for ${{ matrix.rust }}
30+
run: rustup target install --toolchain=${{ matrix.rust }} x86_64-unknown-linux-gnu riscv32imac-unknown-none-elf riscv64imac-unknown-none-elf riscv64gc-unknown-none-elf
31+
- name: Install riscv gcc
32+
run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf
33+
- name: Run CI script for x86_64-unknown-linux-gnu under ${{ matrix.rust }}
34+
run: cargo check --target x86_64-unknown-linux-gnu
35+
- name: Run CI script for riscv32imac-unknown-none-elf under ${{ matrix.rust }}
36+
run: cargo check --target riscv32imac-unknown-none-elf
37+
- name: Run CI script for riscv64imac-unknown-none-elf under ${{ matrix.rust }}
38+
run: cargo check --target riscv64imac-unknown-none-elf
39+
- name: Run CI script for riscv64gc-unknown-none-elf under ${{ matrix.rust }}
40+
run: cargo check --target riscv64gc-unknown-none-elf
41+
- name: Check blobs
42+
run: ./check-blobs.sh
43+
44+
# On macOS and Windows, we at least make sure that the crate builds and links.
45+
build-other:
46+
strategy:
47+
matrix:
48+
os:
49+
- macOS-latest
50+
- windows-latest
51+
runs-on: ${{ matrix.os }}
52+
53+
steps:
54+
- uses: actions/checkout@v2
55+
- uses: actions-rs/toolchain@v1
56+
with:
57+
profile: minimal
58+
toolchain: stable
59+
override: true
60+
- name: Build crate for host OS
61+
run: cargo build

.github/workflows/rustfmt.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
on:
3+
push:
4+
branches: [ staging, trying, master ]
5+
pull_request:
6+
7+
name: Code formatting check
8+
9+
jobs:
10+
fmt:
11+
name: Rustfmt
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
profile: minimal
18+
toolchain: stable
19+
override: true
20+
components: rustfmt
21+
- uses: actions-rs/cargo@v1
22+
with:
23+
command: fmt
24+
args: --all -- --check

.travis.yml

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

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.7.0] - 2020-07-29
11+
12+
### Added
13+
14+
- Add `medeleg` register
15+
- Add `cycle[h]`, `instret[h]` and `mcounteren`
16+
- Add additional binaries for floating-point ABIs
17+
- Add support for `mxr`
18+
- Add support for `mprv`
19+
20+
### Changed
21+
22+
- Fix `scause::set`
23+
- Various formatting and comment fixes
24+
- Update `bare-metal` to `v1.0.0` removing `Nr` trait
25+
- Build targets on `docs.rs` are now RISC-V targets other than default ones
26+
1027
## [v0.6.0] - 2020-06-20
1128

1229
### Changed

Cargo.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
[package]
22
name = "riscv"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
repository = "https://github.com/rust-embedded/riscv"
55
authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
66
categories = ["embedded", "hardware-support", "no-std"]
77
description = "Low level access to RISC-V processors"
88
keywords = ["riscv", "register", "peripheral"]
99
license = "ISC"
1010

11+
[package.metadata.docs.rs]
12+
default-target = "riscv64imac-unknown-none-elf"
13+
targets = [
14+
"riscv32i-unknown-none-elf", "riscv32imc-unknown-none-elf", "riscv32imac-unknown-none-elf",
15+
"riscv64imac-unknown-none-elf", "riscv64gc-unknown-none-elf",
16+
]
17+
1118
[dependencies]
12-
bare-metal = "0.2.5"
19+
bare-metal = "1.0.0"
1320
bit_field = "0.10.0"
1421

1522
[build-dependencies]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ Conduct][CoC], the maintainer of this crate, the [RISC-V team][team], promises
3838
to intervene to uphold that code of conduct.
3939

4040
[CoC]: CODE_OF_CONDUCT.md
41-
[team]: https://github.com/rust-embedded/wg#the-riscv-team
41+
[team]: https://github.com/rust-embedded/wg#the-risc-v-team

assemble.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,28 @@ riscv64-unknown-elf-ar crs bin/riscv64i-unknown-none-elf.a bin/$crate.o
1717
riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
1818
riscv64-unknown-elf-ar crs bin/riscv64ic-unknown-none-elf.a bin/$crate.o
1919

20+
riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
21+
riscv64-unknown-elf-ar crs bin/riscv32if-unknown-none-elf.a bin/$crate.o
22+
23+
riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
24+
riscv64-unknown-elf-ar crs bin/riscv32ifc-unknown-none-elf.a bin/$crate.o
25+
26+
riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
27+
riscv64-unknown-elf-ar crs bin/riscv64if-unknown-none-elf.a bin/$crate.o
28+
29+
riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
30+
riscv64-unknown-elf-ar crs bin/riscv64ifc-unknown-none-elf.a bin/$crate.o
31+
32+
riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
33+
riscv64-unknown-elf-ar crs bin/riscv32ifd-unknown-none-elf.a bin/$crate.o
34+
35+
riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
36+
riscv64-unknown-elf-ar crs bin/riscv32ifdc-unknown-none-elf.a bin/$crate.o
37+
38+
riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
39+
riscv64-unknown-elf-ar crs bin/riscv64ifd-unknown-none-elf.a bin/$crate.o
40+
41+
riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
42+
riscv64-unknown-elf-ar crs bin/riscv64ifdc-unknown-none-elf.a bin/$crate.o
43+
2044
Remove-Item bin/$crate.o

assemble.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,28 @@ ar crs bin/riscv64i-unknown-none-elf.a bin/$crate.o
1919
riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
2020
ar crs bin/riscv64ic-unknown-none-elf.a bin/$crate.o
2121

22+
riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
23+
ar crs bin/riscv32if-unknown-none-elf.a bin/$crate.o
24+
25+
riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
26+
ar crs bin/riscv32ifc-unknown-none-elf.a bin/$crate.o
27+
28+
riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
29+
ar crs bin/riscv64if-unknown-none-elf.a bin/$crate.o
30+
31+
riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
32+
ar crs bin/riscv64ifc-unknown-none-elf.a bin/$crate.o
33+
34+
riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
35+
ar crs bin/riscv32ifd-unknown-none-elf.a bin/$crate.o
36+
37+
riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
38+
ar crs bin/riscv32ifdc-unknown-none-elf.a bin/$crate.o
39+
40+
riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
41+
ar crs bin/riscv64ifd-unknown-none-elf.a bin/$crate.o
42+
43+
riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
44+
ar crs bin/riscv64ifdc-unknown-none-elf.a bin/$crate.o
45+
2246
rm bin/$crate.o

bin/riscv32i-unknown-none-elf.a

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)