diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-04 08:56:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-04 08:56:10 -0600 |
commit | a6051b5d332687876175e0a55dcd32c9022e6288 (patch) | |
tree | 281895ba3ca9252d278616d781672d3e436501d4 | |
parent | daa1a41c7e96f583dfbd7ac5c1be7fc88e5cc844 (diff) | |
download | px4-nuttx-a6051b5d332687876175e0a55dcd32c9022e6288.tar.gz px4-nuttx-a6051b5d332687876175e0a55dcd32c9022e6288.tar.bz2 px4-nuttx-a6051b5d332687876175e0a55dcd32c9022e6288.zip |
Fix a build error when only USB device tracing is enabled (from David Sidrane). Also an update to the USB tracing document
-rw-r--r-- | nuttx/ChangeLog | 8 | ||||
-rw-r--r-- | nuttx/Documentation/UsbTrace.html | 120 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/Make.defs | 4 |
3 files changed, 131 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index cf1dd50aa..7d192fb53 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7135,3 +7135,11 @@ crashes. This was fixed by David Sidrane by implementing RAM functions. The killer code is copied and executed from ISRAM and the crash is avoided (2014-4-3). + * configs/sama5d3-xplained/Kconfig and include/board*.h; + configs/sama5d3x-ek/Kconfig and include/board*.h: Add support for + 528MHz CPU clock (2014-4-3). + * arch/arm/src/sama5/Make.defs: Fix a build error that occurs when + only USB device tracing is enabled (2014-4-4). + * Documentation/UsbTrace.html: Add some discussion of the USB monitor + (2014-4-4). + diff --git a/nuttx/Documentation/UsbTrace.html b/nuttx/Documentation/UsbTrace.html index e85377756..767b58736 100644 --- a/nuttx/Documentation/UsbTrace.html +++ b/nuttx/Documentation/UsbTrace.html @@ -328,5 +328,125 @@ static int pl2303_setup(FAR struct uart_dev_s *dev) And the interrupt returns </li> </ul> +<p><b>USB Monitor</b>. + The <i>USB monitor</i> is an application in the <code>apps/system/usbmonitor</code> that provides a convenient way to get debug trace output. + If tracing is enabled, the USB device will save encoded trace output in in-memory buffer; + if the USB monitor is also enabled, that trace buffer will be periodically emptied and dumped to the + system logging device (the serial console in most configurations). + The following are some of the relevant configuration options: +</p> +<ul> +<table width="100%"> + <tr> + <td colspan="2" align="left" valign="top" bgcolor="#e4e4e4"> + <i>Device Drivers -> USB Device Driver Support</i> + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_USBDEV_TRACE=y</code> + </td> + <td align="left" valign="top"> + Enable USB trace feature + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_USBDEV_TRACE_NRECORDS=<i>nnnn</i></code> + </td> + <td align="left" valign="top"> + Buffer <i>nnnn</i> records in memory. + If you lose trace data, then you will need to increase the size of this buffer + (or increase the rate at which the trace buffer is emptied). + </td> + </tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_USBDEV_TRACE_STRINGS=y</code> + </td> + <td align="left" valign="top"> + Optionally, convert trace ID numbers to strings. + This feature may not be supported by all drivers. + </td> + <tr> + <td colspan="2" align="left" valign="top" bgcolor="#e4e4e4"> + <i>Application Configuration -> NSH LIbrary</i> + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_NSH_USBDEV_TRACE=n</code> + </td> + <td align="left" valign="top"> + Make sure that any built-in tracing from NSH is disabled. + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_NSH_ARCHINIT=y</code> + </td> + <td align="left" valign="top"> + Enable this option <i>only</i> if your board-specific logic has logic to automatically start the USB monitor. + Otherwise the USB monitor can be started or stopped with the <code>usbmon_start</code> and <code>usbmon_stop</code> commands from the NSH console. + </td> + </tr> + <tr> + <td colspan="2" align="left" valign="top" bgcolor="#e4e4e4"> + <i>Application Configuration -> System NSH Add-Ons</i> + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_SYSTEM_USBMONITOR=y</code> + </td> + <td align="left" valign="top"> + Enable the USB monitor daemon + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_SYSTEM_USBMONITOR_STACKSIZE=<i>nnnn</i></code> + </td> + <td align="left" valign="top"> + Sets the USB monitor daemon stack size to <i>nnnn</i>. + The default is 2KiB. + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_SYSTEM_USBMONITOR_PRIORITY=50</code> + </td> + <td align="left" valign="top"> + Sets the USB monitor daemon priority to <i>nnnn</i>. + This priority should be low so that it does not interfere with other operations, but not so low that you cannot dump the buffered USB data sufficiently rapidly. + The default is 50. + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_SYSTEM_USBMONITOR_INTERVAL=<i>nnnn</i></code> + </td> + <td align="left" valign="top"> + Dump the buffered USB data every <i>nnnn</i> seconds. + If you lose buffered USB trace data, then dropping this value will help by increasing the rate at which the USB trace buffer is emptied. + </td> + </tr> + <tr> + <td width="30%" align="left" valign="top"> + <code>CONFIG_SYSTEM_USBMONITOR_TRACEINIT=y</code><br> + <code>CONFIG_SYSTEM_USBMONITOR_TRACECLASS=y</code><br> + <code>CONFIG_SYSTEM_USBMONITOR_TRACETRANSFERS=y</code><br> + <code>CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y</code><br> + <code>CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y</code><br> + </td> + <td align="left" valign="top"> + Selects which USB event(s) that you want to be traced. + </td> + </tr> +</table> +</ul> +<p> + NOTE: If USB debug output is also enabled, both outputs will appear on the serial console. + However, the debug output will be asynchronous with the trace output and, hence, difficult to interpret. +</p> </body> </html> diff --git a/nuttx/arch/arm/src/sama5/Make.defs b/nuttx/arch/arm/src/sama5/Make.defs index fd657060b..181abe1ed 100644 --- a/nuttx/arch/arm/src/sama5/Make.defs +++ b/nuttx/arch/arm/src/sama5/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/sama5/Make.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -162,6 +162,7 @@ ifeq ($(CONFIG_SAMA5_UDPHS),y) CHIP_CSRCS += sam_udphs.c endif +ifeq ($(CONFIG_USBHOST),y) ifeq ($(CONFIG_USBHOST_TRACE),y) CHIP_CSRCS += sam_usbhost.c else @@ -169,6 +170,7 @@ ifeq ($(CONFIG_DEBUG_USB),y) CHIP_CSRCS += sam_usbhost.c endif endif +endif ifeq ($(CONFIG_SAMA5_HSMCI0),y) CHIP_CSRCS += sam_hsmci.c sam_hsmci_clkdiv.c |