blob: 54dd761a0b89fa6bced1549040682f04589c81de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
menu "RT-Thread Components"
config RT_USING_COMPONENTS_INIT
bool
default n
help
Enable automatic component initialization framework.
When enabled, components marked with INIT_EXPORT() macros will be
automatically initialized during system startup in proper order.
Initialization levels (in order):
- INIT_BOARD_EXPORT: Board-level initialization (pins, clocks)
- INIT_PREV_EXPORT: Early driver initialization
- INIT_DEVICE_EXPORT: Device driver initialization
- INIT_COMPONENT_EXPORT: Component initialization
- INIT_ENV_EXPORT: Environment initialization
- INIT_APP_EXPORT: Application initialization
Benefits:
- Automatic dependency ordering
- Cleaner code (no manual init function calls)
- Consistent initialization across components
Note: Most RT-Thread components rely on this. Usually enabled automatically
by build system.
config RT_USING_USER_MAIN
bool
default n
help
Use user-defined main() function as entry point.
When enabled, RT-Thread creates a main thread that calls your main() function,
allowing traditional C programming style entry point.
Without this option: You must manually create threads from application
With this option: Your main() function runs in a dedicated main thread
The main thread:
- Runs after system initialization
- Has configurable stack size and priority
- Can use RT-Thread APIs like any other thread
- Can create additional threads
Enable this for easier application development and familiar entry point.
if RT_USING_USER_MAIN
config RT_MAIN_THREAD_STACK_SIZE
int "Set main thread stack size"
default 6144 if ARCH_CPU_64BIT
default 2048
help
Stack size in bytes for the main thread.
Default values:
- 64-bit architectures: 6144 bytes (6KB)
- 32-bit architectures: 2048 bytes (2KB)
Increase if:
- Deep recursion in main()
- Large local variables
- Stack overflow in main thread
- Complex initialization requiring more stack
Decrease for memory-constrained systems if main() is simple.
Note: Each thread's stack is separate. This only affects main thread.
config RT_MAIN_THREAD_PRIORITY
int "Set main thread priority"
default 4 if RT_THREAD_PRIORITY_8
default 10 if RT_THREAD_PRIORITY_32
default 85 if RT_THREAD_PRIORITY_256
help
Priority of the main thread (lower number = higher priority).
Default values scale with priority levels:
- 8 levels: Priority 4 (middle-low priority)
- 32 levels: Priority 10 (medium priority)
- 256 levels: Priority 85 (medium-low priority)
Lower values (higher priority) if:
- Main thread needs to preempt other tasks
- Time-critical initialization in main()
Higher values (lower priority) if:
- Main thread is just coordination/monitoring
- Other threads need priority over main
Note: Priority 0 is highest, maximum is configured by RT_THREAD_PRIORITY_MAX.
endif
config RT_USING_LEGACY
bool "Support legacy version for compatibility"
default n
help
Enable compatibility layer for legacy RT-Thread versions.
Provides deprecated APIs and compatibility shims for older code,
allowing gradual migration to newer RT-Thread versions.
Includes:
- Deprecated API wrappers
- Legacy component interfaces
- Backward-compatible behavior
Enable if:
- Porting code from older RT-Thread versions
- Using third-party libraries requiring legacy APIs
- Gradual migration strategy
Disable for:
- New projects (use modern APIs)
- Smaller code size
- Better performance (no compatibility overhead)
Note: Legacy support may be removed in future versions.
Plan to migrate to current APIs.
if RT_USING_CONSOLE
rsource "finsh/Kconfig"
endif
if !RT_USING_NANO
rsource "dfs/Kconfig"
rsource "fal/Kconfig"
rsource "drivers/Kconfig"
rsource "libc/Kconfig"
rsource "net/Kconfig"
rsource "mprotect/Kconfig"
rsource "utilities/Kconfig"
endif
if ARCH_MM_MMU
rsource "mm/Kconfig"
endif
if RT_USING_SMART
rsource "lwp/Kconfig"
endif
rsource "legacy/Kconfig"
rsource "rust/Kconfig"
endmenu
|