Skip to content

Commit

Permalink
Add raltool to replace imxrtral.py
Browse files Browse the repository at this point in the history
raltool is a fork of chiptool, which is a fork of svd2rust. The tool
emits an imxrtral.py-compatible register access layer, allowing us to
replace imxrtral.py.

This merge does not yet use raltool; it only adds raltool patches.
Future commits will remove imxrtral.py, re-generate the RAL with
raltool, and add support for the 1176 multi-core MCUs.

The RAL generated by raltool is different in a few ways:

- It supports register clusters and arrays. Users will notice this when
  certain register names and access patterns change.
- It changes the way that it expresses register block consolidation.
  This is an implementation detail, and the user won't notice this one.
- It drops any notion of resource management, and all instance access is
  unsafe. Users will definitely notice this one. We're dropping this
  because we have no solution for resource management on the multi-core
  i.MX RT variants. The previously solution also wouldn't work for
  single-core usages which combine multiple executables into a single
  program.

There's smaller feature additions to the RAL. See individual commit
messages for details.

A RAL generated with raltool has no support for the ral-registers
reset_reg! macro. From what I can tell, raltool does not track reset
values in its IR, and historical commits before our fork indicate the
feature was intentionally removed. Support for reset_reg! macros first
needs code generation support. Check out the ral-registers project, or
the imxrt-ral before this merge, to understand what that generated code
should look like.
  • Loading branch information
mciantyre committed Nov 28, 2022
2 parents c2f7543 + 0b97844 commit 0579dc7
Show file tree
Hide file tree
Showing 35 changed files with 5,470 additions and 0 deletions.
4 changes: 4 additions & 0 deletions raltool/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[._]*.sw[a-p]
*.org
*.rs.bk
target
Loading

0 comments on commit 0579dc7

Please sign in to comment.