Skip to content

boards: Exclude /proc/memdump from two configurations that overflow their flash - #21819

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:boards-fit-memalign-up
Nov 13, 2026
Merged

xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:boards-fit-memalign-up

Conversation

@casaroli

Copy link
Copy Markdown
Contributor

Summary

Two configurations do not link on master, and the CI of every PR fails in two jobs:

  • Linux (arm-ti), lm3s6965-ek:qemu-protected with CONFIG_ARM_TOOLCHAIN_GNU_EABI: arm-none-eabi-ld: region 'kflash' overflowed by 624 bytes.
  • Linux (arm-stm32h7), weact-stm32h750:sdcard with CONFIG_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) links memalign() and mm_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 links kmm_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/memdump and the NSH memdump command dump the heap for debugging. Neither configuration uses them. Set CONFIG_FS_PROCFS_EXCLUDE_MEMDUMP=y in both, one commit per board.

Impact

Only lm3s6965-ek:qemu-protected and weact-stm32h750:sdcard: no /proc/memdump and no NSH memdump command. 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:

Tree lm3s6965-ek:qemu-protected kflash weact-stm32h750:sdcard flash
f231a24^ 130776 130560
f231a24 (#21722) 130760 131008
cacded6 (#21724) 130920 overflowed by 96 bytes
cb60949 (#21682) overflowed by 80 bytes overflowed by 320 bytes
master 562db43 overflowed by 624 bytes overflowed by 544 bytes
master + this PR 129752 (1320 free) 129568 (1504 free)

Other options measured on master, in bytes saved: lm3s6965-ek: SCHED_DUMP_TASKS and SCHED_DUMP_STACK off 848, DEBUG_FEATURES off 1200. weact-stm32h750: NSH uptime off 1024 (as #21808 did for stm32f334-disco), NSH_ALIAS off 1216. mm_initialize_heap() with lib_malloc() in place of lib_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 --silent does not change either defconfig. The builds have no undefined reference. Not run on hardware or in QEMU.

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]>
@github-actions github-actions Bot added Size: XS The size of the change in this PR is very small Board: arm labels Nov 13, 2026
@xiaoxiang781216
xiaoxiang781216 merged commit 26adb69 into apache:master Nov 13, 2026
37 checks passed
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: arm Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants