Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Naming Scheme In core_cmXX.h Files #1604

Open
Devilbinder opened this issue Jan 26, 2023 · 3 comments
Open

Inconsistent Naming Scheme In core_cmXX.h Files #1604

Devilbinder opened this issue Jan 26, 2023 · 3 comments

Comments

@Devilbinder
Copy link

Devilbinder commented Jan 26, 2023

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 */

@jkrech jkrech assigned ghost Jan 27, 2023
@jkrech
Copy link
Collaborator

jkrech commented Jan 27, 2023

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

@JonatanAntoni
Copy link
Member

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.

@ghost
Copy link

ghost commented Jan 27, 2023

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

JonatanAntoni pushed a commit that referenced this issue Apr 4, 2023
Co-authored-by: Martin Günther <martin.guenther@arm.com>
JiafeiPan pushed a commit to nxp-mcuxpresso/CMSIS_5 that referenced this issue Aug 8, 2023
Co-authored-by: Martin Günther <martin.guenther@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants