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 570d7a450e..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))) @@ -229,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 @@ -310,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 @@ -339,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 @@ -353,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))) @@ -367,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))) @@ -580,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))) @@ -641,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))) diff --git a/sys/net/gnrc/Makefile.dep b/sys/net/gnrc/Makefile.dep index 36736af2fc..fedcca378d 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 FEATURES_REQUIRED += periph_rtt endif