From fb0c1e10ded2a6fb9f066b9893662cbcc86e4646 Mon Sep 17 00:00:00 2001 From: Matteo Golin Date: Thu, 6 Feb 2025 15:36:30 -0500 Subject: [PATCH] system/uorb: require that LIBC_FLOATINGPOINT be enabled for DEBUG_UORB This change prevents users from trying to use the `uorb_listener` application without having floating point printing enabled on systems that do not have an FPU (systems with FPUs have `LIBC_FLOATINGPOINT`) enabled by default. Solution dicussed and agreed in: https://github.com/apache/nuttx/issues/15599. --- system/uorb/Kconfig | 1 + system/uorb/listener.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/system/uorb/Kconfig b/system/uorb/Kconfig index 576751abb..8457c1362 100644 --- a/system/uorb/Kconfig +++ b/system/uorb/Kconfig @@ -41,6 +41,7 @@ endif # UORB_TESTS config DEBUG_UORB bool "uorb debug output" select LIBC_PRINT_EXTENSION + depends on LIBC_FLOATINGPOINT default n if DEBUG_UORB diff --git a/system/uorb/listener.c b/system/uorb/listener.c index 08b57e6e1..4897c63ec 100644 --- a/system/uorb/listener.c +++ b/system/uorb/listener.c @@ -49,6 +49,10 @@ #define ORB_TOP_WAIT_TIME 1000 #define ORB_DATA_DIR "/data/uorb/" +#if defined(CONFIG_DEBUG_UORB) && !defined(CONFIG_LIBC_FLOATINGPOINT) +#error "Enable CONFIG_LIBC_FLOATINGPOINT, required to see debug output" +#endif + /**************************************************************************** * Private Types ****************************************************************************/