Kconfig 11 KB

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