#nxp #svd2rust #lpc #arm #cortex-m

no-std lpc11xx

Register mappings for the NXP LPC111x/LPC11Cxx/LPC11xxL/LPC11xxXL family of Cortex-M0 microcontrollers

5 releases

0.2.0 Sep 3, 2019
0.1.4 Jul 28, 2019
0.1.2 Jul 25, 2019
0.1.1 Jul 24, 2019
0.1.0 Jul 24, 2019

#1146 in Embedded development


Used in lpc11xx-async-hal

MIT license

2MB
57K SLoC

LPC11xx

Documentation Crates.io

Register mappings for the NXP LPC111x/LPC11Cxx/LPC11xxL/LPC11xxXL family of Cortex-M0 microcontrollers generated with the svd2rust tool.

User Manual

The complete user manual for this family of microcontrollers may be found at UM10398 and is a useful supplement to this crate.

SVD Changes

The SVD file appears to have been generated from the user manual in an imperfect way and most of the enumerated values came out wrong e.g.:

<name>ENABLE_THE_THRE_INTE</name>

I've fixed up a significant number of these but only for the peripherals I have integrated into my projects; more fixes may be pushed over time. As far as I can tell the SVD file appears correct but as mentioned it is pretty gnarly to use in places. I would greatly appreciate pull requests with SVD fixes, ergonomic or otherwise, no matter how small.

Contribute

Install the svd2rust and form tools and run the generate.sh script to generate the crate from the SVD file. A line is also prepended to the lib.rs to prevent Clippy from checking the crate because the generated code does not lint well. Do not make manual edits to the src folder or the build.rs and device.x files which are all auto-generated.

Dependencies

~0.8–1.1MB
~18K SLoC