This is an automated email from the ASF dual-hosted git repository.
GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 04ee0d45e system/nxinit: use TRACE_DEVERROR_BIT|TRACE_CLSERROR_BIT,
not TRACE_BITSET
04ee0d45e is described below
commit 04ee0d45effa63c3d6a699cc7885104baef2e011
Author: wangjianyu3 <[email protected]>
AuthorDate: Wed Sep 2 20:53:40 2026 +0800
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
<nuttx/usb/usbdev_trace.h> 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 <[email protected]>
---
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 de6964b92..f66dc4149 100644
--- a/system/nxinit/init.c
+++ b/system/nxinit/init.c
@@ -35,6 +35,8 @@
#include <sys/param.h>
#include <sys/wait.h>
+#include <nuttx/usb/usbdev_trace.h>
+
#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++)