drivers/segger: make RTT_MODE configurable
CHAMPION-2373 To allow use NO_BLOCK mode, so the system keeps running when debugger disconnected. Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
parent
19ea8e74ae
commit
d1be53e748
|
@ -62,6 +62,21 @@ config SEGGER_RTT_BUFFER_SIZE_DOWN
|
||||||
---help---
|
---help---
|
||||||
Size of the buffer for terminal input to target from host (Usually keyboard input)
|
Size of the buffer for terminal input to target from host (Usually keyboard input)
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "SEGGER_RTT_MODE"
|
||||||
|
default SEGGER_RTT_MODE_NO_BLOCK_SKIP
|
||||||
|
|
||||||
|
config SEGGER_RTT_MODE_NO_BLOCK_SKIP
|
||||||
|
bool "Skip. Do not block, output nothing. (Default)"
|
||||||
|
|
||||||
|
config SEGGER_RTT_MODE_NO_BLOCK_TRIM
|
||||||
|
bool "Trim: Do not block, output as much as fits."
|
||||||
|
|
||||||
|
config SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
||||||
|
bool "Block: Wait until there is space in the buffer."
|
||||||
|
|
||||||
|
endchoice # SEGGER_RTT_MODE
|
||||||
|
|
||||||
if SEGGER_SYSVIEW
|
if SEGGER_SYSVIEW
|
||||||
|
|
||||||
config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
|
config SEGGER_SYSVIEW_RTT_BUFFER_SIZE
|
||||||
|
|
|
@ -63,7 +63,13 @@
|
||||||
|
|
||||||
/* Mode for pre-initialized terminal channel */
|
/* Mode for pre-initialized terminal channel */
|
||||||
|
|
||||||
#define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
#if defined(CONFIG_SEGGER_RTT_MODE_NO_BLOCK_TRIM)
|
||||||
|
# define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_TRIM
|
||||||
|
#elif defined(SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL)
|
||||||
|
# define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL
|
||||||
|
#else
|
||||||
|
# define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop */
|
/* 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue