nuttx-apps/system/uorb
Justin Hammond 41a2c9d982 system/uorb: Select the printf extension the format strings need.
Every topic's format string is printed through orb_info() or
orb_fprintf(), and both reach the data through "%pB", which is a NuttX
extension rather than a standard conversion.  UORB_FORMAT turns that
code on without turning the extension on, so a configuration that
enables the listener but not the debug output builds cleanly, runs, and
prints a pointer where the reading should be:

  sensor_voltage(now:4294968998000):0xc0203c98B

The address is the va_format the extension was supposed to expand, and
the trailing B is the conversion character being taken as ordinary
text.  Nothing warns, because to the compiler and to printf this is a
valid format string that means something else.

DEBUG_UORB already selects the extension, so the fault is invisible to
anyone who turned that on.  The two are independent options and only
one of them declared what it needed.  Move the select onto UORB_FORMAT,
which is the option that decides whether the format strings are
compiled in at all.

Signed-off-by: Justin Hammond <justin@dynam.ac>
2026-09-20 22:30:19 +08:00
..
sensor system/uorb: add resistance, conductivity, energy and charge topics. 2026-09-14 23:56:06 +08:00
test system/uorb: introduce CONFIG_UORB_FORMAT for format string control 2026-06-09 17:02:03 +08:00
uORB system/uorb: introduce CONFIG_UORB_FORMAT for format string control 2026-06-09 17:02:03 +08:00
CMakeLists.txt uorb: add generator tool. 2025-11-20 20:44:25 +08:00
generator.c uorb/generator:Fix generator bugs and formatting issues. 2025-11-20 20:44:25 +08:00
Kconfig system/uorb: Select the printf extension the format strings need. 2026-09-20 22:30:19 +08:00
listener.c system/uorb: introduce CONFIG_UORB_FORMAT for format string control 2026-06-09 17:02:03 +08:00
Make.defs system: migrate to SPDX identifier 2024-12-30 18:02:50 +08:00
Makefile uorb: add generator tool. 2025-11-20 20:44:25 +08:00