Adds a very simple hello world test case for llext. The loadable extension is built and then included as a binary array into the test making it very easy to load, debug, and inspect. The extension is built using the same toolchain as the base image by default. Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
27 lines
597 B
CMake
27 lines
597 B
CMake
# Copyright (c) 2023 Intel Corporation.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
cmake_minimum_required(VERSION 3.20.0)
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
project(llext_test)
|
|
|
|
add_subdirectory(hello_world)
|
|
|
|
target_sources(app PRIVATE src/test_llext_simple.c)
|
|
|
|
target_include_directories(app PRIVATE
|
|
${ZEPHYR_BASE}/include
|
|
${ZEPHYR_BASE}/kernel/include
|
|
${ZEPHYR_BASE}/arch/${ARCH}/include
|
|
)
|
|
|
|
set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)
|
|
|
|
generate_inc_file_for_target(
|
|
app
|
|
${HELLO_WORLD_LLEXT}
|
|
${gen_dir}/hello_world.inc
|
|
)
|
|
|
|
add_dependencies(app hello_world)
|