-
Notifications
You must be signed in to change notification settings - Fork 3k
Add option to use CCMRAM on F303xE. #11756
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
Add option to use CCMRAM on F303xE. #11756
Conversation
@JammuKekkonen, thank you for your changes. |
CI started |
@ARMmbed/team-st-mcd for your review, too. |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@@ -56,6 +56,10 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE { ; load region size_region | |||
.ANY (+RW +ZI) | |||
} | |||
|
|||
RW_IRAM2 (0x10000000) (0x4000) { ; RW data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you reorder this? It's confusing because you've put the CCM RAM in between RW_IRAM1
and ARM_LIB_STACK
, which are adjacent.
It's probably a good idea to name the execution region CCMRAM
too, if you're manually directing stuff there. RW_IRAM2
could be construed as general-purpose RAM.
(I'm assuming you're not viewing it as general-purpose RAM, or you would be directing general stuff there. Comment should probably say that rather than "RW data").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current way follows the naming and location in F437xG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to fix that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, 437's sct is a mess. It's got 5 RAM regions, three of which are adjacent, but they're all separated in the map.
The three together are (RW_m_crash_data
, RW_IRAM1
, ARM_LIB_STACK
) in that order, then RW_IRAM2
(CCMRAM) and RW_IRAM3
(BKPSRAM) are separate.
Its GCC ld and IAR icf seem neat enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the order and renamed to CCMRAM
General thought, which you don't need to address here. Any platform which does have CCM RAM probably should use it for at least the boot/interrupt stack, and maybe the main thread stack. Those are a lot of your scratch space which you'd want to be fast, and you probably get away with avoiding any bus mastering issues that stop you viewing it as general-purpose static/heap RAM - you won't be generally trying to DMA into the stack. And gives you a RAM saving without any explicit application area attribute additions. |
@ARMmbed/team-st-mcd ^^ review the suggestion above |
Discussed with @JammuKekkonen - this is fine as-is, but the F303 doesn't have Ethernet, and there's no DMA in the HAL, so we can see no reason not to treat the CCMRAM as general-purpose RAM for Mbed OS. So a later extension might be to pop a The F437 does have Ethernet, but some boards don't. Maybe the F437 scatter file could do the same based on a |
CI started Still waiting for @ARMmbed/team-st-mcd review |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ST CI OK with NUCLEO_F303ZE and NUCLEO_F303RE
Description (required)
Add option to place data to ccm ram on STM32F303xE. Similar functionality exists already for at least STM32F437xG target.
Pull request type (required)
Test results (required)
Reviewers (optional)
@anttiylitokola @teetak01
Release Notes (required for feature/major PRs)
Summary of changes
Impact of changes
Migration actions required