diff --git a/cpu/native/Kconfig b/cpu/native/Kconfig index 268185bd0a..2b7faae06f 100644 --- a/cpu/native/Kconfig +++ b/cpu/native/Kconfig @@ -25,6 +25,7 @@ config CPU_ARCH_NATIVE # needed modules select MODULE_PERIPH if TEST_KCONFIG + select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT config CPU_CORE_NATIVE bool diff --git a/cpu/native/Makefile.dep b/cpu/native/Makefile.dep index e75b24467b..2beef965a0 100644 --- a/cpu/native/Makefile.dep +++ b/cpu/native/Makefile.dep @@ -40,6 +40,11 @@ ifneq (,$(filter socket_zep,$(USEMODULE))) endif endif +ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit for syscalls + USEMODULE += ztimer64_xtimer_compat +endif + USEMODULE += periph # UART is needed by startup.c diff --git a/sys/Kconfig.newlib b/sys/Kconfig.newlib index b1ba0e6a34..cd1f788a29 100644 --- a/sys/Kconfig.newlib +++ b/sys/Kconfig.newlib @@ -18,6 +18,7 @@ config MODULE_NEWLIB_SYSCALLS_DEFAULT default y depends on !HAVE_CUSTOM_NEWLIB_SYSCALLS select MODULE_DIV + select MODULE_ZTIMER64_XTIMER_COMPAT if MODULE_ZTIMER_XTIMER_COMPAT help Default implementation of newlib system calls. diff --git a/sys/Makefile.dep b/sys/Makefile.dep index c42d9da876..82271037cc 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -135,6 +135,10 @@ endif ifneq (,$(filter sntp,$(USEMODULE))) USEMODULE += sock_udp USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit ftimestamps + USEMODULE += ztimer64_xtimer_compat + endif endif ifneq (,$(filter sock_%,$(USEMODULE))) @@ -167,6 +171,9 @@ ifneq (,$(filter trickle,$(USEMODULE))) USEMODULE += random ifeq (,$(filter ztimer_msec,$(USEMODULE))) USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + USEMODULE += ztimer_msec + endif endif endif @@ -226,6 +233,10 @@ ifneq (,$(filter newlib,$(USEMODULE))) endif ifneq (,$(filter newlib_syscalls_default,$(USEMODULE))) USEMODULE += div + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit timestamps when using xtimer + USEMODULE += ztimer64_xtimer_compat + endif endif endif @@ -307,6 +318,10 @@ endif ifneq (,$(filter posix_semaphore,$(USEMODULE))) USEMODULE += sema USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires sema_timed that requires 64bit + USEMODULE += ztimer64_xtimer_compat + endif USEMODULE += posix_headers endif @@ -336,6 +351,9 @@ endif ifneq (,$(filter fib,$(USEMODULE))) USEMODULE += universal_address USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + USEMODULE += ztimer64_xtimer_compat + endif USEMODULE += posix_headers endif @@ -350,6 +368,10 @@ ifneq (,$(filter cpp11-compat,$(USEMODULE))) USEMODULE += timex FEATURES_REQUIRED += cpp FEATURES_REQUIRED += libstdcpp + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit for syscalls + USEMODULE += ztimer64_xtimer_compat + endif endif ifneq (,$(filter netstats_%, $(USEMODULE))) @@ -364,6 +386,10 @@ endif ifneq (,$(filter pthread,$(USEMODULE))) USEMODULE += xtimer USEMODULE += timex + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit ftimestamps + USEMODULE += ztimer64_xtimer_compat + endif endif ifneq (,$(filter schedstatistics,$(USEMODULE))) @@ -577,6 +603,10 @@ endif ifneq (,$(filter dsm,$(USEMODULE))) USEMODULE += sock_dtls USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit timestamps when using xtimer + USEMODULE += ztimer64_xtimer_compat + endif endif ifneq (,$(filter gcoap,$(USEMODULE))) @@ -638,6 +668,10 @@ ifneq (,$(filter cord_lc cord_ep,$(USEMODULE))) ifneq (,$(filter shell_commands,$(USEMODULE))) USEMODULE += sock_util endif + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit timestamps when using xtimer + USEMODULE += ztimer64_xtimer_compat + endif endif ifneq (,$(filter cord_epsim,$(USEMODULE))) @@ -795,6 +829,9 @@ ifneq (,$(filter evtimer,$(USEMODULE))) USEMODULE += ztimer_msec else USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + USEMODULE += evtimer_on_ztimer + endif endif endif diff --git a/sys/net/gnrc/Makefile.dep b/sys/net/gnrc/Makefile.dep index 2a3cfcea59..98d4976b4f 100644 --- a/sys/net/gnrc/Makefile.dep +++ b/sys/net/gnrc/Makefile.dep @@ -20,6 +20,10 @@ ifneq (,$(filter gnrc_gomach,$(USEMODULE))) USEMODULE += gnrc_nettype_gomach USEMODULE += random USEMODULE += xtimer + ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + # requires 64bit timestamps + USEMODULE += ztimer64_xtimer_compat + endif USEMODULE += gnrc_mac USEMODULE += ztimer_no_periph_rtt FEATURES_REQUIRED += periph_rtt diff --git a/sys/ztimer/Kconfig b/sys/ztimer/Kconfig index 7483b1b230..c68a070378 100644 --- a/sys/ztimer/Kconfig +++ b/sys/ztimer/Kconfig @@ -166,7 +166,6 @@ config MODULE_ZTIMER64_XTIMER_COMPAT select MODULE_DIV select MODULE_ZTIMER64 select MODULE_ZTIMER64_USEC - depends on MODULE_ZTIMER_XTIMER_COMPAT help This is a wrapper of xtimer API on ztimer64_usec.