Kconfig 7.6 KB

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