Skip to content

Commit fce40cd

Browse files
committed
Update e310x with latest svd2rust version
1 parent 4f705c8 commit fce40cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+155
-1728
lines changed

e310x/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## [Unreleased]
99

1010
### Changed
11-
- Bump MSRV to 1.72.0 to ensure a correct behavior of portable-atomic
12-
- Regenerate code with `svd2rust` v0.33.4
11+
12+
- Now CLINT and PLIC are provided by `riscv-peripheral` 0.2
13+
- Adapt crate to work with `riscv` 0.12 and `riscv-rt` 0.13
14+
- Bump MSRV to 1.76.0 to ensure a correct behavior of portable-atomic
15+
- Regenerate code with `svd2rust` 8b809ac2c1e1a13f30af59ee41f4d66a4995d625 (unreleased)
1316

1417
## [v0.11.0]
1518

e310x/Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
[package]
22
name = "e310x"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
repository = "https://github.com/riscv-rust/e310x"
55
authors = ["David Craven <david@craven.ch>", "The RISC-V Team <risc-v@teams.rust-embedded.org>"]
66
categories = ["embedded", "hardware-support", "no-std"]
77
description = "With svd2rust generated peripherals for Freedom E310 MCU's."
88
keywords = ["riscv", "register", "peripheral"]
99
license = "ISC"
10-
rust-version = "1.72"
10+
rust-version = "1.76"
1111
edition = "2021"
1212

1313
[dependencies]
14-
critical-section = { version = "1.1.3", optional = true }
14+
critical-section = { version = "1.2.0", optional = true }
15+
riscv = "0.12.0"
16+
riscv-peripheral = "0.2.0"
17+
riscv-rt = { version = "0.13.0", features = ["no-interrupts"], optional = true }
1518
vcell = "0.1.3"
1619

1720
[features]
18-
rt = []
21+
rt = ["riscv-rt"]
22+
v-trap = ["rt", "riscv-rt/v-trap"]
1923
g002 = []
2024

2125
[package.metadata.docs.rs]

e310x/device.x

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ MEMORY
33
RAM : ORIGIN = 0x80000000, LENGTH = 16K
44
}
55

6+
/* Core interrupt sources and trap handlers */
7+
PROVIDE(MachineSoft = DefaultHandler);
8+
PROVIDE(_start_MachineSoft_trap = _start_DefaultHandler_trap);
9+
PROVIDE(MachineTimer = DefaultHandler);
10+
PROVIDE(_start_MachineTimer_trap = _start_DefaultHandler_trap);
11+
PROVIDE(MachineExternal = DefaultHandler);
12+
PROVIDE(_start_MachineExternal_trap = _start_DefaultHandler_trap);
13+
/* External interrupt sources */
614
PROVIDE(WATCHDOG = DefaultHandler);
715
PROVIDE(RTC = DefaultHandler);
816
PROVIDE(UART0 = DefaultHandler);

e310x/settings.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
riscv_config:
2+
core_interrupts:
3+
- name: "MachineSoft"
4+
value: 3
5+
description: "Machine Software Interrupt"
6+
- name: "MachineTimer"
7+
value: 7
8+
description: "Machine Timer Interrupt"
9+
- name: "MachineExternal"
10+
value: 11
11+
description: "Machine External Interrupt"
12+
13+
priorities:
14+
- name: "P0"
15+
value: 0
16+
description: "Priority level 0"
17+
- name: "P1"
18+
value: 1
19+
description: "Priority level 1"
20+
- name: "P2"
21+
value: 2
22+
description: "Priority level 2"
23+
- name: "P3"
24+
value: 3
25+
description: "Priority level 3"
26+
- name: "P4"
27+
value: 4
28+
description: "Priority level 4"
29+
- name: "P5"
30+
value: 5
31+
description: "Priority level 5"
32+
- name: "P6"
33+
value: 6
34+
description: "Priority level 6"
35+
- name: "P7"
36+
value: 7
37+
description: "Priority level 7"
38+
39+
harts:
40+
- name: "H0"
41+
value: 0
42+
description: "Hart 0"
43+
44+
clint:
45+
name: "CLINT"
46+
freq: 32768
47+
async_delay: false
48+
49+
plic:
50+
name: "PLIC"
51+
core_interrupt: "MachineExternal"
52+
hart_id: "H0"

e310x/src/aonclk/lfrosccfg.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,21 @@ impl R {
4343
impl W {
4444
#[doc = "Bits 0:5"]
4545
#[inline(always)]
46-
#[must_use]
4746
pub fn div(&mut self) -> DivW<LfrosccfgSpec> {
4847
DivW::new(self, 0)
4948
}
5049
#[doc = "Bits 16:20"]
5150
#[inline(always)]
52-
#[must_use]
5351
pub fn trim(&mut self) -> TrimW<LfrosccfgSpec> {
5452
TrimW::new(self, 16)
5553
}
5654
#[doc = "Bit 30"]
5755
#[inline(always)]
58-
#[must_use]
5956
pub fn enable(&mut self) -> EnableW<LfrosccfgSpec> {
6057
EnableW::new(self, 30)
6158
}
6259
#[doc = "Bit 31"]
6360
#[inline(always)]
64-
#[must_use]
6561
pub fn ready(&mut self) -> ReadyW<LfrosccfgSpec> {
6662
ReadyW::new(self, 31)
6763
}

e310x/src/clint.rs

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

e310x/src/clint/msip.rs

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

e310x/src/clint/mtime.rs

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

e310x/src/clint/mtimecmp.rs

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

e310x/src/clint/mtimecmph.rs

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

0 commit comments

Comments
 (0)