ARM-software / CMSIS_5

CMSIS Version 5 Development Repository

Home Page:http://arm-software.github.io/CMSIS_5/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent Naming Scheme In core_cmXX.h Files

Devilbinder opened this issue · 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.