Home

Awesome

imxrt-ral

A Rust register access layer (RAL), and SVD patches for NXP i.MX RT processors.

All Checks Crates.io

API Docs (main branch)

Goals

Getting Started

The imxrt-ral is a lower-level interface for i.MX RT processor registers with useful macros. The imxrt-ral is modeled after the stm32ral crate. It provides direct access to the processor's registers. Use the imxrt-ral if you'd like to create your own hardware abstraction layer, or a custom driver.

The imxrt-ral supports these i.MX RT processors:

The RAL also requires a feature flag to specify the processor variant. The RAL is on crates.io. The RAL provides the "rt" feature flag, and the interrupt table definition, that's used by the HAL.

Q/A

Why not use svd2rust to generate a crate for register access?

See here and here. svd2rust generates a crate that's nearly 1 million lines of Rust code, and it takes a few minutes to compile. On the other hand, the RAL compiles in a few seconds. Additionally, svd2rust only supports one SVD input, but the RAL auto-generation script accepts multiple SVD inputs, sharing the common peripherals across processor families. This means that we can more easily support all i.MX RT processor variants from a single crate.

Contributing & Development

For contributions and development guidance, see CONTRIBUTING.md

License

Licensed under either of

at your option.