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>
This commit is contained in:
parent
c211c05291
commit
2b0e64beaf
@ -109,6 +109,7 @@ zephyr_library_compile_definitions(
|
|||||||
)
|
)
|
||||||
|
|
||||||
zephyr_library_sources(${MICROPY_SOURCE_QSTR})
|
zephyr_library_sources(${MICROPY_SOURCE_QSTR})
|
||||||
|
zephyr_library_link_libraries(kernel)
|
||||||
|
|
||||||
add_dependencies(${MICROPY_TARGET} zephyr_generated_headers)
|
add_dependencies(${MICROPY_TARGET} zephyr_generated_headers)
|
||||||
|
|
||||||
|
|||||||
@ -36,8 +36,4 @@ void main(void) {
|
|||||||
zephyr_getchar_init();
|
zephyr_getchar_init();
|
||||||
#endif
|
#endif
|
||||||
real_main();
|
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));
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user