#memory #bare-metal #memory-mapped #secure #memory-management #memory-mapping #no-std

no-std external-memory-tools

HAL to keep data in memory that could not be directly mapped to RAM

2 releases

0.1.1 Feb 9, 2024
0.1.0 Jan 17, 2024

#1714 in Embedded development

Download history 13/week @ 2024-06-21 6/week @ 2024-06-28 5/week @ 2024-07-05 10/week @ 2024-07-12 6/week @ 2024-07-19 6/week @ 2024-07-26 12/week @ 2024-08-02 6/week @ 2024-08-09 5/week @ 2024-08-16 9/week @ 2024-08-23 16/week @ 2024-08-30 6/week @ 2024-09-06 18/week @ 2024-09-13 72/week @ 2024-09-20 40/week @ 2024-09-27 74/week @ 2024-10-04

205 downloads per month
Used in 4 crates

GPL-3.0-or-later

16KB
112 lines

External memory tools

This is a tiny collections of tools useful to address memory that is not mapped directly into RAM. Do not use it unless you know exactly what you are doing, the cases where this is needed are very limited and mostly related to very special baremetal systems.

Brief explanation

Rust allows neat memory allocations on no-std systems with the use of allocator abstraction; however, all normal tools assume that the memory that is addressed by that allocator could be low-level mapped into some address space. In some rare cases this is not possible (for example, in security vaults mapping arbitrary memory would present a direct breach to system security model).

So if you happen to work with one of those systems and you find yourself repeating the same patterns over and over again - use this crate.

Usage

Implement needed buffer access operations on your target memory and enjoy!

To use this crate with regular memory (for simpler cross platformness), just use () as External Memory - feature is implemented there. Unfortunately, you would still have to include () as parameter in every affected function call.

Development

Currently only read operations are supported; if you decide to contribute and add more features like writable and read-writeable buffers, please start hiding those under feature flags to keep things lean and safe.

No runtime deps

Features