any help with updating the register include file would be appreciated.
Do you understand EMACS?
Three EMACS keyboards macros (included at the end of the .asmh file) are iterated over a merged .h file, to accomplish:
1) Convert "#define X Y" to ".equiv X, Y"
2) Convert "typedef struct { stuff } foo_t;" to "STRUCTDEF foo / stuff / ENDSTRUCT
3) Covert arrays like "uint32_t dummy[n];" (inside the structs) to "uint32_ta dummy, n"
Note that a bunch of "normal" C keywords (like "uint8_t") are redefined as gnu-as macros, which greatly reduces the the amount and complexity of the work that the editor macros have to do.
Also note that the process is very specific to the way that ST structures their files. I've come across other vendors that have separate files for each peripheral, and nested structures/unions/etc. It would take a lot of changes to similarly pre-process those files for use as gnu-as use. :-(
It might be possible to come up with a set of sed scripts that do the same thing. They'd be equally incomprehensible to read, but easier to run.