Kconfig 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  1. menu "RT-Thread Kernel"
  2. config RT_NAME_MAX
  3. int "The maximal size of kernel object name"
  4. range 2 32
  5. default 8
  6. help
  7. Each kernel object, such as thread, timer, semaphore etc, has a name,
  8. the RT_NAME_MAX is the maximal size of this object name.
  9. config RT_USING_ARCH_DATA_TYPE
  10. bool "Use the data types defined in ARCH_CPU"
  11. default n
  12. help
  13. For the data type like, `rt_uint8/int8_t, rt_uint16/int16_t, rt_uint32/int32_t`,
  14. BSP can define these basic data types in ARCH_CPU level.
  15. Please re-define these data types in rtconfig_project.h file.
  16. config RT_USING_SMP
  17. bool "Enable SMP(Symmetric multiprocessing)"
  18. default n
  19. help
  20. This option should be selected by machines which have an SMP-
  21. capable CPU.
  22. The only effect of this option is to make the SMP-related
  23. options available to the user for configuration.
  24. config RT_CPUS_NR
  25. int "Number of CPUs"
  26. default 2
  27. depends on RT_USING_SMP
  28. help
  29. Number of CPUs in the system
  30. config RT_ALIGN_SIZE
  31. int "Alignment size for CPU architecture data access"
  32. default 4
  33. help
  34. Alignment size for CPU architecture data access
  35. choice
  36. prompt "The maximal level value of priority of thread"
  37. default RT_THREAD_PRIORITY_32
  38. config RT_THREAD_PRIORITY_8
  39. bool "8"
  40. config RT_THREAD_PRIORITY_32
  41. bool "32"
  42. config RT_THREAD_PRIORITY_256
  43. bool "256"
  44. endchoice
  45. config RT_THREAD_PRIORITY_MAX
  46. int
  47. default 8 if RT_THREAD_PRIORITY_8
  48. default 32 if RT_THREAD_PRIORITY_32
  49. default 256 if RT_THREAD_PRIORITY_256
  50. config RT_TICK_PER_SECOND
  51. int "Tick frequency, Hz"
  52. range 10 1000
  53. default 100
  54. help
  55. System's tick frequency, Hz.
  56. config RT_USING_OVERFLOW_CHECK
  57. bool "Using stack overflow checking"
  58. default y
  59. help
  60. Enable thread stack overflow checking. The stack overflow is checking when
  61. each thread switch.
  62. config RT_USING_HOOK
  63. bool "Enable system hook"
  64. default y
  65. select RT_USING_IDLE_HOOK
  66. help
  67. Enable the hook function when system running, such as idle thread hook,
  68. thread context switch etc.
  69. config RT_USING_IDLE_HOOK
  70. bool "Enable IDLE Task hook"
  71. default y if RT_USING_HOOK
  72. if RT_USING_IDLE_HOOK
  73. config RT_IDLE_HOOK_LIST_SIZE
  74. int "The max size of idle hook list"
  75. default 4
  76. range 1 16
  77. help
  78. The system has a hook list. This is the hook list size.
  79. endif
  80. config IDLE_THREAD_STACK_SIZE
  81. int "The stack size of idle thread"
  82. default 256
  83. config SYSTEM_THREAD_STACK_SIZE
  84. int "The stack size of system thread (for defunct etc.)"
  85. depends on RT_USING_SMP
  86. default IDLE_THREAD_STACK_SIZE
  87. config RT_USING_TIMER_SOFT
  88. bool "Enable software timer with a timer thread"
  89. default y
  90. help
  91. the timeout function context of soft-timer is under a high priority timer
  92. thread.
  93. if RT_USING_TIMER_SOFT
  94. config RT_TIMER_THREAD_PRIO
  95. int "The priority level value of timer thread"
  96. default 4
  97. config RT_TIMER_THREAD_STACK_SIZE
  98. int "The stack size of timer thread"
  99. default 512
  100. endif
  101. menu "kservice optimization"
  102. config RT_KSERVICE_USING_STDLIB
  103. bool "Enable kservice to use standard C library"
  104. default n
  105. config RT_KSERVICE_USING_TINY_SIZE
  106. bool "Enable kservice to use tiny size"
  107. default n
  108. config RT_USING_ASM_MEMCPY
  109. bool
  110. default n
  111. endmenu
  112. menuconfig RT_DEBUG
  113. bool "Enable debugging features"
  114. default y
  115. if RT_DEBUG
  116. config RT_DEBUG_COLOR
  117. bool "Enable color debugging log"
  118. default n
  119. config RT_DEBUG_INIT_CONFIG
  120. bool "Enable debugging of components initialization"
  121. default n
  122. config RT_DEBUG_INIT
  123. int
  124. default 1 if RT_DEBUG_INIT_CONFIG
  125. config RT_DEBUG_THREAD_CONFIG
  126. bool "Enable debugging of Thread State Changes"
  127. default n
  128. config RT_DEBUG_THREAD
  129. int
  130. default 1 if RT_DEBUG_THREAD_CONFIG
  131. config RT_DEBUG_SCHEDULER_CONFIG
  132. bool "Enable debugging of Scheduler"
  133. default n
  134. config RT_DEBUG_SCHEDULER
  135. int
  136. default 1 if RT_DEBUG_SCHEDULER_CONFIG
  137. config RT_DEBUG_IPC_CONFIG
  138. bool "Enable debugging of IPC"
  139. default n
  140. config RT_DEBUG_IPC
  141. int
  142. default 1 if RT_DEBUG_IPC_CONFIG
  143. config RT_DEBUG_TIMER_CONFIG
  144. bool "Enable debugging of Timer"
  145. default n
  146. config RT_DEBUG_TIMER
  147. int
  148. default 1 if RT_DEBUG_TIMER_CONFIG
  149. config RT_DEBUG_IRQ_CONFIG
  150. bool "Enable debugging of IRQ(Interrupt Request)"
  151. default n
  152. config RT_DEBUG_IRQ
  153. int
  154. default 1 if RT_DEBUG_IRQ_CONFIG
  155. config RT_DEBUG_MEM_CONFIG
  156. bool "Enable debugging of Small Memory Algorithm"
  157. default n
  158. config RT_DEBUG_MEM
  159. int
  160. default 1 if RT_DEBUG_MEM_CONFIG
  161. config RT_DEBUG_SLAB_CONFIG
  162. bool "Enable debugging of SLAB Memory Algorithm"
  163. default n
  164. config RT_DEBUG_SLAB
  165. int
  166. default 1 if RT_DEBUG_SLAB_CONFIG
  167. config RT_DEBUG_MEMHEAP_CONFIG
  168. bool "Enable debugging of Memory Heap Algorithm"
  169. default n
  170. config RT_DEBUG_MEMHEAP
  171. int
  172. default 1 if RT_DEBUG_MEMHEAP_CONFIG
  173. config RT_DEBUG_MODULE_CONFIG
  174. bool "Enable debugging of Application Module"
  175. default n
  176. config RT_DEBUG_MODULE
  177. int
  178. default 1 if RT_DEBUG_MODULE_CONFIG
  179. endif
  180. menu "Inter-Thread communication"
  181. config RT_USING_SEMAPHORE
  182. bool "Enable semaphore"
  183. default y
  184. config RT_USING_MUTEX
  185. bool "Enable mutex"
  186. default y
  187. config RT_USING_EVENT
  188. bool "Enable event flag"
  189. default y
  190. config RT_USING_MAILBOX
  191. bool "Enable mailbox"
  192. default y
  193. config RT_USING_MESSAGEQUEUE
  194. bool "Enable message queue"
  195. default y
  196. config RT_USING_SIGNALS
  197. bool "Enable signals"
  198. select RT_USING_MEMPOOL
  199. default n
  200. help
  201. A signal is an asynchronous notification sent to a specific thread
  202. in order to notify it of an event that occurred.
  203. endmenu
  204. menu "Memory Management"
  205. config RT_USING_MEMPOOL
  206. bool "Using memory pool"
  207. default y
  208. help
  209. Using static memory fixed partition
  210. config RT_USING_MEMHEAP
  211. bool "Using memory heap object"
  212. default n
  213. help
  214. Using memory heap object to manage dynamic memory heap.
  215. choice
  216. prompt "Dynamic Memory Management"
  217. default RT_USING_SMALL_MEM
  218. config RT_USING_NOHEAP
  219. bool "Disable Heap"
  220. config RT_USING_SMALL_MEM
  221. bool "Small Memory Algorithm"
  222. config RT_USING_SLAB
  223. bool "SLAB Algorithm for large memory"
  224. if RT_USING_MEMHEAP
  225. config RT_USING_MEMHEAP_AS_HEAP
  226. bool "Use all of memheap objects as heap"
  227. endif
  228. config RT_USING_USERHEAP
  229. bool "Use user heap"
  230. help
  231. If this option is selected, please implement these functions:
  232. rt_malloc(), rt_malloc_sethook()
  233. rt_free(), rt_free_sethook()
  234. rt_calloc(), rt_realloc()
  235. rt_system_heap_init()
  236. And if FinSH is used at the same time, please implement list_mem()
  237. endchoice
  238. config RT_USING_MEMTRACE
  239. bool "Enable memory trace"
  240. default n
  241. help
  242. When enable RT_USING_MEMTRACE with shell, developer can call cmd:
  243. 1. memtrace
  244. to dump memory block information.
  245. 2. memcheck
  246. to check memory block to avoid memory overwritten.
  247. And developer also can call memcheck() in each of scheduling
  248. to check memory block to find which thread has wrongly modified
  249. memory.
  250. config RT_USING_HEAP
  251. bool
  252. default n if RT_USING_NOHEAP
  253. default y if RT_USING_SMALL_MEM
  254. default y if RT_USING_SLAB
  255. default y if RT_USING_MEMHEAP_AS_HEAP
  256. default y if RT_USING_USERHEAP
  257. endmenu
  258. menu "Kernel Device Object"
  259. config RT_USING_DEVICE
  260. bool "Using device object"
  261. default y
  262. config RT_USING_DEVICE_OPS
  263. bool "Using ops for each device object"
  264. default n
  265. config RT_USING_INTERRUPT_INFO
  266. bool "Enable additional interrupt trace information"
  267. default n
  268. help
  269. Add name and counter information for interrupt trace.
  270. config RT_USING_CONSOLE
  271. bool "Using console for rt_kprintf"
  272. default y
  273. if RT_USING_CONSOLE
  274. config RT_CONSOLEBUF_SIZE
  275. int "the buffer size for console log printf"
  276. default 128
  277. config RT_CONSOLE_DEVICE_NAME
  278. string "the device name for console"
  279. default "uart"
  280. config RT_PRINTF_LONGLONG
  281. bool "rt_kprintf support long long"
  282. default n
  283. endif
  284. endmenu
  285. config RT_VER_NUM
  286. hex
  287. default 0x40004
  288. help
  289. RT-Thread version number
  290. endmenu