mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-05 05:07:49 +00:00
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>
84 lines
1.3 KiB
Text
84 lines
1.3 KiB
Text
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
menuconfig UORB
|
|
tristate "uorb(micro object request broker)"
|
|
depends on SENSORS && USENSOR
|
|
default n
|
|
|
|
if UORB
|
|
|
|
config UORB_PRIORITY
|
|
int "task priority"
|
|
default 100
|
|
|
|
config UORB_STACKSIZE
|
|
int "stack size"
|
|
default DEFAULT_TASK_STACKSIZE
|
|
|
|
config UORB_FORMAT
|
|
bool
|
|
select LIBC_PRINT_EXTENSION
|
|
default n
|
|
|
|
config UORB_LISTENER
|
|
bool "uorb listener"
|
|
select UORB_FORMAT
|
|
default n
|
|
|
|
config UORB_GENERATOR
|
|
bool "uorb generator"
|
|
select UORB_FORMAT
|
|
default n
|
|
|
|
config UORB_TESTS
|
|
bool "uorb unit tests"
|
|
default n
|
|
|
|
config UORB_LOOP_MAX_EVENTS
|
|
int "uorb loop max events"
|
|
depends on EVENT_FD
|
|
default 0
|
|
|
|
if UORB_TESTS
|
|
|
|
config UORB_STORAGE_DIR
|
|
string "uorb test result storage dir"
|
|
default "/data/"
|
|
|
|
endif # UORB_TESTS
|
|
|
|
config DEBUG_UORB
|
|
bool "uorb debug output"
|
|
select LIBC_PRINT_EXTENSION
|
|
select UORB_FORMAT
|
|
depends on LIBC_FLOATINGPOINT && SENSORS_USE_FLOAT
|
|
default n
|
|
|
|
if DEBUG_UORB
|
|
|
|
config UORB_ALERT
|
|
bool "uorb panic output"
|
|
default n
|
|
depends on DEBUG_ALERT
|
|
|
|
config UORB_ERROR
|
|
bool "uorb error output"
|
|
default n
|
|
depends on DEBUG_ERROR
|
|
|
|
config UORB_WARN
|
|
bool "uorb warn output"
|
|
default n
|
|
depends on DEBUG_WARN
|
|
|
|
config UORB_INFO
|
|
bool "uorb info output"
|
|
default n
|
|
depends on DEBUG_INFO
|
|
|
|
endif # DEBUG_UORB
|
|
|
|
endif # UORB
|