Kconfig 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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_DEBUG
  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_ASSERT
  49. bool "Assert"
  50. config ULOG_OUTPUT_LVL_ERROR
  51. bool "Error"
  52. config ULOG_OUTPUT_LVL_WARNING
  53. bool "Warning"
  54. config ULOG_OUTPUT_LVL_INFO
  55. bool "Information"
  56. config ULOG_OUTPUT_LVL_DEBUG
  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_ASSERT
  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_ERROR
  93. default 4 if ULOG_OUTPUT_LVL_WARNING
  94. default 5 if ULOG_OUTPUT_LVL_NOTICE
  95. default 6 if ULOG_OUTPUT_LVL_INFO
  96. default 7 if ULOG_OUTPUT_LVL_DEBUG
  97. default 7
  98. config ULOG_USING_ISR_LOG
  99. bool "Enable ISR log."
  100. default n
  101. help
  102. The log output API can using in ISR (Interrupt Service Routines) also.
  103. config ULOG_ASSERT_ENABLE
  104. bool "Enable assert check."
  105. default y
  106. config ULOG_LINE_BUF_SIZE
  107. int "The log's max width."
  108. default 128
  109. help
  110. The buffer size for every line log.
  111. config ULOG_USING_ASYNC_OUTPUT
  112. bool "Enable async output mode."
  113. default n
  114. help
  115. When enable asynchronous output mode. The log output is not immediately and the log will stored to buffer.
  116. The another thread (Such as idle) will read the buffer and output the log. So it will using more RAM.
  117. if ULOG_USING_ASYNC_OUTPUT
  118. config ULOG_ASYNC_OUTPUT_BUF_SIZE
  119. int "The async output buffer size."
  120. default 2048
  121. config ULOG_ASYNC_OUTPUT_BY_THREAD
  122. bool "Enable async output by thread."
  123. default y
  124. help
  125. This thread will output the asynchronous logs. The logs can output by other user thread when this option is disable.
  126. if ULOG_ASYNC_OUTPUT_BY_THREAD
  127. config ULOG_ASYNC_OUTPUT_THREAD_STACK
  128. int "The async output thread stack size."
  129. default 1024
  130. config ULOG_ASYNC_OUTPUT_THREAD_PRIORITY
  131. int "The async output thread stack priority."
  132. range 0 RT_THREAD_PRIORITY_MAX
  133. default 30
  134. endif
  135. endif
  136. menu "log format"
  137. config ULOG_OUTPUT_FLOAT
  138. bool "Enable float number support. It will using more thread stack."
  139. select RT_USING_LIBC
  140. default n
  141. help
  142. The default formater is using rt_vsnprint and it not supported float number.
  143. When enable this option then it will enable libc. The formater will change to vsnprint on libc.
  144. if !ULOG_USING_SYSLOG
  145. config ULOG_USING_COLOR
  146. bool "Enable color log."
  147. default y
  148. help
  149. The log will has different color by level.
  150. endif
  151. config ULOG_OUTPUT_TIME
  152. bool "Enable time information."
  153. default y
  154. config ULOG_TIME_USING_TIMESTAMP
  155. bool "Enable timestamp format for time."
  156. default n
  157. select RT_USING_LIBC
  158. depends on ULOG_OUTPUT_TIME
  159. config ULOG_OUTPUT_LEVEL
  160. bool "Enable level information."
  161. default y
  162. config ULOG_OUTPUT_TAG
  163. bool "Enable tag information."
  164. default y
  165. config ULOG_OUTPUT_THREAD_NAME
  166. bool "Enable thread information."
  167. default n
  168. endmenu
  169. config ULOG_BACKEND_USING_CONSOLE
  170. bool "Enable console backend."
  171. default y
  172. help
  173. The low level output using rt_kprintf().
  174. config ULOG_USING_FILTER
  175. bool "Enable runtime log filter."
  176. default n
  177. help
  178. It will enable the log filter.
  179. Such as level filter, log tag filter, log kw filter and tag's level filter.
  180. config ULOG_USING_SYSLOG
  181. bool "Enable syslog format log and API."
  182. select ULOG_OUTPUT_TIME
  183. select ULOG_USING_FILTER
  184. default n
  185. config ULOG_SW_VERSION_NUM
  186. int
  187. default 0x00100
  188. help
  189. sfotware module version number
  190. endif
  191. endmenu