Kconfig 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  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. if RT_USING_HOOK
  70. config RT_HOOK_USING_FUNC_PTR
  71. bool "Using function pointers as system hook"
  72. default y
  73. endif
  74. config RT_USING_IDLE_HOOK
  75. bool "Enable IDLE Task hook"
  76. default y if RT_USING_HOOK
  77. if RT_USING_IDLE_HOOK
  78. config RT_IDLE_HOOK_LIST_SIZE
  79. int "The max size of idle hook list"
  80. default 4
  81. range 1 16
  82. help
  83. The system has a hook list. This is the hook list size.
  84. endif
  85. config IDLE_THREAD_STACK_SIZE
  86. int "The stack size of idle thread"
  87. default 256
  88. config SYSTEM_THREAD_STACK_SIZE
  89. int "The stack size of system thread (for defunct etc.)"
  90. depends on RT_USING_SMP
  91. default IDLE_THREAD_STACK_SIZE
  92. config RT_USING_TIMER_SOFT
  93. bool "Enable software timer with a timer thread"
  94. default y
  95. help
  96. the timeout function context of soft-timer is under a high priority timer
  97. thread.
  98. if RT_USING_TIMER_SOFT
  99. config RT_TIMER_THREAD_PRIO
  100. int "The priority level value of timer thread"
  101. default 4
  102. config RT_TIMER_THREAD_STACK_SIZE
  103. int "The stack size of timer thread"
  104. default 512
  105. endif
  106. menu "kservice optimization"
  107. config RT_KSERVICE_USING_STDLIB
  108. bool "Enable kservice to use standard C library"
  109. default n
  110. if RT_KSERVICE_USING_STDLIB
  111. config RT_KSERVICE_USING_STDLIB_MEMCPY
  112. bool "Use memcpy to replace rt_memcpy (faster, but not safe)"
  113. default n
  114. config RT_KSERVICE_USING_STDLIB_MEMSET
  115. bool "Use memset to replace rt_memset (faster, but not safe)"
  116. default n
  117. endif
  118. config RT_KSERVICE_USING_TINY_SIZE
  119. bool "Enable kservice to use tiny size"
  120. default n
  121. config RT_USING_TINY_FFS
  122. bool "Enable kservice to use tiny finding first bit set method"
  123. default n
  124. config RT_PRINTF_LONGLONG
  125. bool "Enable rt_printf-family functions to support long long format"
  126. default n
  127. endmenu
  128. menuconfig RT_DEBUG
  129. bool "Enable debugging features"
  130. default y
  131. if RT_DEBUG
  132. config RT_DEBUG_COLOR
  133. bool "Enable color debugging log"
  134. default n
  135. config RT_DEBUG_INIT_CONFIG
  136. bool "Enable debugging of components initialization"
  137. default n
  138. config RT_DEBUG_INIT
  139. int
  140. default 1 if RT_DEBUG_INIT_CONFIG
  141. config RT_DEBUG_THREAD_CONFIG
  142. bool "Enable debugging of Thread State Changes"
  143. default n
  144. config RT_DEBUG_THREAD
  145. int
  146. default 1 if RT_DEBUG_THREAD_CONFIG
  147. config RT_DEBUG_SCHEDULER_CONFIG
  148. bool "Enable debugging of Scheduler"
  149. default n
  150. config RT_DEBUG_SCHEDULER
  151. int
  152. default 1 if RT_DEBUG_SCHEDULER_CONFIG
  153. config RT_DEBUG_IPC_CONFIG
  154. bool "Enable debugging of IPC"
  155. default n
  156. config RT_DEBUG_IPC
  157. int
  158. default 1 if RT_DEBUG_IPC_CONFIG
  159. config RT_DEBUG_TIMER_CONFIG
  160. bool "Enable debugging of Timer"
  161. default n
  162. config RT_DEBUG_TIMER
  163. int
  164. default 1 if RT_DEBUG_TIMER_CONFIG
  165. config RT_DEBUG_IRQ_CONFIG
  166. bool "Enable debugging of IRQ(Interrupt Request)"
  167. default n
  168. config RT_DEBUG_IRQ
  169. int
  170. default 1 if RT_DEBUG_IRQ_CONFIG
  171. config RT_DEBUG_MEM_CONFIG
  172. bool "Enable debugging of Small Memory Algorithm"
  173. default n
  174. config RT_DEBUG_MEM
  175. int
  176. default 1 if RT_DEBUG_MEM_CONFIG
  177. config RT_DEBUG_SLAB_CONFIG
  178. bool "Enable debugging of SLAB Memory Algorithm"
  179. default n
  180. config RT_DEBUG_SLAB
  181. int
  182. default 1 if RT_DEBUG_SLAB_CONFIG
  183. config RT_DEBUG_MEMHEAP_CONFIG
  184. bool "Enable debugging of Memory Heap Algorithm"
  185. default n
  186. config RT_DEBUG_MEMHEAP
  187. int
  188. default 1 if RT_DEBUG_MEMHEAP_CONFIG
  189. config RT_DEBUG_MODULE_CONFIG
  190. bool "Enable debugging of Application Module"
  191. default n
  192. config RT_DEBUG_MODULE
  193. int
  194. default 1 if RT_DEBUG_MODULE_CONFIG
  195. endif
  196. menu "Inter-Thread communication"
  197. config RT_USING_SEMAPHORE
  198. bool "Enable semaphore"
  199. default y
  200. config RT_USING_MUTEX
  201. bool "Enable mutex"
  202. default y
  203. config RT_USING_EVENT
  204. bool "Enable event flag"
  205. default y
  206. config RT_USING_MAILBOX
  207. bool "Enable mailbox"
  208. default y
  209. config RT_USING_MESSAGEQUEUE
  210. bool "Enable message queue"
  211. default y
  212. config RT_USING_SIGNALS
  213. bool "Enable signals"
  214. select RT_USING_MEMPOOL
  215. default n
  216. help
  217. A signal is an asynchronous notification sent to a specific thread
  218. in order to notify it of an event that occurred.
  219. endmenu
  220. menu "Memory Management"
  221. config RT_USING_MEMPOOL
  222. bool "Using memory pool"
  223. default y
  224. help
  225. Using static memory fixed partition
  226. config RT_USING_SMALL_MEM
  227. bool "Using Small Memory Algorithm"
  228. default n
  229. help
  230. Using Small Memory Algorithm
  231. config RT_USING_SLAB
  232. bool "Using SLAB Memory Algorithm"
  233. default n
  234. help
  235. The slab allocator of RT-Thread is a memory allocation algorithm
  236. optimizedfor embedded systems based on the slab allocator
  237. implemented by Matthew Dillon, founder of dragonfly BSD.
  238. The original slab algorithm is an efficient kernel memory
  239. allocation algorithm introduced by Jeff bonwick for
  240. Solaris Operating System.
  241. menuconfig RT_USING_MEMHEAP
  242. bool "Using memheap Memory Algorithm"
  243. default n
  244. if RT_USING_MEMHEAP
  245. choice
  246. prompt "Memheap memory allocation mode"
  247. default RT_MEMHEAP_FAST_MODE
  248. config RT_MEMHEAP_FAST_MODE
  249. bool "fast mode"
  250. help
  251. Speed priority mode.
  252. As long as the memory block size meets the requirements, the search ends immediately.
  253. config RT_MEMHEAP_BSET_MODE
  254. bool "best mode"
  255. help
  256. Best size first.
  257. The search does not end until the memory block of the most appropriate size is found
  258. endchoice
  259. endif
  260. choice
  261. prompt "System Heap Memory Management"
  262. default RT_USING_SMALL_MEM_AS_HEAP
  263. config RT_USING_SMALL_MEM_AS_HEAP
  264. bool "Small Memory Algorithm"
  265. select RT_USING_SMALL_MEM
  266. config RT_USING_MEMHEAP_AS_HEAP
  267. bool "Use memheap objects as heap"
  268. select RT_USING_MEMHEAP
  269. if RT_USING_MEMHEAP_AS_HEAP
  270. config RT_USING_MEMHEAP_AUTO_BINDING
  271. bool "Use all of memheap objects as heap"
  272. default y
  273. endif
  274. config RT_USING_SLAB_AS_HEAP
  275. bool "SLAB Algorithm for large memory"
  276. select RT_USING_SLAB
  277. config RT_USING_USERHEAP
  278. bool "Use user heap"
  279. help
  280. If this option is selected, please implement these functions:
  281. rt_malloc(), rt_malloc_sethook()
  282. rt_free(), rt_free_sethook()
  283. rt_calloc(), rt_realloc()
  284. rt_memory_info()
  285. rt_system_heap_init()
  286. config RT_USING_NOHEAP
  287. bool "Disable Heap"
  288. endchoice
  289. config RT_USING_MEMTRACE
  290. bool "Enable memory trace"
  291. default n
  292. help
  293. When enable RT_USING_MEMTRACE with shell, developer can call cmd:
  294. 1. memtrace
  295. to dump memory block information.
  296. 2. memcheck
  297. to check memory block to avoid memory overwritten.
  298. And developer also can call memcheck() in each of scheduling
  299. to check memory block to find which thread has wrongly modified
  300. memory.
  301. config RT_USING_HEAP_ISR
  302. bool "Using heap in ISR"
  303. default n
  304. help
  305. When this option is enabled, the critical zone will be protected with disable interrupt.
  306. config RT_USING_HEAP
  307. bool
  308. default n if RT_USING_NOHEAP
  309. default y if RT_USING_SMALL_MEM
  310. default y if RT_USING_SLAB
  311. default y if RT_USING_MEMHEAP_AS_HEAP
  312. default y if RT_USING_USERHEAP
  313. endmenu
  314. menu "Kernel Device Object"
  315. config RT_USING_DEVICE
  316. bool "Using device object"
  317. default y
  318. config RT_USING_DEVICE_OPS
  319. bool "Using ops for each device object"
  320. default n
  321. config RT_USING_INTERRUPT_INFO
  322. bool "Enable additional interrupt trace information"
  323. default n
  324. help
  325. Add name and counter information for interrupt trace.
  326. config RT_USING_CONSOLE
  327. bool "Using console for rt_kprintf"
  328. default y
  329. if RT_USING_CONSOLE
  330. config RT_CONSOLEBUF_SIZE
  331. int "the buffer size for console log printf"
  332. default 128
  333. config RT_CONSOLE_DEVICE_NAME
  334. string "the device name for console"
  335. default "uart"
  336. endif
  337. endmenu
  338. config RT_VER_NUM
  339. hex
  340. default 0x40100
  341. help
  342. RT-Thread version number
  343. endmenu