zephyr/samples/subsys/llext/modules/prj.conf
Luca Burelli 030c1c8308 samples/llext/modules: build hello_world as built-in by default
This commit changes the default value of CONFIG_HELLO_WORLD_MODE to 'y'
so that the hello_world function is compiled as a built-in part of the
Zephyr image by default. This is the simplest possible configuration,
that works for all architectures.

To build hello_world as an llext module, the user must either follow the
commands in the documentation or set CONFIG_HELLO_WORLD_MODE=m in the
project file along with additional architecture-specific settings that
may be required for proper LLEXT support on the target.
Leave a note in the prj.conf and sample.yaml files to remind the user.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-08-30 11:43:29 -04:00

36 lines
1.4 KiB
Plaintext

CONFIG_LOG=y
CONFIG_LOG_MODE_IMMEDIATE=y
# CONFIG_MODULES must be enabled to allow setting any options to "m" in the
# Kconfig files. For compatibility with Kconfiglib, the name must be kept
# as-is even if Zephyr has a completely different concept for "modules".
CONFIG_MODULES=y
# LLEXT is only required when loading the extension at runtime. Since in this
# basic example there's only one llext, leaving it in when building the
# extension as a built-in is redundant; in a real application, however, there
# could be other uses of the llext subsystem.
CONFIG_LLEXT=y
CONFIG_LLEXT_LOG_LEVEL_DBG=y
CONFIG_LLEXT_HEAP_SIZE=64
CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y # supported by all targets
# This test consumes large amounts of stack when loading the LLEXT.
# Increase the available size to avoid overflowing (see issue #74536).
CONFIG_MAIN_STACK_SIZE=2048
# NOTE
#
# This project file explicitly does NOT include the configuration for
# CONFIG_HELLO_WORLD_MODE, so a clean compile will include the function as
# built-in by default.
#
# To build it as an llext, please follow the instructions in the documentation
# of this sample; there are architecture-specific settings that must be set in
# addition to CONFIG_HELLO_WORLD_MODE=m. For example, most ARM targets need to
# either enable CONFIG_USERSPACE (if they support it) or disable MPU/MMU
# features for LLEXT to work correctly.