Kconfig 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. menu "Utilities"
  2. config RT_USING_RYM
  3. bool "Enable Ymodem"
  4. default n
  5. config RT_USING_ULOG
  6. bool "Enable ulog"
  7. default n
  8. if RT_USING_ULOG
  9. if !ULOG_USING_SYSLOG
  10. choice
  11. prompt "The static output log level."
  12. default ULOG_OUTPUT_LVL_D
  13. help
  14. When the log level is less than this option and it will stop output.
  15. These log will not compile into ROM when using LOG_X api.
  16. NOTE: It's not available on syslog mode.
  17. config ULOG_OUTPUT_LVL_A
  18. bool "Assert"
  19. config ULOG_OUTPUT_LVL_E
  20. bool "Error"
  21. config ULOG_OUTPUT_LVL_W
  22. bool "Warning"
  23. config ULOG_OUTPUT_LVL_I
  24. bool "Information"
  25. config ULOG_OUTPUT_LVL_D
  26. bool "Debug"
  27. endchoice
  28. endif
  29. if ULOG_USING_SYSLOG
  30. choice
  31. prompt "The static output log level."
  32. default ULOG_OUTPUT_LVL_DEBUG
  33. help
  34. When the log level is less than this option and it will stop output.
  35. These log will not compile into ROM when using LOG_X api.
  36. NOTE: It's not available on syslog mode.
  37. config ULOG_OUTPUT_LVL_EMERG
  38. bool "EMERG"
  39. config ULOG_OUTPUT_LVL_ALERT
  40. bool "ALERT"
  41. config ULOG_OUTPUT_LVL_CRIT
  42. bool "CRIT"
  43. config ULOG_OUTPUT_LVL_ERROR
  44. bool "ERR"
  45. config ULOG_OUTPUT_LVL_WARNING
  46. bool "WARNING"
  47. config ULOG_OUTPUT_LVL_NOTICE
  48. bool "NOTICE"
  49. config ULOG_OUTPUT_LVL_INFO
  50. bool "INFO"
  51. config ULOG_OUTPUT_LVL_DEBUG
  52. bool "DEBUG"
  53. endchoice
  54. endif
  55. config ULOG_OUTPUT_LVL
  56. int
  57. default 0 if ULOG_OUTPUT_LVL_A
  58. default 0 if ULOG_OUTPUT_LVL_EMERG
  59. default 1 if ULOG_OUTPUT_LVL_ALERT
  60. default 2 if ULOG_OUTPUT_LVL_CRIT
  61. default 3 if ULOG_OUTPUT_LVL_E
  62. default 3 if ULOG_OUTPUT_LVL_ERROR
  63. default 4 if ULOG_OUTPUT_LVL_W
  64. default 4 if ULOG_OUTPUT_LVL_WARNING
  65. default 5 if ULOG_OUTPUT_LVL_NOTICE
  66. default 6 if ULOG_OUTPUT_LVL_I
  67. default 6 if ULOG_OUTPUT_LVL_INFO
  68. default 7 if ULOG_OUTPUT_LVL_D
  69. default 7 if ULOG_OUTPUT_LVL_DEBUG
  70. default 7
  71. config ULOG_USING_ISR_LOG
  72. bool "Enable ISR log."
  73. default n
  74. help
  75. The log output API can using in ISR (Interrupt Service Routines) also.
  76. config ULOG_ASSERT_ENABLE
  77. bool "Enable assert check."
  78. default y
  79. config ULOG_LINE_BUF_SIZE
  80. int "The log's max width."
  81. default 128
  82. help
  83. The buffer size for every line log.
  84. config ULOG_USING_ASYNC_OUTPUT
  85. bool "Enable async output mode."
  86. default n
  87. help
  88. When enable asynchronous output mode. The log output is not immediately and the log will stored to buffer.
  89. The another thread (Such as idle) will read the buffer and output the log. So it will using more RAM.
  90. if ULOG_USING_ASYNC_OUTPUT
  91. config ULOG_ASYNC_OUTPUT_BUF_SIZE
  92. int "The async output buffer size."
  93. default 2048
  94. config ULOG_ASYNC_OUTPUT_BY_THREAD
  95. bool "Enable async output by thread."
  96. default y
  97. help
  98. This thread will output the asynchronous logs. The logs can output by other user thread when this option is disable.
  99. if ULOG_ASYNC_OUTPUT_BY_THREAD
  100. config ULOG_ASYNC_OUTPUT_THREAD_STACK
  101. int "The async output thread stack size."
  102. default 1024
  103. config ULOG_ASYNC_OUTPUT_THREAD_PRIORITY
  104. int "The async output thread stack priority."
  105. range 0 RT_THREAD_PRIORITY_MAX
  106. default 30
  107. endif
  108. endif
  109. menu "log format"
  110. config ULOG_OUTPUT_FLOAT
  111. bool "Enable float number support. It will using more thread stack."
  112. select RT_USING_LIBC
  113. default n
  114. help
  115. The default formater is using rt_vsnprint and it not supported float number.
  116. When enable this option then it will enable libc. The formater will change to vsnprint on libc.
  117. if !ULOG_USING_SYSLOG
  118. config ULOG_USING_COLOR
  119. bool "Enable color log."
  120. default y
  121. help
  122. The log will has different color by level.
  123. endif
  124. config ULOG_OUTPUT_TIME
  125. bool "Enable time information."
  126. default y
  127. config ULOG_TIME_USING_TIMESTAMP
  128. bool "Enable timestamp format for time."
  129. default n
  130. select RT_USING_LIBC
  131. depends on ULOG_OUTPUT_TIME
  132. config ULOG_OUTPUT_LEVEL
  133. bool "Enable level information."
  134. default y
  135. config ULOG_OUTPUT_TAG
  136. bool "Enable tag information."
  137. default y
  138. config ULOG_OUTPUT_THREAD_NAME
  139. bool "Enable thread information."
  140. default n
  141. endmenu
  142. config ULOG_BACKEND_USING_CONSOLE
  143. bool "Enable console backend."
  144. default y
  145. help
  146. The low level output using rt_kprintf().
  147. config ULOG_USING_FILTER
  148. bool "Enable runtime log filter."
  149. default n
  150. help
  151. It will enable the log filter.
  152. Such as level filter, log tag filter, log kw filter and tag's level filter.
  153. config ULOG_USING_SYSLOG
  154. bool "Enable syslog format log and API."
  155. select ULOG_OUTPUT_TIME
  156. select ULOG_USING_FILTER
  157. default n
  158. endif
  159. config RT_USING_UTEST
  160. bool "Enable utest (RT-Thread test framework)"
  161. default n
  162. if RT_USING_UTEST
  163. config UTEST_THR_STACK_SIZE
  164. int "The utest thread stack size"
  165. default 4096
  166. config UTEST_THR_PRIORITY
  167. int "The utest thread priority"
  168. default 20
  169. endif
  170. endmenu