Skip to content

[nrf fromtree] modules: CMSIS_6: fix path and use it for TF-M and Cortex-M #2914

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomi-font
Copy link
Contributor

Cherry pick for downstream TF-M upmerge.

Copy link

github-actions bot commented May 27, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
cmsis_6 zephyrproject-rtos/CMSIS_6@783317a zephyrproject-rtos/CMSIS_6@6dd5043 (main) zephyrproject-rtos/CMSIS_6@783317a3..6dd50439
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@e2288c1 zephyrproject-rtos/trusted-firmware-m@6473899 zephyrproject-rtos/trusted-firmware-m@e2288c13..64738996

Additional metadata changed:

Name URL Submodules West cmds module.yml
cmsis_6

DNM label due to: 1 project with metadata changes

Note: This message is automatically posted and updated by the Manifest GitHub Action.

wearyzen added 2 commits May 27, 2025 13:31
What is the change?
Fix the path for module CMSIS_6 and use CMSIS_6 module for TF-M.

Why do we need this change?

After Zephyr updated TF-M to v2.1.0,
bb037d4469842c96f5872b271490aceb0734d965 added a local copy of CMSIS_6
to stop Zephyr's TF-M from downloading the CMSIS_6 from upstream.
The correct way would be to have CMSIS_6 as a module in Zephyr (which
we have now) and pass the path of this module to TF-M.
A fork of the upstream CMSIS_6 was added to Zephyr however,
the path in west.yml makes it a lib and not a module.
Fixing the path generates the ZEPHYR_CMSIS_6_MODULE_DIR symbol which
can now be used to pass to TF-M and the copy in TF-M would no longer be
required.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit c4235fa48908737f0055c8ab883b28d0599f5b89)
What is the change?
Switch to module CMSIS_6 for Cortex-M while continuing to use
cmsis module (version 5.9.0) for Cortex-A/R.

Why do we need this change?

The current cmsis module consists of:
- Cortex-M support from upstream cmsis 5.9.0
- Cortex-A/R support which was not upstreamed to CMSIS

Upstream cmsis 5.9 was deprecated so we should be using CMSIS_6 however,
it seems due to lack of Cortex-A/R support in upstream and other reasons,
this was pushed back.

While upstreaming Cortex-A/R support to CMSIS_6 could take its time,
this shouldn't stop Cortex-M to start using CMSIS_6.

Also, if we do not use CMSIS_6 for Cortex-M then using the
newer GCC 14.2 toolchain will return below compiler error:
```
zephyrproject/modules/hal/cmsis/CMSIS/Core/Include/core_cm85.h:4406:10:
fatal error: pac_armv81.h: No such file or directory
 4406 | #include "pac_armv81.h"
```
Using CMSIS_6 for Cortex-M will fix this.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
(cherry picked from commit f726cb5123eda12feb8746e3acb34a1f7d7b0340)
@tomi-font tomi-font force-pushed the tf-m_upmerge_2025.05.27 branch from 3722f44 to 78f9681 Compare May 27, 2025 10:31
Copy link

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

Successfully merging this pull request may close these issues.

2 participants