-
Notifications
You must be signed in to change notification settings - Fork 8.3k
STM32: implement CCM as a generic DTCM #100590
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
mathieuchopstm
wants to merge
8
commits into
zephyrproject-rtos:main
Choose a base branch
from
mathieuchopstm:topic/stm32_ccm_becomes_dtcm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
STM32: implement CCM as a generic DTCM #100590
mathieuchopstm
wants to merge
8
commits into
zephyrproject-rtos:main
from
mathieuchopstm:topic/stm32_ccm_becomes_dtcm
+74
−138
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rename the CCM memory region for STM32F3 and STM32F4 series such that the CCM node can be used as a `zephyr,dtcm`. Signed-off-by: Mathieu Choplain <[email protected]>
The STM32 CCM can be used as `/chosen/zephyr,dtcm` - transition all boards to this chosen to allow deprecation/removal of the legacy `zephyr,ccm`. Signed-off-by: Mathieu Choplain <[email protected]>
Update the ST CCM usage sample to be compatible with CCM as `zephyr,dtcm`. Signed-off-by: Mathieu Choplain <[email protected]>
doc: dts: api: remove documentation of chosen `zephyr,ccm` The `zephyr,ccm` chosen was an ST-specific property which has been replaced by the generic `zephyr,dtcm`. Remove region initialization code from the common arch init code (+ BSS zeroing from common XIP init code). Signed-off-by: Mathieu Choplain <[email protected]>
Remove section names and symbols relating to the STM32 CCM region, `/chosen/zephyr,ccm`, which is replaced by the standard DTCM region `/chosen/zephyr,dtcm`. For backwards compatibility, the old `__ccm_<...>_section` attribute macros are aliased to `__dtcm_<...>_section` (until release 4.5). Signed-off-by: Mathieu Choplain <[email protected]>
The `st,stm32-ccm` is now used though the generic DTCM mechanism: remove all SoC-specific code which was used to implement support for it. Signed-off-by: Mathieu Choplain <[email protected]>
The `zephyr,ccm` chosen was an ST-specific property which has been replaced by the generic `zephyr,dtcm`. Remove it from the DTS documentation. Signed-off-by: Mathieu Choplain <[email protected]>
Document remplacement of the ST-specific `zephyr,ccm` by `zephyr,dtcm` along with actions to take in application code in the migration guide. Signed-off-by: Mathieu Choplain <[email protected]>
erwango
approved these changes
Dec 5, 2025
Contributor
Author
|
Once this PR is merged, I will open the backwards compatibility macros removal PR for v4.5. |
|
nashif
approved these changes
Dec 6, 2025
teburd
approved these changes
Dec 6, 2025
JarmouniA
approved these changes
Dec 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Architectures
area: Boards/SoCs
area: Devicetree
area: Linker Scripts
area: Samples
Samples
platform: ADI
Analog Devices, Inc.
platform: STM32
ST Micro STM32
Release Notes
To be mentioned in the release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



#4184 introduced
st,stm32-ccmand the associated/chosen/zephyr,ccmto support the ST-specific CCM (Core-Coupled Memory) found in STM32F3 and STM32F4 series SoCs, back when the more genericzephyr,dtcmdid not exist (it was introduced later by #17123).Fast-forward years of tree evolution, the CCM can now easily be supported as a
zephyr,dtcm: move to this more sensible solution which requires less maintenance and allows cleaning up various warts across the tree.samples/boards/st/ccmis kept to allow validation of the feature but really is vendor-agnostic now (besides wording) so it could be moved out ofsamples/boards(to where is up for debate...)Compatibility:
warning: orphan section '.dtcm_noinit' from '...' being placed in section '.dtcm_noinit')s/zephyr,ccm/zephyr,dtcmin DTS__ccm_<...>_sectiontype annotationszephyr,dtcmis built properly__DEPRECATED_MACROwhich allows finding and replacing usage easily__ccm_start), which should not have been used much if everunknown identifier __ccm_<XXX>at use site