tools: add RegGen utility

This is a tool written in C which does basically the same job
as regtools' headergen_v2, but using a new input format which
is less verbose than XML. In the interests of simplicity it
omits some features that regtools does support, like variant
registers or the SoC selector stuff so it cannot completely
replace regtools on the i.MX platforms that use these features.

RegGen doesn't generate API macros like regtools does; instead
these are expected to be maintained by hand, since it's arguably
easier to do that way.

Since RegGen has no dependencies beyond a C compiler it can
be integrated with the build system without adding any new
build time dependencies. This will allow generating headers
automatically, which is a substantial improvement over running
headergen_v2 by hand and committing the generated output.

The RegGen tool itself is licensed as GPLv3+, but generated
headers can be licensed as the user chooses.

Change-Id: If18f9577f8f4df6e2c97c1665b725773dd5466f0
This commit is contained in:
Aidan MacDonald 2025-12-21 19:07:27 +00:00
parent 6552554939
commit 969a2b65c7
20 changed files with 4089 additions and 0 deletions

1
.gitignore vendored
View file

@ -121,6 +121,7 @@ __pycache__
/tools/bmp2rb
/tools/codepages
/tools/rdf2binary
/tools/reggen
/tools/mkboot
/tools/mk500boot
/tools/uclpack