diff options
author | Maureen Helm <maureen.helm@analog.com> | 2024-01-02 14:21:37 -0600 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-06-18 16:19:07 +1000 |
commit | 2b0e64beaf5998bae794d2d67827f70a8bf0fe74 (patch) | |
tree | 6f70d483934c73ed53926766af258a5eb1abb3ac | |
parent | c211c052915fdb6007d79abf70329918381c3974 (diff) |
zephyr: Link MicroPython with the Zephyr kernel library.
Unlike most other Zephyr libraries, libkernel.a is not built as a
whole-archive.
This change also fixes a linker error observed on nucleo_wb55rg while
preparing an upgrade to Zephyr v3.5.0, caused by an undefined reference to
`z_impl_k_busy_wait`.
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
-rw-r--r-- | ports/zephyr/CMakeLists.txt | 1 | ||||
-rw-r--r-- | ports/zephyr/src/zephyr_start.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/ports/zephyr/CMakeLists.txt b/ports/zephyr/CMakeLists.txt index 743907e62..c048d92d2 100644 --- a/ports/zephyr/CMakeLists.txt +++ b/ports/zephyr/CMakeLists.txt @@ -109,6 +109,7 @@ zephyr_library_compile_definitions( ) zephyr_library_sources(${MICROPY_SOURCE_QSTR}) +zephyr_library_link_libraries(kernel) add_dependencies(${MICROPY_TARGET} zephyr_generated_headers) diff --git a/ports/zephyr/src/zephyr_start.c b/ports/zephyr/src/zephyr_start.c index b24e501c3..bcd68f92c 100644 --- a/ports/zephyr/src/zephyr_start.c +++ b/ports/zephyr/src/zephyr_start.c @@ -36,8 +36,4 @@ void main(void) { zephyr_getchar_init(); #endif real_main(); - - // This is needed so the linker includes k_timer_init, z_impl_k_timer_start - // and z_impl_k_timer_stop, as used by libmicropython.a. - k_timer_start(NULL, K_MSEC(0), K_MSEC(0)); } |