mspm0-data
aims to produce clean machine-readable data about MSPM0 microcontroller families, including:
✔️ = done, 🚧 = work in progress, ❌ = to do
The generated JSON files are available here in the mspm0-data-generated repo.
The generated PAC is available here in the mspm0-data-generated repo.
These are the data sources currently used.
INT_GROUP
parts.yaml
sysctl
.perimap.rs
to use the correct peripherals.This will help you add support for a new peripheral to all MSPM0 families. (Please take the time to add it for all families, even if you personally are only interested in one. It's easier than it looks, and doing all families at once is significantly less work than adding one now then having to revisit everything later when adding more. It also helps massively in catching mistakes and inconsistencies in the source SVDs.)
./d install-chiptool
./d extract-all CANFD0
. This'll output a bunch of yamls in tmp/CANFD0
. NOTE sometimes peripherals have a number sometimes not (CANFD0
vs CANFD
). You might want to try both and merge the outputted YAMLs into a single directory.data/registers/canfd_vX.yaml
canfd_v1.yaml
and canfd_v2.yaml
. If one is missing enums or descriptions, copy it from another.perimap
, see below../d gen && ./d build-metapac
), then:
Check mspm0-metapac/src/chips/<chip>/pac.rs
has the right #[path = "../../peripherals/canfd_v1.rs"]
paths.
Ensure a successful build of the affected pac. e.g.
cd build/mspm0-metapac
cargo build --features mspm0g3507pm
Please separate manual changes and changes resulting from regen in separate commits. It helps tremendously with review and rebasing/merging.
SVDs have some widespread annoyances that should be fixed when adding register YAMLs to this repo. Check out chiptool
transforms, they can help in speeding up the cleanups.
RNG
peripheral are named RNG_FOO
, RNG_BAR
, the RNG_
peripheral is not conveying any useful information at all, and must go.xxEN
and xxIE
fields. If a field says "enable foo" and is one bit, it's obvious "true" means enabled and "false" means disabled.xxIF
fields.DeleteEnums
chiptool transforms.FOO0 FOO1, FOO2, FOO3
) to arrays FOO[n]
.
MakeRegisterArray
, MakeFieldArray
chiptool transforms.chiptool fmt
on each of the register yamls.The mspm0-metapac-gen
binary has a map to match peripherals to the right version in all chips, the perimap.
When parsing a chip, for each peripheral a "key" string is constructed using this format: FAMILY:PERIPHERAL_NAME
, where:
FAMILY
: chip family in lowercase, for example mspm0g350x
PERIPHERAL_NAME
: peripheral name, for example spi
.perimap
entries are regexes matching on the above "key" string. First regex that matches wins. For example:
(".*:tim", ("tim", "v1")),
("mspm0c110x:sysctl", ("sysctl", "c110x")),
("mspm0g..0x:sysctl", ("sysctl", "g350x_g310x_g150x_g110x")),
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4