diff --git a/sys/include/stdio_rtt.h b/sys/include/stdio_rtt.h index 1cb1884e5d..ae86e4d52d 100644 --- a/sys/include/stdio_rtt.h +++ b/sys/include/stdio_rtt.h @@ -8,17 +8,7 @@ */ /** - * @defgroup sys_stdio_rtt STDIO over SEGGER RTT - * @ingroup sys_stdio - * - * @brief STDIO mapping for running the STDIO over SEGGER's RTT interface - * - * To enable stdio over SEGGER's RTT, enable the module `stdio_rtt`: - * - * USEMODULE += stdio_rtt - * - * @note Currently, `stdio_rtt` is only supported when OpenOCD or J-Link is - * used as programmer. + * @ingroup sys_stdio_rtt * * @{ * @file diff --git a/sys/stdio_rtt/README.md b/sys/stdio_rtt/README.md deleted file mode 100644 index 9d71acaee0..0000000000 --- a/sys/stdio_rtt/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# RTT STDIO - -This module will allow communication using SEGGER's Real Time Terminal protocol. -Briefly, it replaces UART stdio with a set of ringbuffers that are manipulated -over JTAG. There are several advantages to this system. The biggest is that -writing to stdout is extremely fast (as you are just copying to memory). This -is useful if you are adding print statements in timing-sensitive code as part -of debugging. The other advantage is that it frees your UART for other use -and enables stdio on platforms that do not have a UART. - -To use this module, add - -``` -USEMODULE += stdio_rtt -``` - -to your makefile. By default the module will drop bytes written to stdout if the -buffer is full. If you know for certain that the debugger is attached, you -can obtain lossless stdout by adding - -``` -CFLAGS += -DSTDIO_RTT_ENABLE_BLOCKING_STDOUT -``` - -to your makefile. Note well that if you do NOT plug in the debugger and run -the SEGGER RTT software (or compatible software) this will then lock up the -system as it waits forever. Typically you would only define this during -development on the lab bench. - -If you are printing significant data out (pages a second), you can increase -your stdout bandwidth by lowering the poll interval. The default is 50ms. -A choice of 5ms is good during printf-heavy debugging: - -``` -CFLAGS += -DSTDIO_POLL_INTERVAL_MS=5U -``` - -SEGGER RTT supports stdin as well, and this is enabled by default. It requires -polling the stdin ringbuffer, however, which on low duty cycle systems -can increase the number of unnecessary wakeups from sleep. To disable stdin, -add this to your makefile: - -``` -CFLAGS += -DSTDIO_RTT_DISABLE_STDIN -``` diff --git a/sys/stdio_rtt/doc.txt b/sys/stdio_rtt/doc.txt new file mode 100644 index 0000000000..d8a9b18ebe --- /dev/null +++ b/sys/stdio_rtt/doc.txt @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2016 Michael Andersen + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @defgroup sys_stdio_rtt STDIO over SEGGER RTT + * @ingroup sys_stdio + * + * @brief STDIO mapping for running the STDIO over SEGGER's RTT interface + * + * + * ## RTT STDIO + * + * This module will allow communication using SEGGER's Real Time Terminal protocol. + * Briefly, it replaces UART stdio with a set of ringbuffers that are manipulated + * over JTAG. There are several advantages to this system. The biggest is that + * writing to stdout is extremely fast (as you are just copying to memory). This + * is useful if you are adding print statements in timing-sensitive code as part + * of debugging. The other advantage is that it frees your UART for other use + * and enables stdio on platforms that do not have a UART. + * + * To use this module, add + * + * ``` + * USEMODULE += stdio_rtt + * ``` + * + * to your makefile. By default the module will drop bytes written to stdout if the + * buffer is full. If you know for certain that the debugger is attached, you + * can obtain lossless stdout by adding + * + * ``` + * CFLAGS += -DSTDIO_RTT_ENABLE_BLOCKING_STDOUT + * ``` + * + * to your makefile. Note well that if you do NOT plug in the debugger and run + * the SEGGER RTT software (or compatible software) this will then lock up the + * system as it waits forever. Typically you would only define this during + * development on the lab bench. + * + * If you are printing significant data out (pages a second), you can increase + * your stdout bandwidth by lowering the poll interval. The default is 50ms. + * A choice of 5ms is good during printf-heavy debugging: + * + * ``` + * CFLAGS += -DSTDIO_POLL_INTERVAL_MS=5U + * ``` + * + * SEGGER RTT supports stdin as well, and this is enabled by default. It requires + * polling the stdin ringbuffer, however, which on low duty cycle systems + * can increase the number of unnecessary wakeups from sleep. To disable stdin, + * add this to your makefile: + * + * ``` + * CFLAGS += -DSTDIO_RTT_DISABLE_STDIN + * ``` + * + * @note Currently, `stdio_rtt` is only supported when OpenOCD or J-Link is + * used as programmer. + * + */