Skip to content

Commit f62aab1

Browse files
authored
[feat] 动态驱动组件库 rdrive (qclic#8)
* 修改timer接口 * 修改intc接口 * irq 接口 * 添加增加版本脚本
1 parent ef15b4e commit f62aab1

File tree

47 files changed

+907
-1023
lines changed

Some content is hidden

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

47 files changed

+907
-1023
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ runner = "ostool cargo-test"
33

44
[build]
55
target = "aarch64-unknown-none"
6+
7+
[alias]
8+
xtask = "run -q --manifest-path xtask/Cargo.toml --"

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"lldb.consoleMode": "commands",
88
"rust-targets.targets": [
99
"aarch64-unknown-none",
10-
"aarch64-unknown-none-softfloat"
10+
"aarch64-unknown-none-softfloat",
11+
// for xtask
12+
"system"
1113
],
1214
"rust-analyzer.check.targets": [
1315
"aarch64-unknown-none",

Cargo.lock

Lines changed: 62 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
[workspace]
22
resolver = "2"
3-
members = ["app/*", "crates/*"]
3+
members = [
4+
"app/*",
5+
"crates/bare-test",
6+
"crates/bare-test-macros",
7+
"crates/page-table-arm",
8+
"crates/sparreal-kernel",
9+
"crates/sparreal-macros",
10+
"crates/sparreal-rt",
11+
]
12+
exclude = ["xtask"]
13+
414

515
[workspace.package]
6-
version = "0.7.0"
16+
version = "0.8.1"
717
edition = "2024"
818

919
[workspace.dependencies]
1020
sparreal-rt = { path = "crates/sparreal-rt", default-features = false }
1121
sparreal-macros = { path = "crates/sparreal-macros" }
1222
sparreal-kernel = { path = "crates/sparreal-kernel" }
1323
page-table-arm = { path = "crates/page-table-arm" }
14-
driver-interface = { path = "crates/driver-interface" }
1524
bare-test = { path = "crates/bare-test" }
1625
bare-test-macros = { path = "crates/bare-test-macros" }
1726
log = "0.4"
27+
28+
29+
[workspace.metadata]
30+
rdrive_version = "0.1.0"

app/helloworld/.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[target.'cfg(all(target_os = "none"))']
2+
runner = "ostool cargo-test"
3+
4+
[build]
5+
target = "aarch64-unknown-none"

app/simple_test/.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[target.'cfg(all(target_os = "none"))']
2+
runner = "ostool cargo-test"
3+
4+
[build]
5+
target = "aarch64-unknown-none"

app/simple_test/tests/test1.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ mod tests {
1313
let _fdt = match &global_val().platform_info {
1414
PlatformInfoKind::DeviceTree(fdt) => fdt.get(),
1515
};
16-
17-
assert_eq!(2 + 2, 4)
1816
}
1917
}

crates/bare-test/Cargo.toml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
[package]
2-
name = "bare-test"
3-
version = "0.3.2"
4-
authors = ["Zhourui <[email protected]>"]
5-
edition.workspace = true
6-
repository = "https://github.com/qclic/sparreal-os/tree/main/crates/bare-test"
7-
license = "MPL-2.0"
8-
description = "A test framework for bare metal."
9-
keywords = ["test", "case", "testing", "testcase", "unittest"]
10-
categories = ["development-tools", "development-tools::testing"]
1+
[dependencies.bare-test-macros]
2+
path = "../bare-test-macros"
3+
version = "0.2"
4+
5+
[dependencies.log]
6+
version = "0.4"
7+
8+
[dependencies.sparreal-kernel]
9+
path = "../sparreal-kernel"
10+
version = "0.8"
11+
12+
[dependencies.sparreal-macros]
13+
path = "../sparreal-macros"
14+
version = "0.8"
15+
16+
[dependencies.sparreal-rt]
17+
optional = true
18+
path = "../sparreal-rt"
19+
version = "0.8"
1120

1221
[features]
1322
default = ["rt"]
14-
# 使用 `sparreal-rt` 作为运行时
1523
rt = ["sparreal-rt"]
1624

17-
[dependencies]
18-
sparreal-rt = { version = "0.7", path = "../sparreal-rt", optional = true }
19-
sparreal-kernel = { version = "0.7", path = "../sparreal-kernel" }
20-
sparreal-macros = { version = "0.7", path = "../sparreal-macros" }
21-
bare-test-macros = { version = "0.2", path = "../bare-test-macros" }
22-
log = { version = "0.4" }
25+
[package]
26+
authors = ["Zhourui <[email protected]>"]
27+
categories = ["development-tools", "development-tools::testing"]
28+
description = "A test framework for bare metal."
29+
keywords = ["test", "case", "testing", "testcase", "unittest"]
30+
license = "MPL-2.0"
31+
name = "bare-test"
32+
repository = "https://github.com/qclic/sparreal-os/tree/main/crates/bare-test"
33+
version = "0.4.0"
34+
35+
[package.edition]
36+
workspace = true

crates/driver-interface/Cargo.toml

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

crates/driver-interface/src/_macro.rs

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

0 commit comments

Comments
 (0)