From 82637e8a41897592649ff57e5856376369431478 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Wed, 2 Sep 2026 20:53:40 +0800 Subject: [PATCH] system/nxinit: use TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT, not TRACE_BITSET usbtrace_enable(TRACE_BITSET) was copied from nsh's CONFIG_USBDEV_TRACE block without also copying nsh's local #define TRACE_BITSET or the include it needs. TRACE_BITSET has no built-in definition; every other CONFIG_USBDEV_TRACE caller in the tree (nsh, composite, cdcacm, usbmsc) defines its own. This compiled fine as long as CONFIG_SYSTEM_NXINIT and CONFIG_USBDEV_TRACE were never both on for the same board; the two combined for the first time and init.c failed to build with 'TRACE_BITSET' undeclared. Add the missing include and inline the same error-only bitset those other callers fall back to when none of their granular trace options are enabled, since this file has no such granular Kconfig of its own. Assisted-by: OpenCode:claude-sonnet-5 Signed-off-by: wangjianyu3 --- system/nxinit/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/nxinit/init.c b/system/nxinit/init.c index de6964b928a..f66dc41496e 100644 --- a/system/nxinit/init.c +++ b/system/nxinit/init.c @@ -35,6 +35,8 @@ #include #include +#include + #include "action.h" #include "builtin.h" #include "init.h" @@ -235,7 +237,7 @@ int main(int argc, FAR char *argv[]) } #ifdef CONFIG_USBDEV_TRACE - usbtrace_enable(TRACE_BITSET); + usbtrace_enable(TRACE_DEVERROR_BIT | TRACE_CLSERROR_BIT); #endif for (i = 0; i < nitems(poller); i++)