10 个版本

0.2.9 2023年6月29日
0.2.7 2023年6月2日
0.2.3 2023年5月30日
0.2.2 2021年7月5日
0.1.0 2021年3月16日

#107 in 构建工具

Download history · Rust 包仓库 923/week @ 2024-03-13 · Rust 包仓库 650/week @ 2024-03-20 · Rust 包仓库 46/week @ 2024-03-27 · Rust 包仓库 266/week @ 2024-04-03 · Rust 包仓库 348/week @ 2024-04-10 · Rust 包仓库 177/week @ 2024-04-17 · Rust 包仓库 161/week @ 2024-04-24 · Rust 包仓库 256/week @ 2024-05-01 · Rust 包仓库 264/week @ 2024-05-08 · Rust 包仓库 208/week @ 2024-05-15 · Rust 包仓库 253/week @ 2024-05-22 · Rust 包仓库 46/week @ 2024-05-29 · Rust 包仓库 44/week @ 2024-06-05 · Rust 包仓库 110/week @ 2024-06-12 · Rust 包仓库 182/week @ 2024-06-19 · Rust 包仓库 154/week @ 2024-06-26 · Rust 包仓库

493 每月下载量
用于 ld-memory-cli

MIT/Apache 许可

13KB
252

ld-memory

此包允许程序化创建 MEMORY 块。

它应该在现在分发 memory.x 文件的包的 build.rs 中使用,这些文件不便于指定偏移量和限制,例如,需要在应用程序二进制文件之前占位引导加载程序的。

示例

此代码

use ld_memory::{Memory, MemorySection};

pub fn main() {
    let memory = Memory::new()
        .add_section(MemorySection::new("FLASH", 0, 0x40000))
        .add_section(MemorySection::new("RAM", 0x20000000, 0x10000));

    println!("{}", memory.to_string());
}

... 将打印此内容

MEMORY
{
    FLASH : ORIGIN = 0x00000000, LENGTH = 262144
    RAM : ORIGIN = 0x20000000, LENGTH = 65536
}

许可

此作品根据您的选择许可为以下之一

无运行时依赖

功能