Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insert '_' to delimit clusters and register arrays
The 1170 chip family has a different CCM design than anything in the 10xx family. It has a CLOCK_ROOT cluster of size 79. Within that cluster is an array of CLOCK_ROOT_SETPOINT registers, size 16. imxrtral.py doesn't emit structs for clusters or arrays for register arrays. Instead, it appends the cluster number and the register number to the end of the symbol. For instance, the 13th setpoint register in the first cluster is called CLOCK_ROOT_SETPOINT131. However, the first setpoint register in the 31st cluster is also called CLOCK_ROOT_SETPOINT131. This confuses the compiler (and humans); a build with this CCM peripheral fails due to duplicate members in the register block, duplicate modules, etc. This only happens when you have cluster and register array dimensions that happen to overlap. This commit changes the naming of registers derived from clusters. It emits a '_' before the cluster number. In the example above, this means that the symbols become CLOCK_ROOT_SETPOINT13_1 and CLOCK_ROOT_SETPOINT1_31, which are unique and discernable. It's a breaking change, and a workaround to explore 1170 support in the RAL.
- Loading branch information