Linux Audio

Check our new training course

Loading...
  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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# Kconfig - miscellany configuration options

#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

menu "Compile and Link Features"

config KERNEL_BIN_NAME
	string "The kernel binary name"
	default "zephyr"
	help
	This option sets the name of the generated kernel binary.

config TEXT_SECTION_OFFSET
	hex "TEXT section offset"
	default 0
	help
	This sets and offset before the text section and allows booting images
	with custom headers that are inserted at the beginning of the image.

config HAVE_CUSTOM_LINKER_SCRIPT
	prompt "Custom linker scripts provided"
	def_bool n
	help
	Set this option if you have a custom linker script which needed to
	be define in CUSTOM_LINKER_SCRIPT.

config CUSTOM_LINKER_SCRIPT
	string "Path to custom linker script"
	default ""
	depends on HAVE_CUSTOM_LINKER_SCRIPT
	help
	Path to the linker script to be used instead of the one define by the
	board.

	The linker script must be based on a version provided by Zephyr since
	the kernel can expect a certain layout/certain regions.

	This is useful when an application needs to add sections into the
	linker script and avoid having to change the script provided by
	Zephyr.

config CROSS_COMPILE
	string "Cross-compiler tool prefix"
	help
	Same as running 'make CROSS_COMPILE=prefix-' but stored for
	default make runs in this kernel build directory.  You don't
	need to set this unless you want the configured kernel build
	directory to select the cross-compiler automatically.

config GDB_INFO
	bool
	prompt "Task-aware debugging with GDB"
	default n
	help
	  This option enables the kernel to collect additional information
	  during interrupts, exceptions, and context switches. This information
	  is required for task-aware debugging with GDB.

config LINK_WHOLE_ARCHIVE
	bool "Allow linking with --whole-archive"
	default n
	help
	This options allows linking external libraries with the
	--whole-archive option to keep all symbols.

config COMPILER_OPT
	string
	prompt "Custom compiler options"
	default ""
	help
	This option is a free-form string that is passed to the compiler
	when building all parts of a project (i.e. kernel).
	The compiler options specified by this string supplement the
	pre-defined set of compiler supplied by the build system,
	and can be used to change compiler optimization, warning and error
	messages, and so on.

config TOOLCHAIN_VARIANT
	string "Cross-compiler variant name"
	help
	For optimized compilers with reduced features, specify the name
	of the variant.

config CPLUSPLUS
	bool "Enable C++ support for the application"
	default n
	help
	This option enables the use of applications built with C++.

choice
prompt "C Library"
default MINIMAL_LIBC

config MINIMAL_LIBC
	bool
	prompt "Build minimal c library"
	help
	Build integrated minimal c library. This integrated library is available
	to support kernel functionality and test cases. It is not designed to be
	used with applications. For applications, please use an external C
	library such as newlib.

config NEWLIB_LIBC
	bool
	prompt "Build with newlib c library"
	help
	Build with newlib library. The newlib library is expected to be
	part of the SDK in this case.

endchoice

config NEWLIB_LIBC_FLOAT_PRINTF
	bool "Build with newlib float printf"
	default n
	depends on NEWLIB_LIBC
	help
	Build with floating point printf enabled. This will increase the size of
	the image.

config NEWLIB_LIBC_FLOAT_SCANF
	bool "Build with newlib float scanf"
	default n
	depends on NEWLIB_LIBC
	help
	Build with floating point scanf enabled. This will increase the size of
	the image.

config MINIMAL_LIBC_EXTENDED
	bool "Build additional libc functions [EXPERIMENTAL]"
	default n
	depends on MINIMAL_LIBC
	help
	This option enables building some optional libc functions that
	are not used directly by the kernel but can be used in applications.
	The option adds the following functions: strtoul, strtol, atoi,
	strncasecmp.
	Warning: Use the above functions only for testing, if you need to
	use any of the functions in an application you probably should be
	linking against a full lib c implementation instead.


endmenu

menu "Debugging Options"

config DEBUG
	bool "Build kernel with debugging enabled"
	default n
	help
	Build a kernel suitable for debugging.  Right now, this option
	only disables optimization, more debugging variants can be selected
	from here to allow more debugging.

config TASK_DEBUG
	bool
	prompt "Task debugging [EXPERIMENTAL]"
	default n
	help
	This option allows execution of all tasks (with the exception of
	essential system tasks) to be suspended so that debugging operations
	can be performed.

config STACK_USAGE
	bool "Generate stack usage information"
	default n
	help
	Generate  an extra file that specifies the maximum amount of stack used,
	on a per-function basis.

config PRINTK
	bool
	prompt "Send printk() to console"
	depends on CONSOLE_HAS_DRIVER
	default y
	help
	This option directs printk() debugging output to the supported
	console device, rather than suppressing the generation
	of printk() output entirely. Output is sent immediately, without
	any mutual exclusion or buffering.

config STDOUT_CONSOLE
	bool
	prompt "Send stdout to console"
	depends on CONSOLE_HAS_DRIVER
	default n
	help
	This option directs standard output (e.g. printf) to the console
	device, rather than suppressing it entirely.

config EARLY_CONSOLE
	bool
	prompt "Send stdout at the earliest stage possible"
	default n
	help
	This option will enable stdout as early as possible, for debugging
	purpose. For instance, in case of STDOUT_CONSOLE being set it will
	initialize its driver earlier than normal, in order to get the stdout
	sent through the console at the earliest stage possible.

config ASSERT
	bool
	prompt "Enable __ASSERT() macro"
	default n
	help
	This enables the __ASSERT() macro in the kernel code. If an assertion
	fails, the calling thread is put on an infinite tight loop. Since
	enabling this adds a significant footprint, it should only be enabled
	in a non-production system.

config ASSERT_LEVEL
	int
	prompt "__ASSERT() level"
	default 2
	range 0 2
	depends on ASSERT
	help
	This option specifies the assertion level used by the __ASSERT()
	macro. It can be set to one of three possible values:

	Level 0: off
	Level 1: on + warning in every file that includes __assert.h
	Level 2: on + no warning

config DEBUG_TRACING_KERNEL_OBJECTS
	bool
	prompt "Debug tracing object"
	default n
	help
	This option enable the feature for tracing kernel objects. This option
	is for debug purposes and increase the memory footprint of the kernel.

config OMIT_FRAME_POINTER
	bool
	prompt "Omit frame pointer"
	default n
	help
	Prevent the compiler from putting the stack frame pointer into a
	register. Saves a few instructions in function prologues/epilogues and
	frees up a register for general-purpose use, which can provide good
	performance improvements on register-constrained architectures like
	x86. Omitting frame pointers impedes debugging as local variables are
	harder to locate and it is much more difficult to produce a stack
	trace. Recommended only for production builds which do not need to be
	debugged.

source "misc/debug/Kconfig"

endmenu

menu "Logging Options"

config SYS_LOG
	bool
	prompt "Enable Logging"
	depends on PRINTK || STDOUT_CONSOLE
	default n
	help
	  Global switch for logging, when turned off log calls will not be
	  executed.

config SYS_LOG_SHOW_TAGS
	bool
	prompt "Prepend level tags to logs"
	depends on SYS_LOG
	default y
	help
	  Prefixes all log lines with an identifier to the log level submitted in
	  the C code.

config SYS_LOG_SHOW_COLOR
	bool
	prompt "Use colored logs"
	depends on SYS_LOG
	default n
	help
	  Use color in the logs. This requires an ANSI capable terminal.

config SYS_LOG_DEFAULT_LEVEL
	int
	prompt "Default log level"
	depends on SYS_LOG
	default 0
	range 0 4
	help
	  Sets log level for modules which don't specify it explicitly. When
	  set to 0 it means log wont be activated for those modules.
	  Levels are:
	  0 OFF, do not write by default
	  1 ERROR, default to only write SYS_LOG_ERR
	  2 WARNING, default to write SYS_LOG_WRN in adition to previous level
	  3 INFO, default to write SYS_LOG_INF in adition to previous levels
	  4 DEBUG, default to write SYS_LOG_DBG in adition to previous levels

config SYS_LOG_OVERRIDE_LEVEL
	int
	prompt "Override lowest log level"
	depends on SYS_LOG
	default 0
	range 0 4
	help
	  Forces a minimum log level for all modules. Modules use their
	  specified level if it is greater than this option, otherwise they use
	  the level specified by this option instead of their default or
	  whatever was manually set.
	  Levels are:
	  0 OFF, do not override
	  1 ERROR, override to write SYS_LOG_ERR
	  2 WARNING, override to write SYS_LOG_WRN in adition to previous level
	  3 INFO, override to write SYS_LOG_INF in adition to previous levels
	  4 DEBUG, override to write SYS_LOG_DBG in adition to previous levels

endmenu

menu "System Monitoring Options"

config PERFORMANCE_METRICS
	bool
	prompt "Enable performance metrics [EXPERIMENTAL]"
	default n
	help
	Enable Performance Metrics.

config BOOT_TIME_MEASUREMENT
	bool
	prompt "Boot time measurements [EXPERIMENTAL]"
	default n
	depends on PERFORMANCE_METRICS
	help
	This option enables the recording of timestamps during system start
	up. The global variable __start_tsc records the time kernel begins
	executing, while __main_tsc records when main() begins executing,
	and __idle_tsc records when the CPU becomes idle. All values are
	recorded in terms of CPU clock cycles since system reset.

config CPU_CLOCK_FREQ_MHZ
	int
	prompt "CPU CLock Frequency in MHz"
	default 20
	depends on BOOT_TIME_MEASUREMENT
	help
	This option specifies the CPU Clock Frequency in MHz in order to
	convert Intel RDTSC timestamp to microseconds.

endmenu

menu "Boot Options"

config IS_BOOTLOADER
	bool "Act as a bootloader"
	default n
	depends on XIP
	depends on ARM
	help
	This option indicates that Zephyr will act as a bootloader to execute
	a separate Zephyr image payload.

config BOOTLOADER_SRAM_SIZE
	int "SRAM reserved for when Zephyr acts as a bootloader"
	default 16
	depends on !XIP || IS_BOOTLOADER
	depends on ARM
	help
	This option specifies the amount of SRAM (measure in kB) reserved for
	when Zephyr is to act as a bootloader.

config BOOTLOADER_KEXEC
	bool
	prompt "Boot using Linux kexec() system call"
	depends on X86
	default n
	help
	This option signifies that Linux boots the kernel using kexec system call
	and utility. This method is used to boot the kernel over the network.

config BOOTLOADER_UNKNOWN
	bool
	prompt "Generic boot loader support"
	default n
	depends on X86
	help
	This option signifies that the target has a generic bootloader
	or that it supports multiple ways of booting and it isn't clear
	at build time which method is to be used. When this option is enabled
	the board may have to do extra work to ensure a proper startup.

config BOOTLOADER_CONTEXT_RESTORE
	bool
	prompt "Boot loader has context restore support"
	default y
	depends on SYS_POWER_DEEP_SLEEP && BOOTLOADER_CONTEXT_RESTORE_SUPPORTED
	help
	This option signifies that the target has a bootloader
	that restores CPU context upon resuming from deep sleep
	power state.

config REBOOT
	bool "Reboot functionality"
	default n
	select SYSTEM_CLOCK_DISABLE
	help
	Enable the sys_reboot() API. Enabling this can drag in other subsystems
	needed to perform a "safe" reboot (e.g. SYSTEM_CLOCK_DISABLE, to stop the
	system clock before issuing a reset).
endmenu