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

Backward incompatibilities in processor files vs CMSIS-Core (M) v5.x #122

Closed
vovamarch opened this issue Jan 16, 2024 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@vovamarch
Copy link
Collaborator

The processor header files for Cortex-M devices in CMSIS-Core v6.0.0 have a number of differences incompatible to CMSIS-Core 5.x.

  • Is there a list of all such incompatible changes?
  • Is it feasible for an application to keep compatibility to both v6 and v5 variants?
@JonatanAntoni JonatanAntoni added the enhancement New feature or request label Jan 16, 2024
@vovamarch
Copy link
Collaborator Author

The CMSIS-Core header files are updated to be aligned with the latest versions of Cortex-M Technical Reference Manuals (TRMs) . In some cases this leads to incompatibility issues, such as #118 (CoreDebug_Type no longer defined).

The list of incompatible changes is added to CMSIS-Core revision history as Breaking changes in CMSIS-Core v6 header files.

@omarArm
Copy link
Collaborator

omarArm commented Jan 17, 2024

Hello,

I have created this header file with a set of definitions that work as patches for some changes between CMSIS@5.9.0 and CMSIS@6.0.0

It is important to note that I am using the header file as a pre-include in my projects, so please don't use it unless you are using CMSIS@6.0.0
cmsis_5_to_6_patch.h.zip

The way to use it as follows:

  1. Unzip the file into a directory you are familiar with <my_directory>
  2. In the *.cproject.yml file of your project, under the "add_path:" keyword, add <my_directory>.
project:
  add-path:
    - $OutDir(Secure)$                       # add the path to the secure project's output directory
    -  <my_directory>                         #directory of any files you would like to include. 
  1. In the *.cproject.yml file of your project, under the "misc:" keyword, add the pre-include command for the compiler you are using. Example:
project:
  misc: 
    - for-compiler: AC6
      C-CPP:
        - --include cmsis_5_to_6_patch.h

For more information on how to configure your *.cproject.yml file, please refer to Yml-Input-Format.MD It has a comprehensive explanation of how to write your own *.cproject.yml along with some examples

@HTRamsey
Copy link
Contributor

What do we do about the DWT Lock Access Register now that it is removed? Is the DWT->LAR |= 0xC5ACCE55 part no longer needed?

@GuentherMartin
Copy link
Contributor

Hello @HTRamsey,
As far I understand then these registers are not always implemented.

If the registers are not implemented, then LSR register is RAZ and this also identifies the LAR register as not implemented.
If the registers are implemented and the user wants to access them, then he needs to create a pointer to the register’s address to write/read via this pointer the content of the registers.

@JonatanAntoni
Copy link
Member

Just fyi, we've decided to re-introduce deprecated CoreDebug symbols for backward compatibility reasons in #153.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants