Skip to content

boards/arm: shrink flash for ostest on lm3s6965, stm32g4, and quickfeather - #21219

Merged
casaroli merged 1 commit into
apache:masterfrom
Swatantra-66:boards/shrink-ostest-configs
Nov 1, 2026
Merged

casaroli merged 1 commit into
apache:masterfrom
Swatantra-66:boards/shrink-ostest-configs

Conversation

@Swatantra-66

Copy link
Copy Markdown
Contributor

Summary

Configurations lm3s6965-ek:qemu-flat and b-g431b-esc1:nsh both build testing/ostest and operate near flash capacity. Expanding ostest with additional tests (e.g., pthread_sigqueue in apache/nuttx-apps#3931) causes both configurations to overflow flash during CI build.

This patch frees flash headroom in both configurations using existing options:

  • lm3s6965-ek/qemu-flat: disable unused network utilities (TFTP client, Telnet daemon, Netcat, NTP client, and network statistics), freeing ~11 KB.
  • b-g431b-esc1/nsh: disable unused C++ runtime support and unused NSH commands (ifconfig, df, mkrd), freeing ~4.5 KB.

Impact

No functional regression. Frees flash space in both board configurations so ostest tests fit comfortably.

Testing

CI build test on arm-ti and arm-stm32l-u-g.

acassis
acassis previously approved these changes Oct 30, 2026
@casaroli

Copy link
Copy Markdown
Contributor

nucleo-g431kb:nsh also builds ostest and overflows with nuttx-apps#3931: Linux (arm-stm32l-u-g) region `flash' overflowed by 952 bytes. This PR does not change it.

Fix: trim boards/arm/stm32g4/nucleo-g431kb/configs/nsh/defconfig too.

@github-actions github-actions Bot added Size: S The size of the change in this PR is small Board: arm labels Oct 30, 2026
@Swatantra-66
Swatantra-66 force-pushed the boards/shrink-ostest-configs branch from f203908 to 9968ec1 Compare October 30, 2026 18:12
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

arduino-mega2560

  • flash: .text +92 B (+0.1%, 65,478 B / 262,144 B, total: 25% used)

esp32-devkitc

  • ROM: .flash.text +24 B (+0.0%, 128,092 B / 4,194,272 B, total: 3% used)
  • irom0_0_seg: .flash.text +24 B (+0.0%, 93,964 B / 3,342,304 B, total: 3% used)

hifive1-revb

  • flash: .text -4 B (-0.0%, 84,804 B / 4,194,304 B, total: 2% used)

mirtoo

  • kseg0_progmem: .text +64 B (+0.1%, 67,332 B / 131,072 B, total: 51% used)

qemu-armv8a

  • Code: .text.readline_fd_ex -4 B, .text.uart_ioctl +24 B (+0.0%, 354,164 B)

qemu-intel64

  • Code: .text +36 B (+0.0%, 8,687,577 B)

rx65n-rsk2mb

  • ROM: .text +16 B (+0.0%, 90,072 B / 2,097,152 B, total: 4% used)

s698pm-dkit

  • Code: .text +48 B (+0.0%, 383,792 B)

stm32-nucleo-f103rb

  • flash: .text +20 B (+0.1%, 34,184 B / 131,072 B, total: 26% used)

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

@Swatantra-66
Swatantra-66 force-pushed the boards/shrink-ostest-configs branch from 9968ec1 to f5f7e67 Compare October 30, 2026 18:46
@Swatantra-66

Copy link
Copy Markdown
Contributor Author

nucleo-g431kb:nsh also builds ostest and overflows with nuttx-apps#3931: Linux (arm-stm32l-u-g) region `flash' overflowed by 952 bytes. This PR does not change it.

Fix: trim boards/arm/stm32g4/nucleo-g431kb/configs/nsh/defconfig too.

Trimmed boards/arm/stm32g4/nucleo-g431kb/configs/nsh/defconfig as well (disabled C++ runtime and the same 15 unused NSH commands). This frees ~4 to 5 KiB, comfortably resolving the 952-byte overflow

@casaroli

Copy link
Copy Markdown
Contributor

CI fails at the defconfig normalize check: savedefconfig removes lines from the two stm32g4 defconfigs.
b-g431b-esc1:nsh: # CONFIG_ARCH_BUTTONS is not set, # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y.
nucleo-g431kb:nsh: # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y.
Fix: run ./tools/refresh.sh --silent b-g431b-esc1:nsh nucleo-g431kb:nsh, commit the two defconfigs, and rebase on master (the -Werror=shadow errors in lib_libvsprintf.c are fixed by #21210).

@casaroli

Copy link
Copy Markdown
Contributor

CI fails at the defconfig normalize check: savedefconfig removes lines from the two stm32g4 defconfigs. b-g431b-esc1:nsh: # CONFIG_ARCH_BUTTONS is not set, # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y. nucleo-g431kb:nsh: # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y. Fix: run ./tools/refresh.sh --silent b-g431b-esc1:nsh nucleo-g431kb:nsh, commit the two defconfigs, and rebase on master (the -Werror=shadow errors in lib_libvsprintf.c are fixed by #21210).

@Swatantra-66 you were faster

@Swatantra-66

Copy link
Copy Markdown
Contributor Author

CI fails at the defconfig normalize check: savedefconfig removes lines from the two stm32g4 defconfigs. b-g431b-esc1:nsh: # CONFIG_ARCH_BUTTONS is not set, # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y. nucleo-g431kb:nsh: # CONFIG_NSH_CMDOPT_HEXDUMP is not set, CONFIG_NSH_DISABLE_IFCONFIG=y. Fix: run ./tools/refresh.sh --silent b-g431b-esc1:nsh nucleo-g431kb:nsh, commit the two defconfigs, and rebase on master (the -Werror=shadow errors in lib_libvsprintf.c are fixed by #21210).

Yes, I caught the normalization diffs and stripped the redundant options right away. The CI merge build is running clean against latest master now

…ather

Configurations lm3s6965-ek:qemu-flat, b-g431b-esc1:nsh,
nucleo-g431kb:nsh, and quickfeather:nsh build testing/ostest and
operate near flash capacity. Expanding ostest with new tests
(e.g. pthread_sigqueue) causes these configurations to overflow flash
during build.

Free flash headroom using existing options:
- lm3s6965-ek/qemu-flat: disable unused network utilities (TFTP client,
  Telnet daemon, Netcat, NTP client, and network statistics).
- b-g431b-esc1/nsh: disable unused C++ runtime support, button driver,
  and unused NSH commands (basename, cmp, df, dirname, hexdump,
  losetup, mkdir, mkrd, mount, rmdir, time, umount, wget, xd).
- nucleo-g431kb/nsh: disable unused C++ runtime support and unused NSH
  commands (basename, cmp, df, dirname, hexdump, losetup, mkdir, mkrd,
  mount, rmdir, time, umount, wget, xd).
- quickfeather/nsh: disable unused NSH commands (basename, cmp, df,
  dirname, hexdump, losetup, mkdir, mkrd, mount, rmdir, time, umount,
  wget, xd).

Signed-off-by: Swatantra Yadav <[email protected]>
Assisted-by: Google Gemini
@Swatantra-66
Swatantra-66 force-pushed the boards/shrink-ostest-configs branch from 229b7ec to 1deb583 Compare October 31, 2026 17:40
@Swatantra-66 Swatantra-66 changed the title boards/arm: shrink lm3s6965-ek and b-g431b-esc1 flash footprint for ostest boards/arm: shrink flash for ostest on lm3s6965, stm32g4, and quickfeather Oct 31, 2026
@casaroli
casaroli merged commit cb6d987 into apache:master Nov 1, 2026
43 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants