2 ms·
Many vendors provide svd files which describe the hardware registers. It's possible to convert the svd automatically like they do for C. Here's an example for N
by elcritch 5y ago
Many vendors provide svd files which describe the hardware registers. It's possible to convert the svd automatically like they do for C. Here's an example for Nim [1]. Rust has one as well.
Though I agree that MCU's currently involve a lot of busy work. It's why I'm working on building a nice system building on Zephyr using Nim [2]. It's pretty great to write a few dozen lines of concise memory safe code to do somethinguseful, and then be able to run it on dozens different MCUs.
It'd be great if there was more Ada core in these systems, as Zephyr is all built in C. At least it's modern clean C and well tested.
1: https://github.com/EmbeddedNim/svd2nim https://github.com/EmbeddedNim/svd2nim
2: https://github.com/EmbeddedNim/nephyr https://github.com/EmbeddedNim/nephyr