Missing cmsis_tiarmclang.h file
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?
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 https://github.com/ARM-software/CMSIS_6/blob/783317a3072554acbac86cca2ff24928cbf98d30/CMSIS/Core/Include/cmsis_compiler.h#L34-L38
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.
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
https://github.com/ARM-software/CMSIS_6/blob/783317a3072554acbac86cca2ff24928cbf98d30/CMSIS/Core/Include/cmsis_compiler.h#L34-L38
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.
@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.
@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.
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.
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 ?
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.
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.
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.
I just opened a new issue in the toolbox repo. Here is the link to track it: https://github.com/Open-CMSIS-Pack/cmsis-toolbox/issues/220