summaryrefslogtreecommitdiff
path: root/nuttx/lib/Kconfig
blob: e3348f26b6a0bceef4bd9d93978b47e8b69a6380 (plain) (blame)
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
#
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#

config STDIO_BUFFER_SIZE
	int "C STDIO buffer size"
	default 64
	---help---
		Size of buffers using within the C buffered I/O interfaces.
		(printf, putchar, fwrite, etc.).

config STDIO_LINEBUFFER
	bool "STDIO line buffering"
	default y
	---help---
		Flush buffer I/O whenever a newline character is found in
		the output data stream.

config NUNGET_CHARS
	int "Number unget() characters"
	default 2
	---help---
		Number of characters that can be buffered by ungetc() (Only if NFILE_STREAMS > 0)

config LIB_HOMEDIR
	string "Home directory"
	default "/"
	depends on !DISABLE_ENVIRON
	---help---
		The home directory to use with operations like such as 'cd ~'

config HAVE_LIBM
	bool "Architecture-specific libm.a"
	default n
	---help---
		Architecture specific logic provides an implementation of libm.a
		and a math.h header file that can be found at include/arch/math.h.

config NOPRINTF_FIELDWIDTH
	bool "Disable sprintf support fieldwidth"
	default n
	---help---
	sprintf-related logic is a
	little smaller if we do not support fieldwidthes

config LIBC_FLOATINGPOINT
	bool "Enable floating point in printf"
	default n
	---help---
		By default, floating point
		support in printf, sscanf, etc. is disabled.

config LIBC_STRERROR
	bool "Enable strerror"
	default n
	---help---
		strerror() is useful because it decodes 'errno' values into a human readable
		strings.  But it can also require a lot of memory.  If this option is selected,
		strerror() will still exist in the build but it will not decode error values.
		This option should be used by other logic to decide if it should use strerror()
		or not.  For example, the NSH application will not use strerror() if this
		option is not selected; perror() will not use strerror() is this option is not
		selected (see also NSH_STRERROR).

config LIBC_STRERROR_SHORT
	bool "Use short error descriptions in strerror()"
	default n
	depends on LIBC_STRERROR
	---help---
		If this option is selected, then strerror() will use a shortened string when
		it decodes the error.  Specifically, strerror() is simply use the string that
		is the common name for the error.  For example, the 'errno' value of 2 will
		produce the string "No such file or directory" is LIBC_STRERROR_SHORT
		is not defined but the string "ENOENT" is LIBC_STRERROR_SHORT is defined.

config LIBC_PERROR_STDOUT
	bool "perror() to stdout"
	default n
	---help---
		POSIX requires that perror() provide its output on stderr.  This option may
		be defined, however, to provide perror() output that is serialized with
		other stdout messages.

config ARCH_LOWPUTC
	bool "Low-level console output"
	default "y"
	---help---
		architecture supports low-level, boot time console output

config LIB_SENDFILE_BUFSIZE
	int "sendfile() buffer size"
	default 512
	---help---
		Size of the I/O buffer to allocate in sendfile().  Default: 512b

config ARCH_ROMGETC
	bool "Support for ROM string access"
	default n
	---help---
		In Harvard architectures, data accesses and instruction accesses
		occur on different busses, perhaps concurrently.  All data accesses
		are performed on the data bus unless special machine instructions
		are used to read data from the instruction address space.  Also, in
		the typical MCU, the available SRAM data memory is much smaller that
		the non-volatile FLASH instruction memory.  So if the application
		requires many constant strings, the only practical solution may be
		to store those constant strings in FLASH memory where they can only
		be accessed using architecture-specific machine instructions.

		If ARCH_ROMGETC is defined, then the architecture logic must export
		the function up_romgetc().  up_romgetc() will simply read one byte
		of data from the instruction space.

		If ARCH_ROMGETC, certain C stdio functions are effected: (1) All
		format strings in printf, fprintf, sprintf, etc. are assumed to lie
		in FLASH (string arguments for %s are still assumed to reside in SRAM).
		And (2), the string argument to puts and fputs is assumed to reside
		in FLASH.  Clearly, these assumptions may have to modified for the
		particular needs of your environment.  There is no "one-size-fits-all"
		solution for this problem.

config ARCH_OPTIMIZED_FUNCTIONS
	bool "Enable arch optimized functions"
	default n
	---help---
		Allow for architecture optimized implementations of certain library
		functions.  Architecture-specific implementations can improve overall
		system performance.

if ARCH_OPTIMIZED_FUNCTIONS
config ARCH_MEMCPY
	bool "memcpy"
	default n

config ARCH_MEMCMP
	bool "memcmp"
	default n

config ARCH_MEMMOVE
	bool "memmove"
	default n

config ARCH_MEMSET
	bool "memset"
	default n

config ARCH_STRCMP
	bool "strcmp"
	default n

config ARCH_STRCPY
	bool "strcpy"
	default n

config ARCH_STRNCPY
	bool "strncpy"
	default n

config ARCH_STRLEN
	bool "strlen"
	default n

config ARCH_STRNLEN
	bool "strlen"
	default n

config ARCH_BZERO
	bool "bzero"
	default n
endif

config ARCH_HEADER_FILES
	bool "Customize header files"
	default n
	---help---
		The architecture may provide custom versions of certain
		standard header files

if ARCH_HEADER_FILES
config ARCH_STDBOOL_H
	bool "stdbool.h"
	default n
	---help---
		The stdbool.h header file can be found at nuttx/include/stdbool.h.
		However, that header includes logic to redirect the inclusion of an
		architecture specific header file like:

		#ifdef CONFIG_ARCH_STDBOOL_H
		#  include <arch/stdbool.h>
		#else
		...
		#endif

		Recall that that include path, include/arch, is a symbolic link and
		will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.

config ARCH_MATH_H
	bool "math.h"
	default n
	---help---
		There is also a re-directing version of math.h in the source tree.
		However, it resides out-of-the-way at include/nuttx/math.h because it
		conflicts too often with the system math.h. If ARCH_MATH_H=y is
		defined, however, the top-level makefile will copy the redirecting
 		math.h header file from include/nuttx/math.h to include/math.h. math.h
		will then include the architecture-specific version of math.h that you
		must provide at nuttx/arch/>architecture</include/math.h.

		#ifdef CONFIG_ARCH_MATH_H
		#  include <arch/math.h>
		#endif

		So for the architectures that define ARCH_MATH_H=y, include/math.h
		will be the redirecting math.h header file; for the architectures
		that don't select ARCH_MATH_H, the redirecting math.h header file
		will stay out-of-the-way in include/nuttx/.

config ARCH_STDARG_H
	bool "stdarg.h"
	default n
	---help---
		There is also a redirecting version of stdarg.h in the source tree
		as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
		This is because you should normally use your toolchain's stdarg.h
		file. But sometimes, your toolchain's stdarg.h file may have other
		header file dependencies and so may not be usable in the NuttX build
		environment. In those cases, you may have to create a architecture-
		specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h

		If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
		re-directing stdarg.h header file from include/nuttx/stdarg.h to
		include/stdarg.h. So for the architectures that cannot use their
		toolchain's stdarg.h file, they can use this alternative by defining
		ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
		the stdarg.h header file will stay out-of-the-way in include/nuttx/.

endif