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