You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/09/05 20:34:25 UTC

[GitHub] [incubator-nuttx] btashton commented on a change in pull request #1722: fix bugs in quickstart docs

btashton commented on a change in pull request #1722:
URL: https://github.com/apache/incubator-nuttx/pull/1722#discussion_r483985727



##########
File path: Documentation/quickstart/debugging.rst
##########
@@ -6,35 +6,40 @@ Debugging
 
 Finding and fixing bugs is an important part of the hardware and software development process. Sometimes you also need
 to use debugging techniques to understand how the system works. Two tools that are helpful are debug logging and
-debugging using the Gnu Debugger (gdb).
+debugging using the GNU Debugger (gdb).
 
 Debug Logging
 -------------
 
 NuttX has a powerful logging facility with ``info``, ``warn``, and ``error`` levels. You can enable debugging for your
-build for the ``net`` feature (TCP/IP stack) by putting the following lines in your ``.config`` file:
-
-    ::
-
-       CONFIG_DEBUG_ALERT=y
-       CONFIG_DEBUG_FEATURES=y
-       CONFIG_DEBUG_ERROR=y
-       CONFIG_DEBUG_WARN=y
-       CONFIG_DEBUG_INFO=y
-       CONFIG_DEBUG_ASSERTIONS=y
-       CONFIG_DEBUG_NET=y
-       CONFIG_DEBUG_NET_ERROR=y
-       CONFIG_DEBUG_NET_WARN=y
-       CONFIG_DEBUG_NET_INFO=y
-       CONFIG_DEBUG_SYMBOLS=y
-       CONFIG_DEBUG_NOOPT=y
-       CONFIG_SYSLOG_TIMESTAMP=y
-
-Note that turning all these to ``y`` will produce an incredible amount of logging output. Set the level you want and
-the area you're interested in to ``y``, and the rest to ``n``, and then recompile. You can see the full list of
+build for the ``net`` feature (TCP/IP stack) by running this simple script:
+
+.. code-block:: console
+
+   #!/bin/bash
+
+   kconfig-tweak --enable CONFIG_DEBUG_ALERT
+   kconfig-tweak --enable CONFIG_DEBUG_FEATURES
+   kconfig-tweak --enable CONFIG_DEBUG_ERROR
+   kconfig-tweak --enable CONFIG_DEBUG_WARN
+   kconfig-tweak --enable CONFIG_DEBUG_INFO
+   kconfig-tweak --enable CONFIG_DEBUG_ASSERTIONS
+   kconfig-tweak --enable CONFIG_DEBUG_NET
+   kconfig-tweak --enable CONFIG_DEBUG_NET_ERROR
+   kconfig-tweak --enable CONFIG_DEBUG_NET_WARN
+   kconfig-tweak --enable CONFIG_DEBUG_NET_INFO
+   kconfig-tweak --enable CONFIG_DEBUG_SYMBOLS
+   kconfig-tweak --enable CONFIG_DEBUG_NOOPT
+
+Note that enabling all these will produce an incredible amount of logging output. Enable the level you want and
+the area you're interested in, and leave the rest disabled, and then recompile. You can see the full list of
 debug feature areas in the file `debug.h <https://github.com/apache/incubator-nuttx/blob/master/include/debug.h>`__.
 
-Timestamps can be enabled by setting ``CONFIG_SYSLOG_TIMESTAMP=y``.
+Timestamps can be enabled by enabling ``CONFIG_SYSLOG_TIMESTAMP``:
+
+.. code-block:: console
+
+   $ kconfig-tweak --enable CONFIG_SYSLOG_TIMESTAMP
 
 You may need to do a little bit of experimenting to find the combination of logging settings that work for the problem
 you're trying to solve. See the file `debug.h <https://github.com/starcat-io/incubator-nuttx/blob/master/include/debug.h>`_

Review comment:
       Did we intend to link to your fork?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org