mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-01 19:36:36 +00:00
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 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
1c0a812377
commit
04ee0d45ef
1 changed files with 3 additions and 1 deletions
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue