Repository navigation
boards: Exclude /proc/memdump from two configurations that overflow their flash - #21819
Merged
Merged
Conversation
The kernel half of the qemu-protected flash is full again. The kernel image is 624 bytes larger than its 128 KiB (Arm GNU 13.2), and the arm-ti CI job fails with "region `kflash' overflowed". The image grew in many small steps. Commit cb60949 ("fs/procfs: Give every path a file serial number") was the first one that did not fit. /proc/memdump and the NSH memdump command dump the heap for debugging. No program of this configuration uses them. Exclude /proc/memdump. The kernel image is 1944 bytes smaller and has 1320 bytes free. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]>
weact-stm32h750:sdcard built with clang does not fit its 128 KiB flash. The arm-stm32h7 CI job fails with "section '.data' will not fit in region 'flash'". Commit f231a24 ("mm: replace mm_heap_config_s.heap with an allocheap flag") links memalign() into the image and used 448 of the last 512 free bytes. Commit cacded6 ("fs/procfs: list registered entries once and in their directory") then made the image too large. On master it is 544 bytes too large. /proc/memdump and the NSH memdump command dump the heap for debugging. The configuration is for the SD card and does not use them. Exclude /proc/memdump. The image is 2048 bytes smaller and has 1504 bytes free (clang 17.0.1). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]>
casaroli
requested review from
acassis,
anchao,
masayuki2009,
xiaoxiang781216 and
yamt
as code owners
November 13, 2026 07:16
This was referenced Nov 13, 2026
xiaoxiang781216
approved these changes
Nov 13, 2026
This was referenced Nov 13, 2026
Merged
GUIDINGLI
approved these changes
Nov 13, 2026
This was referenced Nov 13, 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
Two configurations do not link on master, and the CI of every PR fails in two jobs:
Linux (arm-ti),lm3s6965-ek:qemu-protectedwithCONFIG_ARM_TOOLCHAIN_GNU_EABI:arm-none-eabi-ld: region 'kflash' overflowed by 624 bytes.Linux (arm-stm32h7),weact-stm32h750:sdcardwithCONFIG_ARM_TOOLCHAIN_CLANG:ld.lld: error: section '.data' will not fit in region 'flash': overflowed by 544 bytes.The numbers are for master 562db43. The CI runs of other PRs show a little less (240 to 464 bytes and 448 to 480 bytes).
weact-stm32h750:sdcard: f231a24 (#21722) linksmemalign()andmm_memalign()into the image. This used 448 of the last 512 free bytes. Then cacded6 (#21724) made the image 96 bytes too large.lm3s6965-ek:qemu-protected: #21722 does not change the kernel image, because the kernel already linkskmm_memalign()(up_create_stack()and the ELF loader use it). The kernel image grew in many small steps after #21722. cb60949 (#21682) was the first commit that did not fit./proc/memdumpand the NSHmemdumpcommand dump the heap for debugging. Neither configuration uses them. SetCONFIG_FS_PROCFS_EXCLUDE_MEMDUMP=yin both, one commit per board.Impact
Only
lm3s6965-ek:qemu-protectedandweact-stm32h750:sdcard: no/proc/memdumpand no NSHmemdumpcommand. No code change.Testing
Make build as in
tools/testbuild.sh, in the CI docker image (apache-nuttx-ci-linux): Arm GNU Toolchain 13.2.Rel1 (13.2.1) for lm3s6965-ek and clang 17.0.1 (LLVM Embedded Toolchain for Arm) for weact-stm32h750, nuttx-apps ab105e659. Bytes used of the 131072-byte region:kflashflashOther options measured on master, in bytes saved: lm3s6965-ek:
SCHED_DUMP_TASKSandSCHED_DUMP_STACKoff 848,DEBUG_FEATURESoff 1200. weact-stm32h750: NSHuptimeoff 1024 (as #21808 did for stm32f334-disco),NSH_ALIASoff 1216.mm_initialize_heap()withlib_malloc()in place oflib_memalign()gives back 448 bytes on weact-stm32h750 and 0 bytes on lm3s6965-ek, so it does not fix either configuration alone.tools/refresh.sh --silentdoes not change either defconfig. The builds have no undefined reference. Not run on hardware or in QEMU.