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

Missing cmsis_tiarmclang.h file #207

Open
Hermann-Core opened this issue Nov 22, 2024 · 10 comments
Open

Missing cmsis_tiarmclang.h file #207

Hermann-Core opened this issue Nov 22, 2024 · 10 comments

Comments

@Hermann-Core
Copy link

Hello. I noticed that the file cmsis_tiarmclang.h is missing from CMSIS Core include directory. It was present in the previous version. Now it causes a compilation error and I had to do some manual work to get it work. Can you check it please?

@JonatanAntoni
Copy link
Member

Hi @Hermann-Core,

Thanks for pointing this out. I guess this is an oversight as the cmsis_tiarmclang.h was basically unmaintained over years.

Could you please check if we require a special version of the CMSIS compiler header for TI at all? Ideally, we can just use https://github.com/ARM-software/CMSIS_6/blob/main/CMSIS/Core/Include/cmsis_clang.h for TI as well. If you could confirm that the standard clang compiler header works for you we'd just need to remove
special handling from

/*
* TI Arm Clang Compiler (tiarmclang)
*/
#elif defined (__ti__)
#include "cmsis_tiarmclang.h"

If this is not sufficient, we need to update the headers. I see there is still an old version for the M-profile https://github.com/ARM-software/CMSIS_6/blob/main/CMSIS/Core/Include/m-profile/cmsis_tiarmclang_m.h which would need to be updated like the other compiler headers have been.

@Hermann-Core
Copy link
Author

Could you please check if we require a special version of the CMSIS compiler header for TI at all? Ideally, we can just use https://github.com/ARM-software/CMSIS_6/blob/main/CMSIS/Core/Include/cmsis_clang.h for TI as well. If you could confirm that the standard clang compiler header works for you we'd just need to remove special handling from

/*
* TI Arm Clang Compiler (tiarmclang)
*/
#elif defined (__ti__)
#include "cmsis_tiarmclang.h"

They are not exactly the same. There is a compatibility layer between them since the TI compiler is essentially a Clang compiler, but with specific implementations not present in the upstream Arm Clang compiler. I noticed that the TI compiler offers more features:

  • Startup and low-level initialization definitions
  • More comprehensive set of functions for accessing core registers
  • Compiler-specific intrinsic definitions

If this is not sufficient, we need to update the headers. I see there is still an old version for the M-profile https://github.com/ARM-software/CMSIS_6/blob/main/CMSIS/Core/Include/m-profile/cmsis_tiarmclang_m.h which would need to be updated like the other compiler headers have been.

It seems more logical to proceed this way.

@JonatanAntoni
Copy link
Member

@Hermann-Core, would you volunteer to contribute a TI header that works at least for you? We could even try to integrate TI compiler into CI if there is a free version available to run on GitHub.

@Hermann-Core
Copy link
Author

@JonatanAntoni Ok I think I can do that. Are there specific ways or requirements that I should follow ?

Concerning the compiler, it’s free. You can get it from there.

@JonatanAntoni
Copy link
Member

There is nothing specifically written down. I'd just follow the same concept that was used for the other compilers. Profile-agnostic declarations on the top level and profile-specific stuff added on the sub-level.

You could try to run the Core Tests and CoreValidation tests using TI Clang as well. The latter is using CMSIS-Toolbox for building which does not have TI support, yet.

@Hermann-Core
Copy link
Author

I will try the tests with that compiler and let you know.
By the way do you have plans to add support for TI compiler in CMSIS-Toolbox ?

@JonatanAntoni
Copy link
Member

No, we do not have plans to add this toolbox. But toolbox is open for contribution as well and adding another compiler should not be a big task. We need to enhance the schema files to allow compiler selection; and toolbox build backend requires a cmake file for the compiler providing the command line flag mappings. Please consider contributing to https://github.com/Open-CMSIS-Pack/cmsis-toolbox.

@Hermann-Core
Copy link
Author

The link you provided doesn’t contains useful information on how to add a compiler support to the Toolbox. I hope I don’t have to go through the source code to get how a compiler support is added.

@JonatanAntoni
Copy link
Member

Lets move to the issues of toolbox repo and raise the feature request about TI Clang support there. The toolbox maintainers might be a more expert source for getting guidance.

@Hermann-Core
Copy link
Author

I just opened a new issue in the toolbox repo.
Here is the link to track it: Open-CMSIS-Pack/cmsis-toolbox#220

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

No branches or pull requests

2 participants