Fix heap allocation on STM32H7Ax family #464
Merged
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.
Summary of changes
Use AXI SRAM for main memory and AHB SRAM for additional heap on STM32H7Ax family.
Fix wrong IROM1 size on STM32H7A3ZITxQ and STM32H7B3ZITxQ(was 128KB, should be 2MB).
After Split Heap was implemented on STM32H7, any heap allocation on STM32H7Ax family will fail with an "Out of Memory" error. Comparing the linker script of STM32H7Ax_FAMILY and STM32H743_STM32H72x_FAMILIES, I found the former script uses AHB SRAM as main memory and AXI SRAM as additional heap, but the latter one uses AXI SRAM as main memory and AHB SRAM as additional heap. The current Split Heap implementation requires the additional heap to be placed at a higher address than the main memory. Given the fact that AXI SRAM starts at 0x24000000 and AHB SRAM starts at 0x30000000, the current linker script of STM32H7Ax_FAMILY does not meet the requirement and needs to be modified.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results