ARM-software/CMSIS_5

Inconsistent Naming Scheme In core_cmXX.h Files

Devilbinder opened this issue · 3 comments

Please see the following 2 lines. The following two macros do not have the same capitalization. Is this intentional?

Found this when porting a code base from a cm4 to a cm33 as one does with this chip shortage.

#define ITM_TCR_TRACEBUSID_Pos 16U /*!< ITM TCR: ATBID Position */

#define ITM_TCR_TraceBusID_Pos 16U /*!< ITM TCR: ATBID Position */

Probably we require to duplicate one MACRO with different capitalization to maintain backward compatibility.

Searching for ITM_TCR_TraceBusID_Pos points out this inconsistency affects Cortex-M3, -M4, and -M7. And not only TraceBusID, but other macros as well. I think (except the suffixes _Pos and _Msk) we should agree on a common capitalization in macros. Typically, macros with constants are all uppercase.

The 'older' macros use capital names and the 'newer' ones use the same names as in the manuals.