bern_conf/
conf.rs

1//! Bern RTOS kernel configuration.
2//!
3//! This is the default kernel config. To apply your own config clone the this
4//! crate into your project and apply a cargo path to override the default
5//! config:
6//! ```toml
7//! # `Cargo.toml`
8//! [patch.crates-io]
9//! bern-conf = { path = "conf" }
10//! ```
11//!
12//! [Example Configuration](../src/bern_conf/conf.rs.html#18-44)
13
14#![no_std]
15
16use bern_units::memory_size::Byte;
17use bern_conf_type::*;
18
19pub const CONF: Conf<0> = Conf {
20    kernel: Kernel {
21        priorities: 8,
22        memory_size: Byte::from_kB(2),
23    },
24
25    shared: Shared {
26        size: Byte::from_kB(4),
27    },
28
29    memory_map: MemoryMap {
30        flash: Memory {
31            link_name: "FLASH",
32            start_address: 0x0800_0000,
33            size: Byte::from_kB(512),
34        },
35        sram: Memory {
36            link_name: "RAM",
37            start_address: 0x2000_0000,
38            size: Byte::from_kB(128),
39        },
40        peripheral: Memory {
41            link_name: "",
42            start_address: 0x4000_0000,
43            size: Byte::from_MB(512),
44        },
45        additional: [],
46    },
47    
48    data_placement: DataPlacement {
49        kernel: "RAM",
50        processes: "RAM",
51        shared: "RAM"
52    }
53};