Catch linker overrun(s) and make more RAM available for firmware. - #1806
Open
antoinevg wants to merge 6 commits into
Open
Catch linker overrun(s) and make more RAM available for firmware.#1806antoinevg wants to merge 6 commits into
antoinevg wants to merge 6 commits into
Conversation
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
from
July 31, 2026 14:39
8fa93e3 to
91df1d5
Compare
antoinevg
marked this pull request as draft
July 31, 2026 14:44
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
from
August 3, 2026 08:33
ad9ec50 to
bb15e9c
Compare
antoinevg
marked this pull request as ready for review
August 4, 2026 09:37
Member
|
@antoinevg I fixed #1807 in #1808 and merged those changes into this branch, but it's failing on Jenkins. |
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
2 times, most recently
from
August 6, 2026 08:41
35fc83b to
479c76d
Compare
antoinevg
marked this pull request as draft
August 6, 2026 11:35
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
from
August 11, 2026 15:55
479c76d to
5ca2f2f
Compare
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
5 times, most recently
from
August 14, 2026 09:21
33a90d3 to
1144f9a
Compare
antoinevg
marked this pull request as ready for review
August 17, 2026 08:13
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
2 times, most recently
from
August 17, 2026 09:27
ba432fb to
5c67a25
Compare
antoinevg
marked this pull request as draft
August 17, 2026 09:41
antoinevg
force-pushed
the
antoinevg/catch-ram-overrun
branch
from
August 17, 2026 10:18
5c67a25 to
310776d
Compare
antoinevg
marked this pull request as ready for review
August 18, 2026 07:37
martinling
self-requested a review
August 18, 2026 16:09
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 PR adds:
ram_local1that would otherwise not be enforced.ram_m0linker scriptLPC43xx_M4_M0_image_from_text.ldto enforce size-check.-Wl,--print-memory-usagetoLDFLAGSso we can keep an eye on our memory budget moving forward.ram_local2to create a newram_rtconfigsection.ram_rtconfig. Currently this includes:platform_gpioplatform_scuSuggestions for more relocations are welcome, we have another ~9 kB to fill!
Background
Currently we are not enforcing size limits for the
ram_local1andram_m0sections:romshadow region was a 1:1 mapping to the entirety of the first block of physical SRAM (ram_local1@0x1000 0000). (96kB on LPC4320, 128kB on LPC4330)libopencm3linker scripts (ab)use this correspondence to support bothhackrf_usb.binstoring the firmware in SPI Flash (from where it is copied to RAM by the factory boot ROM) andhackrf_usb.dfuwhich stores the firmware directly to RAM.romstopped being a 1:1 mapping toram_local1:romto the size of the SPI Flash (1MB) so we could add the FPGA bit-streams.ram_local1forram_usb.In an ideal world, instead of an assertion, we'd probably do a similar fix for
ram_local1as I did here forram_m0but I'm going to leave that as a separate exercise for someone else - braver than I - to untangle.Note: how
libopencm3generates.dfuvs.binLinker setup for the different targets are:
Works like this: