Skip to content

nshlib: apply configured priority/stacksize under CONFIG_BUILD_KERNEL#3635

Closed
hitHuang wants to merge 1 commit into
apache:masterfrom
hitHuang:enhancement/kernel_build
Closed

nshlib: apply configured priority/stacksize under CONFIG_BUILD_KERNEL#3635
hitHuang wants to merge 1 commit into
apache:masterfrom
hitHuang:enhancement/kernel_build

Conversation

@hitHuang

@hitHuang hitHuang commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Companion to NuttX#19412, which splits the compile-time
name/priority/stacksize registry table (struct builtin_s / g_builtins[]) out of
CONFIG_BUILTIN into a new hidden symbol, CONFIG_APP_REGISTRY
(default y if BUILTIN || BUILD_KERNEL).

This PR switches builtin/Make.defs and nshlib/nsh_fileapps.c from CONFIG_BUILTIN to
CONFIG_APP_REGISTRY, so nsh_fileapp() can apply an app's configured priority/stacksize
via posix_spawn() under CONFIG_BUILD_KERNEL. exec_builtin.c stays on CONFIG_BUILTIN.

Must be merged after apache/nuttx#CONFIG_APP_REGISTRY doesn't
exist on nuttx master yet; merging this first would drop apps/builtin out of the
build even for existing CONFIG_BUILTIN=y configs.

Testing

See NuttX#19412 for full before/after logs (rv-virt, knsh_romfs,
modified examples/hello). Also re-verified rv-virt:nsh (CONFIG_BUILTIN=y, no
CONFIG_BUILD_KERNEL) is unaffected.

nsh_fileapp() ignored an application's configured priority/stacksize
under CONFIG_BUILD_KERNEL, since the registry table it reads was gated
on CONFIG_BUILTIN, which depends on !BUILD_KERNEL.

Switch builtin/Make.defs and nsh_fileapps.c to the new
CONFIG_APP_REGISTRY symbol (nuttx side) so the lookup works under
CONFIG_BUILD_KERNEL. exec_builtin.c stays on CONFIG_BUILTIN since it
still dereferences builtin->main.

Signed-off-by: liang.huang <liang.huang@houmo.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant