-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathKconfig
More file actions
255 lines (233 loc) · 9 KB
/
Kconfig
File metadata and controls
255 lines (233 loc) · 9 KB
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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
mainmenu "Ellu's Modules"
menu "Global Configuration"
choice
prompt "Target Compiler"
help
Select the compiler you are using.
default MOD_CFG_COMPILER_AC6
config MOD_CFG_COMPILER_AC6
bool "AC6"
config MOD_CFG_COMPILER_AC5
bool "AC5"
config MOD_CFG_COMPILER_GCC
bool "GCC"
config MOD_CFG_COMPILER_IAR
bool "IAR"
endchoice
choice
prompt "Target CPU"
help
Select the cpu you are using.
default MOD_CFG_CPU_CM4
config MOD_CFG_CPU_CM0
bool "Cortex-M0"
config MOD_CFG_CPU_CM3
bool "Cortex-M3"
config MOD_CFG_CPU_CM4
bool "Cortex-M4"
config MOD_CFG_CPU_CM7
bool "Cortex-M7"
config MOD_CFG_CPU_CM33
bool "Cortex-M33"
config MOD_CFG_CPU_ARM7
bool "ARM7"
config MOD_CFG_CPU_ARM9
bool "ARM9"
endchoice
choice
prompt "Enable RTOS Support"
help
Select the RTOS you are using.
default MOD_CFG_USE_OS_NONE
config MOD_CFG_USE_OS_NONE
bool "None"
config MOD_CFG_USE_OS_FREERTOS
bool "FreeRTOS"
config MOD_CFG_USE_OS_RTT
bool "RT-Thread"
config MOD_CFG_USE_OS_KLITE
bool "KLite RTOS"
select MOD_ENABLE_KLITE
endchoice
choice
prompt "System Time/Tick Provider"
help
Select the system time source that offers m_tick/m_time_* functions.
default MOD_CFG_TIME_MATHOD_KLITE if MOD_CFG_USE_OS_KLITE
default MOD_CFG_TIME_MATHOD_PERF_COUNTER
config MOD_CFG_TIME_MATHOD_HAL
bool "ST HAL Library"
config MOD_CFG_TIME_MATHOD_PERF_COUNTER
bool "PerfCounter Library"
select MOD_ENABLE_PERF_COUNTER
config MOD_CFG_TIME_MATHOD_KLITE
bool "KLite RTOS"
depends on MOD_CFG_USE_OS_KLITE
config MOD_CFG_TIME_MATHOD_FREERTOS
bool "FreeRTOS"
depends on MOD_CFG_USE_OS_FREERTOS
config MOD_CFG_TIME_MATHOD_RTT
bool "RT-Thread"
depends on MOD_CFG_USE_OS_RTT
config MOD_CFG_TIME_MATHOD_CUSTOM
bool "Custom"
help
Implement following functions on your own:
void mod_custom_tick_init(void);
m_time_t mod_custom_tick_get(void);
m_time_t mod_custom_tick_clk(void); (if dynamic tick frequency)
endchoice
menu "Custom Time/Tick Provider Configuration"
depends on MOD_CFG_TIME_MATHOD_CUSTOM
config MOD_CFG_CUSTOM_TIME_IMPORT
bool "Custom Include"
default n
help
If you have a include file needed by your custom time provider.
config MOD_CFG_CUSTOM_TIME_HEADER
depends on MOD_CFG_CUSTOM_TIME_IMPORT
string "Custom Header File"
help
The header file that contains the custom time/tick provider definitions.
choice
prompt "Time Type"
help
Select the type of time you are using.
config MOD_CFG_CUSTOM_TIME_TYPE_U32
bool "uint32_t"
config MOD_CFG_CUSTOM_TIME_TYPE_U64
bool "uint64_t"
config MOD_CFG_CUSTOM_TIME_TYPE_S32
bool "int32_t"
config MOD_CFG_CUSTOM_TIME_TYPE_S64
bool "int64_t"
endchoice
config MOD_CFG_CUSTOM_TIME_BASE_DYNAMIC
bool "Dynamic Tick Frequency"
default n
help
If enabled, the tick frequency can be get from custom function:
m_time_t mod_custom_tick_clk(void);
config MOD_CFG_CUSTOM_TIME_BASE
int "Tick Frequency"
default 1000
depends on !MOD_CFG_CUSTOM_TIME_BASE_DYNAMIC
help
The tick frequency in Hz.
endmenu
choice
prompt "System Delay Provider"
help
Select the system delay source that offers m_delay_* functions.
Be aware that if you are using an RTOS, the RTOS's delay functions should best be used.
default MOD_CFG_DELAY_MATHOD_RTT if MOD_CFG_USE_OS_RTT
default MOD_CFG_DELAY_MATHOD_KLITE if MOD_CFG_USE_OS_KLITE
default MOD_CFG_DELAY_MATHOD_FREERTOS if MOD_CFG_USE_OS_FREERTOS
default MOD_CFG_DELAY_MATHOD_PERF_COUNTER
config MOD_CFG_DELAY_MATHOD_HAL
bool "ST HAL Library"
config MOD_CFG_DELAY_MATHOD_PERF_COUNTER
bool "PerfCounter Library"
select MOD_ENABLE_PERF_COUNTER
config MOD_CFG_DELAY_MATHOD_RTT
bool "RT-Thread"
depends on MOD_CFG_USE_OS_RTT
config MOD_CFG_DELAY_MATHOD_KLITE
bool "KLite RTOS"
depends on MOD_CFG_USE_OS_KLITE
config MOD_CFG_DELAY_MATHOD_FREERTOS
bool "FreeRTOS"
depends on MOD_CFG_USE_OS_FREERTOS
config MOD_CFG_DELAY_MATHOD_CUSTOM
bool "Custom"
help
Implement following functions on your own:
void mod_custom_delay_init(void);
void mod_custom_delay_us(m_time_t us);
void mod_custom_delay_ms(m_time_t ms);
endchoice
menu "Custom Delay Provider Configuration"
depends on MOD_CFG_DELAY_MATHOD_CUSTOM
config MOD_CFG_CUSTOM_DELAY_IMPORT
bool "Custom Include"
default n
help
If you have a custom include file needed by your custom delay provider.
config MOD_CFG_CUSTOM_DELAY_HEADER
depends on MOD_CFG_CUSTOM_DELAY_IMPORT
string "Custom Header File"
help
The header file that contains the custom delay provider definitions.
endmenu
choice
prompt "System Heap Provider"
help
Select the memory manager that offers m_alloc/m_free/m_realloc functions.
Be aware that if you are using an RTOS, the RTOS's memory manager should best be used.
default MOD_CFG_HEAP_MATHOD_KLITE if MOD_CFG_USE_OS_KLITE
default MOD_CFG_HEAP_MATHOD_FREERTOS if MOD_CFG_USE_OS_FREERTOS
default MOD_CFG_HEAP_MATHOD_RTT if MOD_CFG_USE_OS_RTT
default MOD_CFG_HEAP_MATHOD_STDLIB
config MOD_CFG_HEAP_MATHOD_STDLIB
bool "Standard Library (stdlib.h)"
config MOD_CFG_HEAP_MATHOD_LWMEM
bool "LwMEM Memory Manager"
select MOD_ENABLE_LWMEM
config MOD_CFG_HEAP_MATHOD_HEAP4
bool "Heap4 Memory Manager (modified from FreeRTOS)"
select MOD_ENABLE_HEAP4
config MOD_CFG_HEAP_MATHOD_KLITE
bool "KLite RTOS Memory Manager"
depends on MOD_CFG_USE_OS_KLITE
config MOD_CFG_HEAP_MATHOD_FREERTOS
bool "FreeRTOS Memory Manager"
depends on MOD_CFG_USE_OS_FREERTOS
config MOD_CFG_HEAP_MATHOD_RTT
bool "RT-Thread Memory Manager"
depends on MOD_CFG_USE_OS_RTT
config MOD_CFG_HEAP_MATHOD_CUSTOM
bool "Custom"
help
Implement following functions on your own:
void mod_custom_heap_init(void* ptr, size_t size);
void *mod_custom_alloc(size_t size);
void mod_custom_free(void *ptr);
void *mod_custom_realloc(void *ptr, size_t size);
endchoice
menu "Custom Heap Provider Configuration"
depends on MOD_CFG_HEAP_MATHOD_CUSTOM
config MOD_CFG_CUSTOM_HEAP_IMPORT
bool "Custom Include"
default n
help
If you have a custom include file needed by your custom heap provider.
config MOD_CFG_CUSTOM_HEAP_HEADER
depends on MOD_CFG_CUSTOM_HEAP_IMPORT
string "Custom Header File"
help
The header file that contains the custom heap provider definitions.
endmenu
config MOD_CFG_ENABLE_ATOMIC
bool "Enable Atomic Operations Support"
help
If enabled, the atomic operations will be used to protect critical sections.
This will make the system more stable without using a mutex or semaphore.
May not be available on some platforms like Cortex-M0.
default n if MOD_CFG_USE_OS_NONE
default y
config MOD_CFG_WFI_WHEN_SYSTEM_IDLE
bool "Call WFI when system is idle"
help
If enabled, the system will enter WFI mode when there is no task to run.
This will save power, but may cause some peripherals to stop working and avoid Debugger from connecting.
Effects KLite RTOS and Scheduler by now.
default n
config MOD_CFG_PLATFORM_HEADER
string "Platform Header File"
help
The header file that contains the platform specific definitions.
This file should be included in the main.c file.
default "\"main.h\""
endmenu
# Sub-Modules
source "*/Kconfig"