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.
CMSIS_5/CMSIS/Core/Include/core_cm33.h
Line 1067 in 2e02216
CMSIS_5/CMSIS/Core/Include/core_cm4.h
Line 857 in 2e02216
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.