[BACKPORT] arch/arm/stm32: set F412 SRAM1_END to 256KiB - #407
Merged
dakejahl merged 1 commit intoSep 2, 2026
Conversation
The F412 has 256KiB of system SRAM at 0x20000000 and no CCM. The F2/F4 heap map had no F412 entry, so it used the 128KiB default at 0x20020000 and left the upper half unused. Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com> (cherry picked from commit 65d0b3f) Backport note: this tree still has stm32_allocateheap.c under arch/arm/src/stm32; upstream moved the F2/F4 heap map to arch/arm/src/common/stm32/stm32_allocateheap_m3m4_v1.c.
dakejahl
force-pushed
the
dakejahl/stm32f412-sram-12.12
branch
from
September 2, 2026 16:48
8052e23 to
3a207e1
Compare
This was referenced Sep 3, 2026
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.
Summary
Backport of apache/nuttx#20039 (upstream 65d0b3f) to
px4_firmware_nuttx-12.12.0+. 10.3 carry is #406.Give STM32F412 the 256 KiB of system SRAM it actually has. The F2/F4 heap map had no F412 entry, so
SRAM1_ENDwas the 128 KiB default.Problem
Every F412 (CE/CG/VG/ZG) has 256 KiB at
0x20000000and no CCM.stm32_allocateheap.clisted F401/F410/F427/F429/F446/F469 and dumped F412 into the 128 KiBelse, soup_allocate_heap()ended at0x20020000.Solution
Set
SRAM1_ENDto0x20040000whenCONFIG_STM32_STM32F412is selected.