1 /* 2 * Copyright (c) 2023 Intel Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 * This very simple hello world C code can be used as a test case for building 9 * probably the simplest loadable extension. It requires a single symbol be 10 * linked, section relocation support, and the ability to export and call out to 11 * a function. 12 */ 13 14 #include <stdint.h> 15 #include <zephyr/llext/symbol.h> 16 #include <zephyr/sys/printk.h> 17 #include <zephyr/ztest_assert.h> 18 19 static const uint32_t number = 42; 20 test_entry(void)21void test_entry(void) 22 { 23 printk("hello world\n"); 24 printk("A number is %u\n", number); 25 zassert_equal(number, 42); 26 } 27 EXPORT_SYMBOL(test_entry); 28