llext: add a "modules" Kconfig tristate example

This adds a new sample to demonstrate the use of tristate symbols
in Kconfig to build a function as an llext module or as a built-in
part of Zephyr.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This commit is contained in:
Luca Burelli 2024-06-07 19:10:55 +02:00 committed by Alberto Escolar
commit 57011e4c1a
8 changed files with 262 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Intel Corporation.
mainmenu "LLEXT functionality test"
source "Kconfig.zephyr"
config HELLO_WORLD_MODE
tristate "Include the hello_world function"
default m
help
This enables building the hello_world function, implemented in
hello_world_ext.c, either as an llext module or as a built-in part of
Zephyr.
If you select 'm', the hello_world function will be built as an llext
"module". If you select 'y', the hello_world function will be directly
linked in the Zephyr image.