Low-level register mappings for the NXP LPC82x family of ARM Cortex-M0+ microcontrollers, written in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts Update dependencies in update script Sep 19, 2018
.gitignore chore: Configure Git to ignore unpatched SVD file Dec 6, 2017
.travis.yml Disable Cargo cache on Travis Sep 19, 2018
LICENSE Import project from internal repository Sep 28, 2017
device.x feat: Re-generate with newest svd2rust and rustfmt May 14, 2018
rust-lpc82x.sublime-project Exclude target directory from Sublime Text project Sep 19, 2018


rust-lpc82x crates.io Documentation Build Status


This is a very low-level library. Most users should use lpc82x-hal instead.

Low-level register mappings for the NXP LPC82x family of ARM Cortex-M0+ microcontrollers, written in Rust. The code is generated automatically from the SVD file available from ARM, using svd2rust.

The purpose of this crate is to give embedded programs or libraries written Rust access to the complete functionality of LPC82x MCUs.

Please also check out lpc82x-hal, a higher-level crate for interfacing with LPC82x microcontrollers.


Add this to the [dependencies] section of your Cargo.toml to include rust-lpc82x in your Cargo project:

lpc82x = "0.5"

This crate includes an optional rt feature that can be activated by adding this instead:

lpc82x = { version = "0.5", features = ["rt"] }

The rt feature includes the cortex-m-rt crate and provides overridable interrupt handlers. Please refer to the svd2rust documentation for further details.


For specific information on the API, check out the API reference.

All code in this crate is automatically generated by svd2rust, so check out the svd2rust documentation for more general information about how the API works.

In addition, the LPC82x user manual contains extensive documentation on how to work with the microcontroller.


This crate is complete and actively maintained, but not all parts of it have been tested. The experience so far has shown that the original SVD file has quite a few problems. It's likely there are still undetected bugs. Please open an issue, if you find any problems. Known issues are tracked on GitHub.

Another problem that we inherit from the SVD file is that some register and field names are very weird. Those seem to be generated from human-readable documentation, meaning they sometimes read like cut-off sentences.

At this point, there is no guarantee of API stability. This means that we reserve the right to make changes to the API, that might break existing programs when they upgrade.

Update Procedure

The repository contains an update script, that can be used to re-generate the source code. This script updates all required tools (svd2rust and rustfmt), downloads the SVD file, applies various patches to it, and then re-generates the code.

The patches that are applied to the SVD file are relatively minimal, and are just intended to fix various problems with the file that otherwise would prevent code generation, or would lead to incorrect code being generated.


This project is open source software, licensed under the terms of the Zero Clause BSD License (0BSD, for short). This basically means you can do anything with the software, without any restrictions, but you can't hold the authors liable for problems.

See LICENSE for full details.

Supported by Braun Robotics