Add standalone option to regz to generate register api files without microzig framework dependency
regz is a great tool for generating register definitions however not everybody wants to buy into the whole microzig framework just to get a board up and running. Since regz seems to be kept up to date with zig releases and has good support it makes sense to modify it to support standalone register definitions.
There are two items that need dealt with in the current generated output
- It includes a vector table which then depends on micro.interrupts
- It using Mmio for the actual register definitions which depends on micro.mmio
The standalone mode option removes the generation of the vector table and includes the Mmio directly into the generated output (wrapped in a struct). For some reason there is a copy of mmio.zig in the tools/regz/src directory that is different than the one in core/src. I have removed the local one in regz as I could not see anywhere it was actually used and instead embed the one from core/src.
Note that tests now pass for any code changed however there are other tests that were already failing:
error: 'init_from_atdf' is not marked 'pub' error: 'init_from_json' is not marked 'pub' error: 'init_from_svd' is not marked 'pub'