-
Notifications
You must be signed in to change notification settings - Fork 9
/
Kconfig
303 lines (258 loc) · 8.94 KB
/
Kconfig
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
menu "Board Support Package"
source "kernel/src/arch/Kconfig"
endmenu
#
# Mandatory
#
config ADAKERNEL
bool
default y
#
# Serial interface for debugging
#
config KERNEL_SERIAL
bool "Kernel serial interface activated (debug mode)"
default n
---help---
This option activates the kernel serial interface (mainly
for debugging purpose).
The kernel usart interface is activated.
Userspace applications printf content will be printed by
the kernel.
This should be disabled in production mode.
config KERNEL_MODE
string
default "debug" if KERNEL_SERIAL
default "release" if !KERNEL_SERIAL
if KERNEL_SERIAL
choice
prompt "kernel console USART identifier"
default KERNEL_CONSOLE_USART1
config KERNEL_CONSOLE_USART1
bool "kernel uses USART1 for its console"
---help---
In Discovery board, PB6(TX)/PB7(RX) pins are linked to UART1, if
using motherboard DM-STF4BB, the RS232 connector is linked
to USART6.
config KERNEL_CONSOLE_USART4
bool "kernel uses USART4 for its console"
---help---
In Discovery board, PB6(TX)/PB7(RX) pins are linked to UART1, if
using motherboard DM-STF4BB, the RS232 connector is linked
to USART4.
config KERNEL_CONSOLE_USART6
bool "kernel uses USART6 for its console"
---help---
In Discovery board, PB6(TX)/PB7(RX) pins are linked to UART1, if
using motherboard DM-STF4BB, the RS232 connector is linked
to USART6.
endchoice
config KERNEL_USART
int
default 1 if KERNEL_CONSOLE_USART1
default 4 if KERNEL_CONSOLE_USART4
default 6 if KERNEL_CONSOLE_USART6
endif
choice
prompt "Kernel Panic behavior"
default KERNEL_PANIC_FREEZE
config KERNEL_PANIC_FAULT
bool "Set the task as fault"
---help---
When a panic() happen due to a userspace fault, lock the
responsible task, making it unschedulable. Other task can
still be schedule. This imply a new scheduling event.
INFO: This is not a safe behavior on embedded systems!
config KERNEL_PANIC_FREEZE
bool "Freeze on panic"
---help---
Freeze the system on kernel panic(). This freeze the execution.
All the software stack is still mapped in flash and RAM. Useful
for debugging purpose.
config KERNEL_PANIC_REBOOT
bool "Reboot on panic"
---help---
Reboot the system on kernel panic(). This force the device to
reboot but the memory content is zeroified only at boot time.
config KERNEL_PANIC_WIPE
bool "Wipe the applications data and reboot"
---help---
Wipe the applications data in RAM with zero and then reboot
the device. This avoid attacks using panic & reboot action to
get back the RAM content at early reboot time
endchoice
config KERNEL_DMA_ENABLE
bool "Enable secure DMA kernel support"
default y
---help---
This permits to allow tasks to declare DMA stream usage with
kernel control for address and channel management. If you
say n here, any DMA declaration will return SYS_E_DENIED.
if KERNEL_DMA_ENABLE
config KERNEL_DMA_DIRECTCOPY
bool "Enable memory to memory DMA transfers (may be dangerous)"
default n
---help---
This allows tasks to transfer content from reachable memory to
another reachable memory through DMA (not a device). Reachable memory
can be any .rodata, .data, .bss or .heap content or any previously
registered DMA-SHM content (with respect for read/write access to it).
endif
config KERNEL_GETCYCLES
bool "Kernel support for DWT-based getcycles()"
default y
depends on STM32F4
select DWT
---help---
Add support for sys_getcycles() syscall, which returns a value
in cycles instead of ticks, which is more precise.
config KERNEL_DOMAIN
bool "Kernel support tasks domains"
default n
---help---
If yes, it is possible to set a specific domain for each task (based on
a uint8_t value). Task from a same domain can communicate, tasks from
different domains cannot (no IPC, no shared DMA spaces, get_taskid return
SYS_E_INVAL, etc.). Each task can declare its domain as 'APP_APPNAME_DOMAIN'
in the Kconfig system. If no domain is specific, the task is member of the
default domain 0. Kernel domains has no impact on the scheduling scheme.
menu "Scheduling schemes"
choice
prompt "Scheduler behavior"
config SCHED_RR
bool "Round Robin scheduler"
---help---
This is a classical Round Robin scheduler. ISR are still
executed with a higher priority than the tasks.
config SCHED_MLQ_RR
bool "Multilevel Queue Round Robin"
---help---
This is a basic, multilevel queues scheduling scheme with Round
Robin scheduling for each queue. As priority as fixed,
higher priority tasks *must* yield to let other task's main
thread being executed.
It is efficient for burst-based, high period and high priority
tasks such as smartcard management.
config SCHED_RAND
bool "Random scheduler"
---help---
Randomly choose a task in the task list at each schedule
time, using the HW Random number generator.
endchoice
config SCHED_PERIOD
int "Scheduler period (in milliseconds)"
default 10
---help---
Set the scheduling period duration. Beware, this value has a huge
impact on the overall system behavior.
config SCHED_SUPPORT_FISR
bool "ISR may force immediate one time main thread execution (perm based)"
default y
---help---
If y, the kernel support the TSK_FISR permission and associated
behavior. This permit to tasks with this permission to force one single
immediate schedule of its main thread just after a given ISR which
as been configured with the flag IRQ_ISR_FORCE_MAINTHREAD.
This execution slot can still be preempted by a physical IRQ or another
ISR scheduling.
config SCHED_SUPPORT_FIPC
bool "IPC send may force immediate one time target task execution (perm based)"
default n
---help---
If y, the kernel support the TSK_FIPC permission and associated behavior.
This permit to a task sending an IPC with reactivity constraint to force
one signe immediate schedule of the target task, if this task is waiting for
this IPC only. This highly reduce IPC latency but is still a scheduling violation.
This execution slot can still be preempted by a physical IRQ or another
ISR scheduling.
endmenu
choice
prompt "Kernel specific build size selection"
default KERN_OPTIM_SIZE
config KERN_OPTIM_SIZE
bool "Optimized for size (-Os)"
config KERN_OPTIM_HYBRID
bool "Optimized for size (-Os) and for performance for critical modules (-O2)"
config KERN_OPTIM_PERF
bool "Optimized for perf (-O2)"
endchoice
config KERN_CFLAGS
string
default "-O2" if KERN_OPTIM_PERF
default "-Os" if KERN_OPTIM_HYBRID
default "-Os" if KERN_OPTIM_SIZE
config KERNEL_ADA_BUILDSIZE
string
default "perf" if KERN_OPTIM_PERF
default "hybrid" if KERN_OPTIM_HYBRID
default "size" if KERN_OPTIM_SIZE
menu "Kernel hacking"
config KERNEL_SOFTIRQ_QUEUE_DEPTH
int "Kernel softirq input queue depth"
range 16 128
default 20
---help---
Specify the maximum number of ISR waiting to be executed at a given time.
This value can be increased up to 64 depending on the devices behavior,
if there interrupt bursts arrise, generating queue overflow.
The kernel consider a queue overflow as a critical event and panic.
config DBGLEVEL
int "Set debug level"
default 3
help
Set the debug level for pretty printing at runtime. This respects
the syslog levels standard:
0: EMERG
1: ALERT
2: CRITICAL
3: ERROR
4: WARNING
5: NOTICE
6: INFORMATIONAL
7: DEBUG
All debug levels less or equal to the chosen level will be printed.
config DEBUG
bool "Set debug compile flags"
default n
help
if set, the project will be compiled using debug flags and without
compile-time optimization.
config KERNEL_SCHED_DEBUG
bool "Activate scheduler debugging"
default n
help
If set, the scheduler will store in a ring buffer all thread execution
using the following structure:
[ id | timestamp (us) | mode (ISR,MR) ]
The ringbuffer is never printed-out to avoid any time overhead. Yet it
can be dumped by gdb at anytime
if KERNEL_SCHED_DEBUG
config KERNEL_SCHED_DEBUG_BUFSIZE
int "Scheduling buffer size"
default 1000
help
Set the ring buffer base address. Beware, you must set a writeable address
in RAM where no content is being stored)
endif
config KERNEL_EXPERT_MODE
bool "Configure EwoK in expert mode"
default n
---help---
Make complex options visible. Beware when modifying
these options. They may have a great impact on the
kernel behavior and make the overall system unstable!!!
if KERNEL_EXPERT_MODE
config KERNEL_EXP_REENTRANCY
bool "(Experimental) Enable handler mode reentrancy support"
default n
---help---
Make kernel interruption handling reentrant to support
IRQ preemptions and handling reentrancy based on hardware
interrupts priorities
endif
endmenu
# Ewok kernel. Require its stdlib
config KERNEL_EWOK
bool
select USR_LIB_STD
default y