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

MVP implementation of HostFlash for Cosmo #1851

Merged
merged 13 commits into from
Aug 23, 2024
86 changes: 50 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 18 additions & 4 deletions app/grapefruit/app.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ priority = 7
max-sizes = {flash = 32768, ram = 32768}
stacksize = 2048
start = true
features = ["h753", "stm32h7", "i2c", "gpio", "sprot"]
task-slots = ["i2c_driver", "sys", "user_leds", "sprot"]
features = ["h753", "stm32h7", "i2c", "gpio", "sprot", "qspi", "hash"]
task-slots = ["i2c_driver", "sys", "user_leds", "sprot", "hf", "hash_driver"]

[tasks.validate]
name = "task-validate"
Expand All @@ -125,6 +125,18 @@ stacksize = 1024
start = true
task-slots = ["i2c_driver"]

[tasks.hash_driver]
name = "drv-stm32h7-hash-server"
features = ["h753"]
priority = 2
max-sizes = {flash = 16384, ram=4096 }
stacksize = 2048
start = true
uses = ["hash"]
interrupts = {"hash.irq" = "hash-irq"}
task-slots = ["sys"]
notifications = ["hash-irq"]

[tasks.idle]
name = "task-idle"
priority = 9
Expand Down Expand Up @@ -248,11 +260,13 @@ task-slots = ["sys", "net"]
uses = ["fmc", "fmc_nor_psram_bank_1"]
notifications = ["socket"]

[tasks.fmc_nor_flash]
name = "drv-fmc-nor-flash"
[tasks.hf]
name = "drv-cosmo-hf"
priority = 5
start = true
uses = ["fmc_nor_psram_bank_1"]
task-slots = ["hash_driver", "grapefruit_seq"]
stacksize = 1536

[config.net]
# VLAN configuration
Expand Down
8 changes: 5 additions & 3 deletions drv/fmc-nor-flash/Cargo.toml → drv/cosmo-hf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[package]
name = "drv-fmc-nor-flash"
name = "drv-cosmo-hf"
version = "0.1.0"
edition = "2021"

[dependencies]
counters = { path = "../../lib/counters" }
derive-idol-err = { path = "../../lib/derive-idol-err" }
drv-grapefruit-seq-api = { path = "../grapefruit-seq-api" }
drv-hash-api = { path = "../hash-api" }
drv-hf-api = { path = "../hf-api" }
ringbuf = { path = "../../lib/ringbuf" }
userlib = { path = "../../sys/userlib", features = ["panic-messages"] }

Expand All @@ -22,7 +24,7 @@ build-util = { path = "../../build/util" }
idol = { workspace = true }

[[bin]]
name = "drv-fmc-nor-flash"
name = "drv-cosmo-hf"
test = false
doctest = false
bench = false
2 changes: 1 addition & 1 deletion drv/fmc-nor-flash/build.rs → drv/cosmo-hf/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
build_util::build_notifications()?;

idol::Generator::new().build_server_support(
"../../idl/fmc-nor-flash.idol",
"../../idl/hf.idol",
"server_stub.rs",
idol::server::ServerStyle::InOrder,
)?;
Expand Down
Loading
Loading