Kconfig 8.4 KB
Newer Older
B
Bernard Xiong 已提交
1
menu "RT-Thread Kernel"
B
bernard 已提交
2 3 4 5 6

config RT_NAME_MAX
    int "The maximal size of kernel object name"
    range 2 32
    default 8
7 8
    help
        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.
B
bernard 已提交
10

11 12 13 14 15 16 17
config RT_USING_ARCH_DATA_TYPE
    bool "Use the data types defined in ARCH_CPU"
    default n
    help
        For the data type like, `rt_uint8/int8_t, rt_uint16/int16_t, rt_uint32/int32_t`,
        BSP can define these basic data types in ARCH_CPU level.

18
        Please re-define these data types in rtconfig_project.h file.
19

S
shaojinchun 已提交
20 21 22
config RT_USING_SMP
    bool "Enable SMP(Symmetric multiprocessing)"
    default n
23
    help
S
shaojinchun 已提交
24 25 26 27 28 29 30
        This option should be selected by machines which have an SMP-
        capable CPU.
        The only effect of this option is to make the SMP-related
        options available to the user for configuration.

config RT_CPUS_NR
    int "Number of CPUs"
31 32
    default 2
    depends on RT_USING_SMP
S
shaojinchun 已提交
33
    help
34
        Number of CPUs in the system
S
shaojinchun 已提交
35

B
bernard 已提交
36 37 38 39 40 41
config RT_ALIGN_SIZE
    int "Alignment size for CPU architecture data access"
    default 4
    help
        Alignment size for CPU architecture data access

42
    choice
43 44 45 46 47 48 49 50 51 52 53 54 55
        prompt "The maximal level value of priority of thread"
        default RT_THREAD_PRIORITY_32

        config RT_THREAD_PRIORITY_8
            bool "8"

        config RT_THREAD_PRIORITY_32
            bool "32"

        config RT_THREAD_PRIORITY_256
            bool "256"
    endchoice

B
bernard 已提交
56
config RT_THREAD_PRIORITY_MAX
57 58 59 60
    int
    default 8   if RT_THREAD_PRIORITY_8
    default 32  if RT_THREAD_PRIORITY_32
    default 256 if RT_THREAD_PRIORITY_256
B
bernard 已提交
61 62 63 64 65 66 67 68 69 70 71 72

config RT_TICK_PER_SECOND
    int "Tick frequency, Hz"
    range 10 1000
    default 100
    help
        System's tick frequency, Hz.

config RT_USING_OVERFLOW_CHECK
    bool "Using stack overflow checking"
    default y
    help
73
        Enable thread stack overflow checking. The stack overflow is checking when
74
        each thread switch.
B
bernard 已提交
75 76 77 78

config RT_USING_HOOK
    bool "Enable system hook"
    default y
xpxyr's avatar
xpxyr 已提交
79
    select RT_USING_IDLE_HOOK
B
bernard 已提交
80
    help
81
        Enable the hook function when system running, such as idle thread hook,
82
        thread context switch etc.
83

xpxyr's avatar
xpxyr 已提交
84
config RT_USING_IDLE_HOOK
xpxyr's avatar
xpxyr 已提交
85 86
    bool "Enable IDLE Task hook"
    default y if RT_USING_HOOK
xpxyr's avatar
xpxyr 已提交
87 88

    if RT_USING_IDLE_HOOK
89 90
    config RT_IDLE_HOOK_LIST_SIZE
        int "The max size of idle hook list"
armink_ztl's avatar
armink_ztl 已提交
91 92 93 94 95 96
        default 4
        range 1 16
        help
            The system has a hook list. This is the hook list size.
    endif

97
config IDLE_THREAD_STACK_SIZE
98 99
    int "The stack size of idle thread"
    default 256
B
bernard 已提交
100 101 102

config RT_USING_TIMER_SOFT
    bool "Enable software timer with a timer thread"
103
    default y
B
bernard 已提交
104
    help
105
        the timeout function context of soft-timer is under a high priority timer
106
        thread.
B
bernard 已提交
107 108 109 110 111 112 113 114 115 116 117 118

if RT_USING_TIMER_SOFT
config RT_TIMER_THREAD_PRIO
    int "The priority level value of timer thread"
    default 4

config RT_TIMER_THREAD_STACK_SIZE
    int "The stack size of timer thread"
    default 512

endif

mysterywolf's avatar
mysterywolf 已提交
119 120
menu "kservice optimization"

mysterywolf's avatar
mysterywolf 已提交
121
config RT_KSERVICE_USING_STDLIB
mysterywolf's avatar
mysterywolf 已提交
122 123 124
    bool "Enable kservice to use standard C library"
    default n

mysterywolf's avatar
mysterywolf 已提交
125 126 127 128 129 130
config RT_KSERVICE_USING_TINY_SIZE
    bool "Enable kservice to use tiny size"
    default n

endmenu

131 132 133 134 135 136
menuconfig RT_DEBUG
    bool "Enable debugging features"
    default y

if RT_DEBUG

137 138
config RT_DEBUG_COLOR
    bool "Enable color debugging log"
139
    default n
140

141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
config RT_DEBUG_INIT_CONFIG
    bool "Enable debugging of components initialization"
    default n

config RT_DEBUG_INIT
    int
    default 1 if RT_DEBUG_INIT_CONFIG

config RT_DEBUG_THREAD_CONFIG
    bool "Enable debugging of Thread State Changes"
    default n

config RT_DEBUG_THREAD
    int
    default 1 if RT_DEBUG_THREAD_CONFIG

config RT_DEBUG_SCHEDULER_CONFIG
    bool "Enable debugging of Scheduler"
    default n

config RT_DEBUG_SCHEDULER
    int
    default 1 if RT_DEBUG_SCHEDULER_CONFIG

config RT_DEBUG_IPC_CONFIG
    bool "Enable debugging of IPC"
    default n

config RT_DEBUG_IPC
    int
    default 1 if RT_DEBUG_IPC_CONFIG

config RT_DEBUG_TIMER_CONFIG
    bool "Enable debugging of Timer"
    default n

config RT_DEBUG_TIMER
    int
    default 1 if RT_DEBUG_TIMER_CONFIG

config RT_DEBUG_IRQ_CONFIG
    bool "Enable debugging of IRQ(Interrupt Request)"
    default n

config RT_DEBUG_IRQ
    int
    default 1 if RT_DEBUG_IRQ_CONFIG

config RT_DEBUG_MEM_CONFIG
    bool "Enable debugging of Small Memory Algorithm"
    default n

config RT_DEBUG_MEM
    int
    default 1 if RT_DEBUG_MEM_CONFIG

config RT_DEBUG_SLAB_CONFIG
    bool "Enable debugging of SLAB Memory Algorithm"
    default n

config RT_DEBUG_SLAB
    int
    default 1 if RT_DEBUG_SLAB_CONFIG

config RT_DEBUG_MEMHEAP_CONFIG
    bool "Enable debugging of Memory Heap Algorithm"
    default n

config RT_DEBUG_MEMHEAP
    int
    default 1 if RT_DEBUG_MEMHEAP_CONFIG

config RT_DEBUG_MODULE_CONFIG
    bool "Enable debugging of Application Module"
    default n

config RT_DEBUG_MODULE
    int
    default 1 if RT_DEBUG_MODULE_CONFIG

endif

B
bernard 已提交
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
menu "Inter-Thread communication"

config RT_USING_SEMAPHORE
    bool "Enable semaphore"
    default y

config RT_USING_MUTEX
    bool "Enable mutex"
    default y

config RT_USING_EVENT
    bool "Enable event flag"
    default y

config RT_USING_MAILBOX
    bool "Enable mailbox"
    default y

config RT_USING_MESSAGEQUEUE
    bool "Enable message queue"
    default y

B
bernard 已提交
245 246 247 248 249
config RT_USING_SIGNALS
    bool "Enable signals"
    select RT_USING_MEMPOOL
    default n
    help
250
        A signal is an asynchronous notification sent to a specific thread
B
bernard 已提交
251
        in order to notify it of an event that occurred.
B
bernard 已提交
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
endmenu

menu "Memory Management"

    config RT_USING_MEMPOOL
        bool "Using memory pool"
        default y
        help
            Using static memory fixed partition

    config RT_USING_MEMHEAP
        bool "Using memory heap object"
        default n
        help
            Using memory heap object to manage dynamic memory heap.

268
    choice
269 270
        prompt "Dynamic Memory Management"
        default RT_USING_SMALL_MEM
B
bernard 已提交
271

272 273
        config RT_USING_NOHEAP
            bool "Disable Heap"
B
bernard 已提交
274 275

        config RT_USING_SMALL_MEM
276
            bool "Small Memory Algorithm"
B
bernard 已提交
277 278

        config RT_USING_SLAB
279
            bool "SLAB Algorithm for large memory"
B
bernard 已提交
280

281 282 283 284
        if RT_USING_MEMHEAP
        config RT_USING_MEMHEAP_AS_HEAP
            bool "Use all of memheap objects as heap"
        endif
285 286 287 288 289 290 291 292 293 294 295 296

        config RT_USING_USERHEAP
            bool "Use user heap"
            help
                If this option is selected, please implement these functions:
                    rt_malloc(), rt_malloc_sethook()
                    rt_free(),   rt_free_sethook()
                    rt_calloc(), rt_realloc()
                    rt_system_heap_init()

                And if FinSH is used at the same time, please implement list_mem()

297 298
    endchoice

299 300 301 302 303 304 305 306 307 308 309 310 311
    config RT_USING_MEMTRACE
        bool "Enable memory trace"
        default n
        help
            When enable RT_USING_MEMTRACE with shell, developer can call cmd:
            1. memtrace
                to dump memory block information.
            2. memcheck
                to check memory block to avoid memory overwritten.

            And developer also can call memcheck() in each of scheduling
            to check memory block to find which thread has wrongly modified
            memory.
312

313
    config RT_USING_HEAP
314
        bool
315 316 317 318
        default n if RT_USING_NOHEAP
        default y if RT_USING_SMALL_MEM
        default y if RT_USING_SLAB
        default y if RT_USING_MEMHEAP_AS_HEAP
319
        default y if RT_USING_USERHEAP
B
bernard 已提交
320 321 322 323 324 325 326 327
endmenu

menu "Kernel Device Object"

    config RT_USING_DEVICE
        bool "Using device object"
        default y

B
Bernard Xiong 已提交
328 329 330 331
    config RT_USING_DEVICE_OPS
        bool "Using ops for each device object"
        default n

B
bernard 已提交
332 333 334 335 336 337
    config RT_USING_INTERRUPT_INFO
        bool "Enable additional interrupt trace information"
        default n
        help
            Add name and counter information for interrupt trace.

B
bernard 已提交
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353
    config RT_USING_CONSOLE
        bool "Using console for rt_kprintf"
        default y

    if RT_USING_CONSOLE
        config RT_CONSOLEBUF_SIZE
            int "the buffer size for console log printf"
            default 128

        config RT_CONSOLE_DEVICE_NAME
            string "the device name for console"
            default "uart"
    endif

endmenu

354 355
config RT_VER_NUM
    hex
armink_ztl's avatar
armink_ztl 已提交
356
    default 0x40003
357 358 359
    help
        RT-Thread version number

B
bernard 已提交
360
endmenu