[stm32] Place .data section into D1_SRAM instead of DTCM for H7#1048
Merged
chris-durand merged 1 commit intomodm-io:developfrom Jul 10, 2023
Merged
Conversation
salkinium
reviewed
Jul 10, 2023
Member
salkinium
left a comment
There was a problem hiding this comment.
Could you check if the linker layout maps in the module description need to be adapted? Or were they already correct?
face1d3 to
a86fd05
Compare
The data sections were previously placed into the first memory of the contiguous section with the lowest address. The selection is changed such that the first memory of the largest contiguous ram section is used. For all supported Cortex-M devices except STM32H7 the resulting linker script will be identical. On STM32H7 .data is currently placed into the DTCM which is not accessible by peripheral DMA transfers. With the new method the D1 AXI SRAM is used for .data while .fastdata remains in the DTCM.
a86fd05 to
027811f
Compare
Member
Author
I have updated the description. |
salkinium
approved these changes
Jul 10, 2023
Member
salkinium
left a comment
There was a problem hiding this comment.
Very good, thank you, pls merge.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This changes the method for choosing the memory that will contain the RAM data sections. Previously the first memory of the contiguous region with the lowest address was selected. Now the first memory of the largest region will be selected instead.
On STM32H7 the
.dataand.bsssections were previously put into the DTCM which is not accessible by peripheral DMA transfers. They will now be placed into the D1 AXI SRAM with the updated selection method.For all other supported Cortex-M devices the generated linker script will be identical. All targets except STM32H7, STM32U5 and SAMD/E5x only have one contiguous region anyway and for STM32U5 and SAMD/E5x the set contains the main RAM region and additional small SRAMs.
I have verified at least one generated linker script for every linker script template and only copyright headers and white space changed.