Kconfig 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  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_SMART
  17. bool "Enable RT-Thread Smart (microkernel on kernel/userland)"
  18. default n
  19. select RT_USING_LWP
  20. help
  21. RT-Thread Smart is a microkernel based operating system on RT-Thread.
  22. config RT_USING_SMP
  23. bool "Enable SMP(Symmetric multiprocessing)"
  24. default n
  25. help
  26. This option should be selected by machines which have an SMP-
  27. capable CPU.
  28. The only effect of this option is to make the SMP-related
  29. options available to the user for configuration.
  30. config RT_CPUS_NR
  31. int "Number of CPUs"
  32. default 2
  33. depends on RT_USING_SMP
  34. help
  35. Number of CPUs in the system
  36. config RT_ALIGN_SIZE
  37. int "Alignment size for CPU architecture data access"
  38. default 4
  39. help
  40. Alignment size for CPU architecture data access
  41. choice
  42. prompt "The maximal level value of priority of thread"
  43. default RT_THREAD_PRIORITY_32
  44. config RT_THREAD_PRIORITY_8
  45. bool "8"
  46. config RT_THREAD_PRIORITY_32
  47. bool "32"
  48. config RT_THREAD_PRIORITY_256
  49. bool "256"
  50. endchoice
  51. config RT_THREAD_PRIORITY_MAX
  52. int
  53. default 8 if RT_THREAD_PRIORITY_8
  54. default 32 if RT_THREAD_PRIORITY_32
  55. default 256 if RT_THREAD_PRIORITY_256
  56. config RT_TICK_PER_SECOND
  57. int "Tick frequency, Hz"
  58. range 10 1000
  59. default 1000
  60. help
  61. System's tick frequency, Hz.
  62. config RT_USING_OVERFLOW_CHECK
  63. bool "Using stack overflow checking"
  64. default y
  65. help
  66. Enable thread stack overflow checking. The stack overflow is checking when
  67. each thread switch.
  68. config RT_USING_HOOK
  69. bool "Enable system hook"
  70. default y
  71. select RT_USING_IDLE_HOOK
  72. help
  73. Enable the hook function when system running, such as idle thread hook,
  74. thread context switch etc.
  75. if RT_USING_HOOK
  76. config RT_HOOK_USING_FUNC_PTR
  77. bool "Using function pointers as system hook"
  78. default y
  79. endif
  80. config RT_USING_IDLE_HOOK
  81. bool "Enable IDLE Task hook"
  82. default y if RT_USING_HOOK
  83. if RT_USING_IDLE_HOOK
  84. config RT_IDLE_HOOK_LIST_SIZE
  85. int "The max size of idle hook list"
  86. default 4
  87. range 1 16
  88. help
  89. The system has a hook list. This is the hook list size.
  90. endif
  91. config IDLE_THREAD_STACK_SIZE
  92. int "The stack size of idle thread"
  93. default 1024 if ARCH_CPU_64BIT
  94. default 256
  95. config SYSTEM_THREAD_STACK_SIZE
  96. int "The stack size of system thread (for defunct etc.)"
  97. depends on RT_USING_SMP
  98. default IDLE_THREAD_STACK_SIZE
  99. config RT_USING_TIMER_SOFT
  100. bool "Enable software timer with a timer thread"
  101. default y
  102. help
  103. the timeout function context of soft-timer is under a high priority timer
  104. thread.
  105. if RT_USING_TIMER_SOFT
  106. config RT_TIMER_THREAD_PRIO
  107. int "The priority level value of timer thread"
  108. default 4
  109. config RT_TIMER_THREAD_STACK_SIZE
  110. int "The stack size of timer thread"
  111. default 2048 if ARCH_CPU_64BIT
  112. default 512
  113. endif
  114. menu "kservice optimization"
  115. config RT_KSERVICE_USING_STDLIB
  116. bool "Enable kservice to use standard C library"
  117. default y
  118. if RT_KSERVICE_USING_STDLIB
  119. config RT_KSERVICE_USING_STDLIB_MEMORY
  120. bool "Use stdlib memory functions to replace (faster, but not safe)"
  121. default n
  122. help
  123. e.g. use memcpy to replace rt_memcpy
  124. endif
  125. config RT_KSERVICE_USING_TINY_SIZE
  126. bool "Enable kservice to use tiny size"
  127. default n
  128. config RT_USING_TINY_FFS
  129. bool "Enable kservice to use tiny finding first bit set method"
  130. default n
  131. config RT_KPRINTF_USING_LONGLONG
  132. bool "Enable rt_printf-family functions to support long-long format"
  133. default y if ARCH_CPU_64BIT
  134. default n
  135. help
  136. Enable rt_printf()/rt_snprintf()/rt_sprintf()/rt_vsnprintf()/rt_vsprintf()
  137. functions to support long-long format
  138. endmenu
  139. menuconfig RT_DEBUG
  140. bool "Enable debugging features"
  141. default y
  142. if RT_DEBUG
  143. config RT_DEBUG_COLOR
  144. bool "Enable color debugging log"
  145. default n
  146. config RT_DEBUG_INIT_CONFIG
  147. bool "Enable debugging of components initialization"
  148. default n
  149. config RT_DEBUG_INIT
  150. int
  151. default 1 if RT_DEBUG_INIT_CONFIG
  152. config RT_DEBUG_THREAD_CONFIG
  153. bool "Enable debugging of Thread State Changes"
  154. default n
  155. config RT_DEBUG_THREAD
  156. int
  157. default 1 if RT_DEBUG_THREAD_CONFIG
  158. config RT_DEBUG_SCHEDULER_CONFIG
  159. bool "Enable debugging of Scheduler"
  160. default n
  161. config RT_DEBUG_SCHEDULER
  162. int
  163. default 1 if RT_DEBUG_SCHEDULER_CONFIG
  164. config RT_DEBUG_IPC_CONFIG
  165. bool "Enable debugging of IPC"
  166. default n
  167. config RT_DEBUG_IPC
  168. int
  169. default 1 if RT_DEBUG_IPC_CONFIG
  170. config RT_DEBUG_TIMER_CONFIG
  171. bool "Enable debugging of Timer"
  172. default n
  173. config RT_DEBUG_TIMER
  174. int
  175. default 1 if RT_DEBUG_TIMER_CONFIG
  176. config RT_DEBUG_IRQ_CONFIG
  177. bool "Enable debugging of IRQ(Interrupt Request)"
  178. default n
  179. config RT_DEBUG_IRQ
  180. int
  181. default 1 if RT_DEBUG_IRQ_CONFIG
  182. config RT_DEBUG_MEM_CONFIG
  183. bool "Enable debugging of Small Memory Algorithm"
  184. default n
  185. config RT_DEBUG_MEM
  186. int
  187. default 1 if RT_DEBUG_MEM_CONFIG
  188. config RT_DEBUG_SLAB_CONFIG
  189. bool "Enable debugging of SLAB Memory Algorithm"
  190. default n
  191. config RT_DEBUG_SLAB
  192. int
  193. default 1 if RT_DEBUG_SLAB_CONFIG
  194. config RT_DEBUG_MEMHEAP_CONFIG
  195. bool "Enable debugging of Memory Heap Algorithm"
  196. default n
  197. config RT_DEBUG_MEMHEAP
  198. int
  199. default 1 if RT_DEBUG_MEMHEAP_CONFIG
  200. config RT_DEBUG_MODULE_CONFIG
  201. bool "Enable debugging of Application Module"
  202. default n
  203. config RT_DEBUG_MODULE
  204. int
  205. default 1 if RT_DEBUG_MODULE_CONFIG
  206. endif
  207. menu "Inter-Thread communication"
  208. config RT_USING_SEMAPHORE
  209. bool "Enable semaphore"
  210. default y
  211. config RT_USING_MUTEX
  212. bool "Enable mutex"
  213. default y
  214. config RT_USING_EVENT
  215. bool "Enable event flag"
  216. default y
  217. config RT_USING_MAILBOX
  218. bool "Enable mailbox"
  219. default y
  220. config RT_USING_MESSAGEQUEUE
  221. bool "Enable message queue"
  222. default y
  223. config RT_USING_SIGNALS
  224. bool "Enable signals"
  225. select RT_USING_MEMPOOL
  226. default n
  227. help
  228. A signal is an asynchronous notification sent to a specific thread
  229. in order to notify it of an event that occurred.
  230. endmenu
  231. menu "Memory Management"
  232. config RT_USING_MEMPOOL
  233. bool "Using memory pool"
  234. default y
  235. help
  236. Using static memory fixed partition
  237. config RT_USING_SMALL_MEM
  238. bool "Using Small Memory Algorithm"
  239. default n
  240. help
  241. Using Small Memory Algorithm
  242. config RT_USING_SLAB
  243. bool "Using SLAB Memory Algorithm"
  244. default n
  245. help
  246. The slab allocator of RT-Thread is a memory allocation algorithm
  247. optimizedfor embedded systems based on the slab allocator
  248. implemented by Matthew Dillon, founder of dragonfly BSD.
  249. The original slab algorithm is an efficient kernel memory
  250. allocation algorithm introduced by Jeff bonwick for
  251. Solaris Operating System.
  252. menuconfig RT_USING_MEMHEAP
  253. bool "Using memheap Memory Algorithm"
  254. default n
  255. if RT_USING_MEMHEAP
  256. choice
  257. prompt "Memheap memory allocation mode"
  258. default RT_MEMHEAP_FAST_MODE
  259. config RT_MEMHEAP_FAST_MODE
  260. bool "fast mode"
  261. help
  262. Speed priority mode.
  263. As long as the memory block size meets the requirements, the search ends immediately.
  264. config RT_MEMHEAP_BEST_MODE
  265. bool "best mode"
  266. help
  267. Best size first.
  268. The search does not end until the memory block of the most appropriate size is found
  269. endchoice
  270. endif
  271. choice
  272. prompt "System Heap Memory Management"
  273. default RT_USING_SMALL_MEM_AS_HEAP
  274. config RT_USING_SMALL_MEM_AS_HEAP
  275. bool "Small Memory Algorithm"
  276. select RT_USING_SMALL_MEM
  277. config RT_USING_MEMHEAP_AS_HEAP
  278. bool "Use memheap objects as heap"
  279. select RT_USING_MEMHEAP
  280. if RT_USING_MEMHEAP_AS_HEAP
  281. config RT_USING_MEMHEAP_AUTO_BINDING
  282. bool "Use all of memheap objects as heap"
  283. default y
  284. endif
  285. config RT_USING_SLAB_AS_HEAP
  286. bool "SLAB Algorithm for large memory"
  287. select RT_USING_SLAB
  288. config RT_USING_USERHEAP
  289. bool "Use user heap"
  290. help
  291. If this option is selected, please implement these functions:
  292. rt_malloc(), rt_malloc_sethook()
  293. rt_free(), rt_free_sethook()
  294. rt_calloc(), rt_realloc()
  295. rt_memory_info()
  296. rt_system_heap_init()
  297. config RT_USING_NOHEAP
  298. bool "Disable Heap"
  299. endchoice
  300. config RT_USING_MEMTRACE
  301. bool "Enable memory trace"
  302. default n
  303. help
  304. When enable RT_USING_MEMTRACE with shell, developer can call cmd:
  305. 1. memtrace
  306. to dump memory block information.
  307. 2. memcheck
  308. to check memory block to avoid memory overwritten.
  309. And developer also can call memcheck() in each of scheduling
  310. to check memory block to find which thread has wrongly modified
  311. memory.
  312. config RT_USING_HEAP_ISR
  313. bool "Using heap in ISR"
  314. default n
  315. help
  316. When this option is enabled, the critical zone will be protected with disable interrupt.
  317. config RT_USING_HEAP
  318. bool
  319. default n if RT_USING_NOHEAP
  320. default y if RT_USING_SMALL_MEM
  321. default y if RT_USING_SLAB
  322. default y if RT_USING_MEMHEAP_AS_HEAP
  323. default y if RT_USING_USERHEAP
  324. endmenu
  325. menu "Kernel Device Object"
  326. config RT_USING_DEVICE
  327. bool "Using device object"
  328. default y
  329. config RT_USING_DEVICE_OPS
  330. bool "Using ops for each device object"
  331. default n
  332. config RT_USING_DM
  333. bool "Enable device driver model with device tree"
  334. default n
  335. help
  336. Enable device driver model with device tree (FDT). It will use more memory
  337. to parse and support device tree feature.
  338. config RT_USING_DM_FDT
  339. bool "Enablie builtin libfdt"
  340. depends on RT_USING_DM
  341. default y
  342. help
  343. libfdt - Flat Device Tree manipulation. If your code already contains the
  344. libfdt, you can cancel this built-in libfdt to avoid link issue.
  345. config RT_USING_INTERRUPT_INFO
  346. bool "Enable additional interrupt trace information"
  347. default n
  348. help
  349. Add name and counter information for interrupt trace.
  350. config RT_USING_CONSOLE
  351. bool "Using console for rt_kprintf"
  352. default y
  353. if RT_USING_CONSOLE
  354. config RT_CONSOLEBUF_SIZE
  355. int "the buffer size for console log printf"
  356. default 128
  357. config RT_CONSOLE_DEVICE_NAME
  358. string "the device name for console"
  359. default "uart"
  360. endif
  361. endmenu
  362. config RT_VER_NUM
  363. hex
  364. default 0x50000
  365. help
  366. RT-Thread version number
  367. endmenu