Fix: Shrink SRAM sizes of STM32F0 #2005
Merged
+5
−5
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.
Detailed description
Tested on 32F072B-Disco to no longer trigger lots of
SWD access resulted in fault, retrying
every time mainloop callspoll_rtt()
and that crosses 0x20004000 boundary of a 16 KiB SRAM F072RB device to "search" for control blocks up to 0x20005000.I think also the DUT BMF (which I ported there as a f072-if derivative) got stuck when this bug was triggering, judging by the morse blinky stopping.
My problem is specifically advertising 20 KiB on a 16 KiB device; for 32 KiB devices it's probably less of an issue (like stack not readable). I know there is
mon rtt ram 0x20000000 0x20004000
as a workaround, and it indeed works, but BMD is supposed to be automatic, with no configuration.However, on per grid pics from ST website there are more variations on SRAM/Flash than 2 TRMs contain, and I did not feel like downloading all 12 datasheets to try to match the 5 part IDs to them, but note that there is
F_SIZE
at 0x1FFF_F7CC for a 16-bit flash size in kibibytes that someone could try to read as a better alternative to static flash capacity associations.Size increase on
native
is +40 bytes because the constants are no longer identical: 4,6,8,16,32 not 20.Your checklist for this pull request
Closing issues