mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-13 04:33:18 +08:00
495c8cfc25
Many modules' utests currently don't support enabling all tests at once. Furthermore, some modules' tests are complex, for example due to their numerous dependencies on other modules. This makes it nearly impossible to enable all tests with a single global switch. Consequently, the previously defined `RT_UTEST_USING_ALL_CASES` has lost its original meaning. We recommend deprecating this configuration switch. If a module needs to enable a group of functional tests through its own configuration, this local enable all switch should be implemented by the module itself, and a global RTT enable switch will no longer be provided. If such a requirement arises in the future, we recommend careful design, especially considering how to ensure that turning on a single switch enables all dependencies for all involved modules for ease of use. Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
450 lines
12 KiB
Plaintext
450 lines
12 KiB
Plaintext
menu "RT-Thread Kernel"
|
|
|
|
rsource "klibc/Kconfig"
|
|
|
|
config RT_NAME_MAX
|
|
int "The maximal size of kernel object name"
|
|
range 2 64
|
|
default 8
|
|
help
|
|
Each kernel object, such as thread, timer, semaphore etc, has a name,
|
|
the RT_NAME_MAX is the maximal size of this object name.
|
|
|
|
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.
|
|
|
|
Please re-define these data types in rtconfig_project.h file.
|
|
|
|
config RT_USING_NANO
|
|
bool "Enable RT-Thread Nano"
|
|
default n
|
|
help
|
|
RT-Thread Nano is a very small size and refined hard real-time kernel,
|
|
which is suited for the extremely resource-constrained MCU system.
|
|
|
|
config RT_USING_SMART
|
|
bool "Enable RT-Thread Smart (microkernel on kernel/userland)"
|
|
default n
|
|
select RT_USING_LWP
|
|
select RT_USING_DFS
|
|
select RT_USING_POSIX_CLOCKTIME
|
|
select RT_USING_DEVICE
|
|
select RT_USING_NULL
|
|
select RT_USING_ZERO
|
|
select RT_USING_RANDOM
|
|
select RT_USING_RTC
|
|
select RT_USING_POSIX_TIMER
|
|
select RT_USING_POSIX_CLOCK
|
|
select RT_USING_POSIX_FS
|
|
select RT_USING_POSIX_TERMIOS
|
|
select RT_USING_KTIME
|
|
select RT_USING_STDC_ATOMIC
|
|
select RT_USING_SYSTEM_WORKQUEUE
|
|
select RT_USING_CPU_USAGE_TRACER
|
|
select RT_USING_SCHED_THREAD_CTX
|
|
depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A || ARCH_ARMV8 || ARCH_RISCV64
|
|
depends on !RT_USING_NANO
|
|
help
|
|
RT-Thread Smart is a microkernel based operating system on RT-Thread.
|
|
|
|
config RT_USING_AMP
|
|
bool "Enable AMP (Asymmetric Multi-Processing)"
|
|
default n
|
|
if RT_USING_AMP
|
|
choice RT_USING_AMP_ROLE
|
|
prompt "Select the AMP role"
|
|
default RT_AMP_SLAVE
|
|
|
|
config RT_AMP_MASTER
|
|
bool "amp role MASTER"
|
|
|
|
config RT_AMP_SLAVE
|
|
bool "amp role SLAVE"
|
|
endchoice
|
|
endif
|
|
|
|
config RT_USING_SMP
|
|
bool "Enable SMP (Symmetric multiprocessing)"
|
|
default n
|
|
help
|
|
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"
|
|
default 1
|
|
range 1 1 if !RT_USING_SMP && !RT_USING_AMP
|
|
help
|
|
Number of CPUs in the system
|
|
|
|
config RT_ALIGN_SIZE
|
|
int "Alignment size for CPU architecture data access"
|
|
default 8
|
|
help
|
|
Alignment size for CPU architecture data access
|
|
|
|
choice RT_THREAD_PRIORITY_VAL_MAX
|
|
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
|
|
|
|
config RT_THREAD_PRIORITY_MAX
|
|
int
|
|
default 8 if RT_THREAD_PRIORITY_8
|
|
default 32 if RT_THREAD_PRIORITY_32
|
|
default 256 if RT_THREAD_PRIORITY_256
|
|
|
|
config RT_TICK_PER_SECOND
|
|
int "Tick frequency, Hz"
|
|
range 10 1000
|
|
default 1000
|
|
help
|
|
System's tick frequency, Hz.
|
|
|
|
config RT_USING_OVERFLOW_CHECK
|
|
bool "Using stack overflow checking"
|
|
default y if RT_USING_DEBUG
|
|
help
|
|
Enable thread stack overflow checking. The stack overflow is checking when
|
|
each thread switch.
|
|
|
|
config RT_USING_HOOK
|
|
bool "Enable system hook"
|
|
default y
|
|
select RT_USING_IDLE_HOOK
|
|
help
|
|
Enable the hook function when system running, such as idle thread hook,
|
|
thread context switch etc.
|
|
|
|
if RT_USING_HOOK
|
|
config RT_HOOK_USING_FUNC_PTR
|
|
bool "Using function pointers as system hook"
|
|
default y
|
|
endif
|
|
|
|
config RT_USING_HOOKLIST
|
|
bool "Enable hook list"
|
|
default n
|
|
help
|
|
Enable the hook list feature for rt-thread packages. With this, they can
|
|
plug in to the system on run-time.
|
|
|
|
config RT_USING_IDLE_HOOK
|
|
bool "Enable IDLE Task hook"
|
|
default y if RT_USING_HOOK
|
|
|
|
if RT_USING_IDLE_HOOK
|
|
config RT_IDLE_HOOK_LIST_SIZE
|
|
int "The max size of idle hook list"
|
|
default 4
|
|
range 1 16
|
|
help
|
|
The system has a hook list. This is the hook list size.
|
|
endif
|
|
|
|
config IDLE_THREAD_STACK_SIZE
|
|
int "The stack size of idle thread"
|
|
default 1024 if ARCH_CPU_64BIT
|
|
default 256
|
|
|
|
config SYSTEM_THREAD_STACK_SIZE
|
|
int "The stack size of system thread (for defunct etc.)"
|
|
depends on RT_USING_SMP
|
|
default IDLE_THREAD_STACK_SIZE
|
|
|
|
config RT_USING_TIMER_SOFT
|
|
bool "Enable software timer with a timer thread"
|
|
default y
|
|
help
|
|
the timeout function context of soft-timer is under a high priority timer
|
|
thread.
|
|
|
|
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 2048 if ARCH_CPU_64BIT
|
|
default 512
|
|
|
|
config RT_USING_TIMER_ALL_SOFT
|
|
bool "Set all timer as soft timer"
|
|
default n
|
|
endif
|
|
|
|
config RT_USING_CPU_USAGE_TRACER
|
|
select RT_USING_HOOK
|
|
bool "Enable cpu usage tracing"
|
|
default n
|
|
help
|
|
Enable thread CPU usage statistics and monitoring.
|
|
This feature tracks CPU usage for each thread and provides
|
|
percentage information through the list thread command.
|
|
It will automatically integrate with the scheduler to track thread execution time.
|
|
|
|
menu "kservice options"
|
|
config RT_USING_TINY_FFS
|
|
bool "Enable kservice to use tiny finding first bit set method"
|
|
default n
|
|
endmenu
|
|
|
|
menuconfig RT_USING_DEBUG
|
|
bool "Enable debugging features"
|
|
default y
|
|
|
|
if RT_USING_DEBUG
|
|
config RT_DEBUGING_ASSERT
|
|
bool "Enable assertion debugging"
|
|
default y
|
|
|
|
config RT_DEBUGING_COLOR
|
|
bool "Enable color debugging log"
|
|
default y
|
|
|
|
config RT_DEBUGING_CONTEXT
|
|
bool "Enable debugging of environment and context check"
|
|
default y
|
|
|
|
config RT_DEBUGING_AUTO_INIT
|
|
bool "Enable debugging of components automatic initialization"
|
|
default n
|
|
|
|
config RT_DEBUGING_SPINLOCK
|
|
bool "Enable spinlock debugging"
|
|
depends on RT_USING_SMP
|
|
default n
|
|
|
|
config RT_DEBUGING_CRITICAL
|
|
bool "Enable critical level tracing"
|
|
depends on RT_USING_SMP
|
|
default y if RT_USING_SMART
|
|
default n
|
|
endif
|
|
|
|
config RT_USING_CI_ACTION
|
|
bool "Enable CI Action build mode"
|
|
select RT_USING_UTEST
|
|
select RT_UTEST_USING_AUTO_RUN
|
|
default n
|
|
help
|
|
Identify that the environment is CI Action.
|
|
|
|
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
|
|
|
|
config RT_USING_MESSAGEQUEUE_PRIORITY
|
|
bool "Enable message queue priority"
|
|
depends on RT_USING_MESSAGEQUEUE
|
|
default n
|
|
|
|
config RT_USING_SIGNALS
|
|
bool "Enable signals"
|
|
select RT_USING_MEMPOOL
|
|
default n
|
|
help
|
|
A signal is an asynchronous notification sent to a specific thread
|
|
in order to notify it of an event that occurred.
|
|
|
|
endmenu
|
|
|
|
menu "Memory Management"
|
|
|
|
config RT_USING_MEMPOOL
|
|
bool "Using memory pool"
|
|
default y
|
|
help
|
|
Using static memory fixed partition
|
|
|
|
config RT_USING_SMALL_MEM
|
|
bool "Using Small Memory Algorithm"
|
|
default n
|
|
help
|
|
Using Small Memory Algorithm
|
|
|
|
config RT_USING_SLAB
|
|
bool "Using SLAB Memory Algorithm"
|
|
default n
|
|
help
|
|
The slab allocator of RT-Thread is a memory allocation algorithm
|
|
optimizedfor embedded systems based on the slab allocator
|
|
implemented by Matthew Dillon, founder of dragonfly BSD.
|
|
The original slab algorithm is an efficient kernel memory
|
|
allocation algorithm introduced by Jeff bonwick for
|
|
Solaris Operating System.
|
|
|
|
menuconfig RT_USING_MEMHEAP
|
|
bool "Using memheap Memory Algorithm"
|
|
default n
|
|
|
|
if RT_USING_MEMHEAP
|
|
choice RT_MEMHEAP_MODE
|
|
prompt "Memheap memory allocation mode"
|
|
default RT_MEMHEAP_FAST_MODE
|
|
|
|
config RT_MEMHEAP_FAST_MODE
|
|
bool "fast mode"
|
|
help
|
|
Speed priority mode.
|
|
As long as the memory block size meets the requirements, the search ends immediately.
|
|
|
|
config RT_MEMHEAP_BEST_MODE
|
|
bool "best mode"
|
|
help
|
|
Best size first.
|
|
The search does not end until the memory block of the most appropriate size is found
|
|
endchoice
|
|
endif
|
|
|
|
choice RT_USING_HEAP_TYPE
|
|
prompt "System Heap Memory Management"
|
|
default RT_USING_SMALL_MEM_AS_HEAP
|
|
|
|
config RT_USING_SMALL_MEM_AS_HEAP
|
|
bool "Small Memory Algorithm"
|
|
select RT_USING_SMALL_MEM
|
|
|
|
config RT_USING_MEMHEAP_AS_HEAP
|
|
bool "Use memheap objects as heap"
|
|
select RT_USING_MEMHEAP
|
|
|
|
if RT_USING_MEMHEAP_AS_HEAP
|
|
config RT_USING_MEMHEAP_AUTO_BINDING
|
|
bool "Use all of memheap objects as heap"
|
|
default y
|
|
endif
|
|
|
|
config RT_USING_SLAB_AS_HEAP
|
|
bool "SLAB Algorithm for large memory"
|
|
select RT_USING_SLAB
|
|
|
|
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_memory_info()
|
|
rt_system_heap_init()
|
|
|
|
config RT_USING_NOHEAP
|
|
bool "Disable Heap"
|
|
endchoice
|
|
|
|
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.
|
|
|
|
config RT_USING_HEAP_ISR
|
|
bool "Using heap in ISR"
|
|
default n
|
|
help
|
|
When this option is enabled, the critical zone will be protected with disable interrupt.
|
|
|
|
config RT_USING_HEAP
|
|
bool
|
|
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
|
|
default y if RT_USING_USERHEAP
|
|
endmenu
|
|
|
|
config RT_USING_DEVICE
|
|
bool "Using device object"
|
|
depends on !RT_USING_NANO
|
|
default y
|
|
|
|
config RT_USING_DEVICE_OPS
|
|
bool "Using ops for each device object"
|
|
depends on RT_USING_DEVICE
|
|
default n
|
|
|
|
config RT_USING_INTERRUPT_INFO
|
|
bool "Enable additional interrupt trace information"
|
|
default n
|
|
help
|
|
Add name and counter information for interrupt trace.
|
|
|
|
config RT_USING_THREADSAFE_PRINTF
|
|
bool "Enable thread safe kernel print service"
|
|
default y if RT_USING_SMP && RT_USING_SMART
|
|
|
|
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 256 if RT_USING_UTEST
|
|
default 128
|
|
|
|
config RT_CONSOLE_DEVICE_NAME
|
|
string "the device name for console"
|
|
default "uart1"
|
|
|
|
endif
|
|
|
|
config RT_VER_NUM
|
|
hex
|
|
default 0x50201
|
|
help
|
|
RT-Thread version number
|
|
|
|
config RT_USING_STDC_ATOMIC
|
|
bool "Use atomic implemented in stdatomic.h"
|
|
default n
|
|
|
|
config RT_BACKTRACE_LEVEL_MAX_NR
|
|
int "Max number of backtrace level"
|
|
default 32
|
|
|
|
endmenu
|