1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) |
---|
4 | .. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR) |
---|
5 | |
---|
6 | General System Configuration |
---|
7 | ============================ |
---|
8 | |
---|
9 | This section describes general system configuration options. |
---|
10 | |
---|
11 | .. index:: CONFIGURE_DIRTY_MEMORY |
---|
12 | |
---|
13 | .. _CONFIGURE_DIRTY_MEMORY: |
---|
14 | |
---|
15 | CONFIGURE_DIRTY_MEMORY |
---|
16 | ---------------------- |
---|
17 | |
---|
18 | CONSTANT: |
---|
19 | ``CONFIGURE_DIRTY_MEMORY`` |
---|
20 | |
---|
21 | OPTION TYPE: |
---|
22 | This configuration option is a boolean feature define. |
---|
23 | |
---|
24 | DEFAULT CONFIGURATION: |
---|
25 | If this configuration option is undefined, then the described feature is not |
---|
26 | enabled. |
---|
27 | |
---|
28 | DESCRIPTION: |
---|
29 | In case this configuration option is defined, then the memory areas used for |
---|
30 | the RTEMS Workspace and the C Program Heap are dirtied with a ``0xCF`` byte |
---|
31 | pattern during system initialization. |
---|
32 | |
---|
33 | NOTES: |
---|
34 | Dirtying memory can add significantly to system initialization time. It may |
---|
35 | assist in finding code that incorrectly assumes the contents of free memory |
---|
36 | areas is cleared to zero during system initialization. In case |
---|
37 | :ref:`CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY` is also defined, then the |
---|
38 | memory is first dirtied and then zeroed. |
---|
39 | |
---|
40 | See also :ref:`CONFIGURE_MALLOC_DIRTY`. |
---|
41 | |
---|
42 | .. index:: CONFIGURE_DISABLE_NEWLIB_REENTRANCY |
---|
43 | |
---|
44 | .. _CONFIGURE_DISABLE_NEWLIB_REENTRANCY: |
---|
45 | |
---|
46 | CONFIGURE_DISABLE_NEWLIB_REENTRANCY |
---|
47 | ----------------------------------- |
---|
48 | |
---|
49 | CONSTANT: |
---|
50 | ``CONFIGURE_DISABLE_NEWLIB_REENTRANCY`` |
---|
51 | |
---|
52 | OPTION TYPE: |
---|
53 | This configuration option is a boolean feature define. |
---|
54 | |
---|
55 | DEFAULT CONFIGURATION: |
---|
56 | If this configuration option is undefined, then the described feature is not |
---|
57 | enabled. |
---|
58 | |
---|
59 | DESCRIPTION: |
---|
60 | In case this configuration option is defined, then the Newlib reentrancy |
---|
61 | support per thread is disabled and a global reentrancy structure is used. |
---|
62 | |
---|
63 | NOTES: |
---|
64 | You can enable this option to reduce the size of the :term:`TCB`. Use this |
---|
65 | option with care, since it can lead to race conditions and undefined system |
---|
66 | behaviour. For example, :c:data:`errno` is no longer a thread-local variable |
---|
67 | if this option is enabled. |
---|
68 | |
---|
69 | .. index:: CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
70 | |
---|
71 | .. _CONFIGURE_EXECUTIVE_RAM_SIZE: |
---|
72 | |
---|
73 | CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
74 | ---------------------------- |
---|
75 | |
---|
76 | CONSTANT: |
---|
77 | ``CONFIGURE_EXECUTIVE_RAM_SIZE`` |
---|
78 | |
---|
79 | OPTION TYPE: |
---|
80 | This configuration option is an integer define. |
---|
81 | |
---|
82 | DEFAULT VALUE: |
---|
83 | If this configuration option is undefined, then the RTEMS Workspace and task |
---|
84 | stack space size is calculated by ``<rtems/confdefs.h>`` based on the values |
---|
85 | configuration options. |
---|
86 | |
---|
87 | VALUE CONSTRAINTS: |
---|
88 | The value of this configuration option shall satisfy all of the following |
---|
89 | constraints: |
---|
90 | |
---|
91 | * It shall be greater than or equal to 0. |
---|
92 | |
---|
93 | * It shall be less than or equal to ``UINTPTR_MAX``. |
---|
94 | |
---|
95 | * It shall be less than or equal to a |
---|
96 | BSP-specific and application-specific value which depends on the size of the |
---|
97 | memory available to the application. |
---|
98 | |
---|
99 | DESCRIPTION: |
---|
100 | The value of this configuration option defines the RTEMS Workspace size in |
---|
101 | bytes. |
---|
102 | |
---|
103 | NOTES: |
---|
104 | This is an advanced configuration option. Use it only if you know exactly |
---|
105 | what you are doing. |
---|
106 | |
---|
107 | .. index:: CONFIGURE_EXTRA_TASK_STACKS |
---|
108 | .. index:: memory for task tasks |
---|
109 | |
---|
110 | .. _CONFIGURE_EXTRA_TASK_STACKS: |
---|
111 | |
---|
112 | CONFIGURE_EXTRA_TASK_STACKS |
---|
113 | --------------------------- |
---|
114 | |
---|
115 | CONSTANT: |
---|
116 | ``CONFIGURE_EXTRA_TASK_STACKS`` |
---|
117 | |
---|
118 | OPTION TYPE: |
---|
119 | This configuration option is an integer define. |
---|
120 | |
---|
121 | DEFAULT VALUE: |
---|
122 | The default value is 0. |
---|
123 | |
---|
124 | VALUE CONSTRAINTS: |
---|
125 | The value of this configuration option shall satisfy all of the following |
---|
126 | constraints: |
---|
127 | |
---|
128 | * It shall be greater than or equal to 0. |
---|
129 | |
---|
130 | * It shall be small enough so that the task |
---|
131 | stack space calculation carried out by ``<rtems/confdefs.h>`` does not |
---|
132 | overflow an integer of type ``uintptr_t``. |
---|
133 | |
---|
134 | DESCRIPTION: |
---|
135 | The value of this configuration option defines the number of bytes the |
---|
136 | applications wishes to add to the task stack requirements calculated by |
---|
137 | ``<rtems/confdefs.h>``. |
---|
138 | |
---|
139 | NOTES: |
---|
140 | This parameter is very important. If the application creates tasks with |
---|
141 | stacks larger then the minimum, then that memory is **not** accounted for by |
---|
142 | ``<rtems/confdefs.h>``. |
---|
143 | |
---|
144 | .. index:: CONFIGURE_INITIAL_EXTENSIONS |
---|
145 | |
---|
146 | .. _CONFIGURE_INITIAL_EXTENSIONS: |
---|
147 | |
---|
148 | CONFIGURE_INITIAL_EXTENSIONS |
---|
149 | ---------------------------- |
---|
150 | |
---|
151 | CONSTANT: |
---|
152 | ``CONFIGURE_INITIAL_EXTENSIONS`` |
---|
153 | |
---|
154 | OPTION TYPE: |
---|
155 | This configuration option is an initializer define. |
---|
156 | |
---|
157 | DEFAULT VALUE: |
---|
158 | The default value is the empty list. |
---|
159 | |
---|
160 | VALUE CONSTRAINTS: |
---|
161 | The value of this configuration option shall be a list of initializers for |
---|
162 | structures of type :c:type:`rtems_extensions_table`. |
---|
163 | |
---|
164 | DESCRIPTION: |
---|
165 | The value of this configuration option is used to initialize the table of |
---|
166 | initial user extensions. |
---|
167 | |
---|
168 | NOTES: |
---|
169 | The value of this configuration option is placed before the entries of |
---|
170 | :ref:`BSP_INITIAL_EXTENSION` and after the entries of all other initial |
---|
171 | user extensions. |
---|
172 | |
---|
173 | .. index:: CONFIGURE_INTERRUPT_STACK_SIZE |
---|
174 | .. index:: interrupt stack size |
---|
175 | |
---|
176 | .. _CONFIGURE_INTERRUPT_STACK_SIZE: |
---|
177 | |
---|
178 | CONFIGURE_INTERRUPT_STACK_SIZE |
---|
179 | ------------------------------ |
---|
180 | |
---|
181 | CONSTANT: |
---|
182 | ``CONFIGURE_INTERRUPT_STACK_SIZE`` |
---|
183 | |
---|
184 | OPTION TYPE: |
---|
185 | This configuration option is an integer define. |
---|
186 | |
---|
187 | DEFAULT VALUE: |
---|
188 | The default value is :ref:`BSP_INTERRUPT_STACK_SIZE` in case it is defined, |
---|
189 | otherwise the default value is ``CPU_STACK_MINIMUM_SIZE``. |
---|
190 | |
---|
191 | VALUE CONSTRAINTS: |
---|
192 | The value of this configuration option shall satisfy all of the following |
---|
193 | constraints: |
---|
194 | |
---|
195 | * It shall be greater than or equal to a |
---|
196 | BSP-specific and application-specific minimum value. |
---|
197 | |
---|
198 | * It shall be small enough so that the |
---|
199 | interrupt stack area calculation carried out by ``<rtems/confdefs.h>`` does |
---|
200 | not overflow an integer of type ``size_t``. |
---|
201 | |
---|
202 | * It shall be aligned according to |
---|
203 | ``CPU_INTERRUPT_STACK_ALIGNMENT``. |
---|
204 | |
---|
205 | DESCRIPTION: |
---|
206 | The value of this configuration option defines the size of an interrupt stack |
---|
207 | in bytes. |
---|
208 | |
---|
209 | NOTES: |
---|
210 | There is one interrupt stack available for each configured processor |
---|
211 | (:ref:`CONFIGURE_MAXIMUM_PROCESSORS`). The interrupt stack areas are |
---|
212 | statically allocated in a special linker section (``.rtemsstack.interrupt``). |
---|
213 | The placement of this linker section is BSP-specific. |
---|
214 | |
---|
215 | Some BSPs use the interrupt stack as the initialization stack which is used |
---|
216 | to perform the sequential system initialization before the multithreading |
---|
217 | is started. |
---|
218 | |
---|
219 | The interrupt stacks are covered by the :ref:`stack checker |
---|
220 | <CONFIGURE_STACK_CHECKER_ENABLED>`. However, using a too small interrupt |
---|
221 | stack size may still result in undefined behaviour. |
---|
222 | |
---|
223 | In releases before RTEMS 5.1 the default value was |
---|
224 | :ref:`CONFIGURE_MINIMUM_TASK_STACK_SIZE` instead of ``CPU_STACK_MINIMUM_SIZE``. |
---|
225 | |
---|
226 | .. index:: CONFIGURE_MALLOC_DIRTY |
---|
227 | |
---|
228 | .. _CONFIGURE_MALLOC_DIRTY: |
---|
229 | |
---|
230 | CONFIGURE_MALLOC_DIRTY |
---|
231 | ---------------------- |
---|
232 | |
---|
233 | CONSTANT: |
---|
234 | ``CONFIGURE_MALLOC_DIRTY`` |
---|
235 | |
---|
236 | OPTION TYPE: |
---|
237 | This configuration option is a boolean feature define. |
---|
238 | |
---|
239 | DEFAULT CONFIGURATION: |
---|
240 | If this configuration option is undefined, then the described feature is not |
---|
241 | enabled. |
---|
242 | |
---|
243 | DESCRIPTION: |
---|
244 | In case this configuration option is defined, then each memory area returned |
---|
245 | by C Program Heap allocator functions such as :c:func:`malloc` is dirtied |
---|
246 | with a ``0xCF`` byte pattern before it is handed over to the application. |
---|
247 | |
---|
248 | NOTES: |
---|
249 | The dirtying performed by this option is carried out for each successful |
---|
250 | memory allocation from the C Program Heap in contrast to |
---|
251 | :ref:`CONFIGURE_DIRTY_MEMORY` which dirties the memory only once during the |
---|
252 | system initialization. |
---|
253 | |
---|
254 | .. index:: CONFIGURE_MAXIMUM_FILE_DESCRIPTORS |
---|
255 | .. index:: maximum file descriptors |
---|
256 | |
---|
257 | .. _CONFIGURE_MAXIMUM_FILE_DESCRIPTORS: |
---|
258 | |
---|
259 | CONFIGURE_MAXIMUM_FILE_DESCRIPTORS |
---|
260 | ---------------------------------- |
---|
261 | |
---|
262 | CONSTANT: |
---|
263 | ``CONFIGURE_MAXIMUM_FILE_DESCRIPTORS`` |
---|
264 | |
---|
265 | OPTION TYPE: |
---|
266 | This configuration option is an integer define. |
---|
267 | |
---|
268 | DEFAULT VALUE: |
---|
269 | The default value is 3. |
---|
270 | |
---|
271 | VALUE CONSTRAINTS: |
---|
272 | The value of this configuration option shall satisfy all of the following |
---|
273 | constraints: |
---|
274 | |
---|
275 | * It shall be greater than or equal to 0. |
---|
276 | |
---|
277 | * It shall be less than or equal to ``SIZE_MAX``. |
---|
278 | |
---|
279 | * It shall be less than or equal to a |
---|
280 | BSP-specific and application-specific value which depends on the size of the |
---|
281 | memory available to the application. |
---|
282 | |
---|
283 | DESCRIPTION: |
---|
284 | The value of this configuration option defines the maximum number of file |
---|
285 | like objects that can be concurrently open. |
---|
286 | |
---|
287 | NOTES: |
---|
288 | The default value of three file descriptors allows RTEMS to support standard |
---|
289 | input, output, and error I/O streams on ``/dev/console``. |
---|
290 | |
---|
291 | .. index:: CONFIGURE_MAXIMUM_PROCESSORS |
---|
292 | |
---|
293 | .. _CONFIGURE_MAXIMUM_PROCESSORS: |
---|
294 | |
---|
295 | CONFIGURE_MAXIMUM_PROCESSORS |
---|
296 | ---------------------------- |
---|
297 | |
---|
298 | CONSTANT: |
---|
299 | ``CONFIGURE_MAXIMUM_PROCESSORS`` |
---|
300 | |
---|
301 | OPTION TYPE: |
---|
302 | This configuration option is an integer define. |
---|
303 | |
---|
304 | DEFAULT VALUE: |
---|
305 | The default value is 1. |
---|
306 | |
---|
307 | VALUE CONSTRAINTS: |
---|
308 | The value of this configuration option shall be greater than or equal to 0 |
---|
309 | and less than or equal to ``CPU_MAXIMUM_PROCESSORS``. |
---|
310 | |
---|
311 | DESCRIPTION: |
---|
312 | The value of this configuration option defines the maximum number of |
---|
313 | processors an application intends to use. The number of actually available |
---|
314 | processors depends on the hardware and may be less. It is recommended to use |
---|
315 | the smallest value suitable for the application in order to save memory. |
---|
316 | Each processor needs an IDLE task stack and interrupt stack for example. |
---|
317 | |
---|
318 | NOTES: |
---|
319 | If there are more processors available than configured, the rest will be |
---|
320 | ignored. |
---|
321 | |
---|
322 | This configuration option is only evaluated in SMP configurations (e.g. RTEMS |
---|
323 | was built with the ``--enable-smp`` build configuration option). In all |
---|
324 | other configurations it has no effect. |
---|
325 | |
---|
326 | .. index:: CONFIGURE_MAXIMUM_THREAD_NAME_SIZE |
---|
327 | .. index:: maximum thread name size |
---|
328 | |
---|
329 | .. _CONFIGURE_MAXIMUM_THREAD_NAME_SIZE: |
---|
330 | |
---|
331 | CONFIGURE_MAXIMUM_THREAD_NAME_SIZE |
---|
332 | ---------------------------------- |
---|
333 | |
---|
334 | CONSTANT: |
---|
335 | ``CONFIGURE_MAXIMUM_THREAD_NAME_SIZE`` |
---|
336 | |
---|
337 | OPTION TYPE: |
---|
338 | This configuration option is an integer define. |
---|
339 | |
---|
340 | DEFAULT VALUE: |
---|
341 | The default value is 16. |
---|
342 | |
---|
343 | VALUE CONSTRAINTS: |
---|
344 | The value of this configuration option shall satisfy all of the following |
---|
345 | constraints: |
---|
346 | |
---|
347 | * It shall be greater than or equal to 0. |
---|
348 | |
---|
349 | * It shall be less than or equal to ``SIZE_MAX``. |
---|
350 | |
---|
351 | * It shall be less than or equal to a |
---|
352 | BSP-specific and application-specific value which depends on the size of the |
---|
353 | memory available to the application. |
---|
354 | |
---|
355 | DESCRIPTION: |
---|
356 | The value of this configuration option defines the maximum thread name size |
---|
357 | including the terminating ``NUL`` character. |
---|
358 | |
---|
359 | NOTES: |
---|
360 | The default value was chosen for Linux compatibility, see |
---|
361 | `PTHREAD_SETNAME_NP(3) <http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html>`_. |
---|
362 | |
---|
363 | The size of the thread control block is increased by the maximum thread name |
---|
364 | size. |
---|
365 | |
---|
366 | This configuration option is available since RTEMS 5.1. |
---|
367 | |
---|
368 | .. index:: CONFIGURE_MEMORY_OVERHEAD |
---|
369 | |
---|
370 | .. _CONFIGURE_MEMORY_OVERHEAD: |
---|
371 | |
---|
372 | CONFIGURE_MEMORY_OVERHEAD |
---|
373 | ------------------------- |
---|
374 | |
---|
375 | CONSTANT: |
---|
376 | ``CONFIGURE_MEMORY_OVERHEAD`` |
---|
377 | |
---|
378 | OPTION TYPE: |
---|
379 | This configuration option is an integer define. |
---|
380 | |
---|
381 | DEFAULT VALUE: |
---|
382 | The default value is 0. |
---|
383 | |
---|
384 | VALUE CONSTRAINTS: |
---|
385 | The value of this configuration option shall satisfy all of the following |
---|
386 | constraints: |
---|
387 | |
---|
388 | * It shall be greater than or equal to 0. |
---|
389 | |
---|
390 | * It shall be less than or equal to a |
---|
391 | BSP-specific and application-specific value which depends on the size of the |
---|
392 | memory available to the application. |
---|
393 | |
---|
394 | * It shall be small enough so that the |
---|
395 | RTEMS Workspace size calculation carried out by ``<rtems/confdefs.h>`` does |
---|
396 | not overflow an integer of type ``uintptr_t``. |
---|
397 | |
---|
398 | DESCRIPTION: |
---|
399 | The value of this configuration option defines the number of kilobytes the |
---|
400 | application wishes to add to the RTEMS Workspace size calculated by |
---|
401 | ``<rtems/confdefs.h>``. |
---|
402 | |
---|
403 | NOTES: |
---|
404 | This configuration option should only be used when it is suspected that a bug |
---|
405 | in ``<rtems/confdefs.h>`` has resulted in an underestimation. Typically the |
---|
406 | memory allocation will be too low when an application does not account for |
---|
407 | all message queue buffers or task stacks, see |
---|
408 | :ref:`CONFIGURE_MESSAGE_BUFFER_MEMORY`. |
---|
409 | |
---|
410 | .. index:: CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
411 | .. index:: configure message queue buffer memory |
---|
412 | .. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE |
---|
413 | .. index:: memory for a single message queue's buffers |
---|
414 | |
---|
415 | .. _CONFIGURE_MESSAGE_BUFFER_MEMORY: |
---|
416 | |
---|
417 | CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
418 | ------------------------------- |
---|
419 | |
---|
420 | CONSTANT: |
---|
421 | ``CONFIGURE_MESSAGE_BUFFER_MEMORY`` |
---|
422 | |
---|
423 | OPTION TYPE: |
---|
424 | This configuration option is an integer define. |
---|
425 | |
---|
426 | DEFAULT VALUE: |
---|
427 | The default value is 0. |
---|
428 | |
---|
429 | VALUE CONSTRAINTS: |
---|
430 | The value of this configuration option shall satisfy all of the following |
---|
431 | constraints: |
---|
432 | |
---|
433 | * It shall be greater than or equal to 0. |
---|
434 | |
---|
435 | * It shall be less than or equal to a |
---|
436 | BSP-specific and application-specific value which depends on the size of the |
---|
437 | memory available to the application. |
---|
438 | |
---|
439 | * It shall be small enough so that the |
---|
440 | RTEMS Workspace size calculation carried out by ``<rtems/confdefs.h>`` does |
---|
441 | not overflow an integer of type ``uintptr_t``. |
---|
442 | |
---|
443 | DESCRIPTION: |
---|
444 | The value of this configuration option defines the number of bytes reserved |
---|
445 | for message queue buffers in the RTEMS Workspace. |
---|
446 | |
---|
447 | NOTES: |
---|
448 | The configuration options :ref:`CONFIGURE_MAXIMUM_MESSAGE_QUEUES` and |
---|
449 | :ref:`CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES` define only how many message |
---|
450 | queues can be created by the application. The memory for the message |
---|
451 | buffers is configured by this option. For each message queue you have to |
---|
452 | reserve some memory for the message buffers. The size dependes on the |
---|
453 | maximum number of pending messages and the maximum size of the messages of |
---|
454 | a message queue. Use the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` macro |
---|
455 | to specify the message buffer memory for each message queue and sum them up |
---|
456 | to define the value for ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``. |
---|
457 | |
---|
458 | The interface for the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` help |
---|
459 | macro is as follows: |
---|
460 | |
---|
461 | .. code-block:: c |
---|
462 | |
---|
463 | CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( max_messages, max_msg_size ) |
---|
464 | |
---|
465 | Where ``max_messages`` is the maximum number of pending messages and |
---|
466 | ``max_msg_size`` is the maximum size in bytes of the messages of the |
---|
467 | corresponding message queue. Both parameters shall be compile time |
---|
468 | constants. Not using this help macro (e.g. just using |
---|
469 | ``max_messages * max_msg_size``) may result in an underestimate of the |
---|
470 | RTEMS Workspace size. |
---|
471 | |
---|
472 | The following example illustrates how the |
---|
473 | `CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()` help macro can be used to assist in |
---|
474 | calculating the message buffer memory required. In this example, there are |
---|
475 | two message queues used in this application. The first message queue has a |
---|
476 | maximum of 24 pending messages with the message structure defined by the |
---|
477 | type ``one_message_type``. The other message queue has a maximum of 500 |
---|
478 | pending messages with the message structure defined by the type |
---|
479 | ``other_message_type``. |
---|
480 | |
---|
481 | .. code-block:: c |
---|
482 | |
---|
483 | #define CONFIGURE_MESSAGE_BUFFER_MEMORY ( \ |
---|
484 | CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ |
---|
485 | 24, \ |
---|
486 | sizeof( one_message_type ) \ |
---|
487 | ) \ |
---|
488 | + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \ |
---|
489 | 500, \ |
---|
490 | sizeof( other_message_type ) \ |
---|
491 | ) \ |
---|
492 | ) |
---|
493 | |
---|
494 | .. index:: CONFIGURE_MICROSECONDS_PER_TICK |
---|
495 | .. index:: clock tick quantum |
---|
496 | .. index:: tick quantum |
---|
497 | |
---|
498 | .. _CONFIGURE_MICROSECONDS_PER_TICK: |
---|
499 | |
---|
500 | CONFIGURE_MICROSECONDS_PER_TICK |
---|
501 | ------------------------------- |
---|
502 | |
---|
503 | CONSTANT: |
---|
504 | ``CONFIGURE_MICROSECONDS_PER_TICK`` |
---|
505 | |
---|
506 | OPTION TYPE: |
---|
507 | This configuration option is an integer define. |
---|
508 | |
---|
509 | DEFAULT VALUE: |
---|
510 | The default value is 10000. |
---|
511 | |
---|
512 | VALUE CONSTRAINTS: |
---|
513 | The value of this configuration option shall satisfy all of the following |
---|
514 | constraints: |
---|
515 | |
---|
516 | * It shall be greater than or equal to a Clock Driver specific value. |
---|
517 | |
---|
518 | * It shall be less than or equal to a Clock Driver specific value. |
---|
519 | |
---|
520 | * The resulting clock ticks per second should be an integer. |
---|
521 | |
---|
522 | DESCRIPTION: |
---|
523 | The value of this configuration option defines the length of time in |
---|
524 | microseconds between clock ticks (clock tick quantum). |
---|
525 | |
---|
526 | When the clock tick quantum value is too low, the system will spend so much |
---|
527 | time processing clock ticks that it does not have processing time available |
---|
528 | to perform application work. In this case, the system will become |
---|
529 | unresponsive. |
---|
530 | |
---|
531 | The lowest practical time quantum varies widely based upon the speed of the |
---|
532 | target hardware and the architectural overhead associated with |
---|
533 | interrupts. In general terms, you do not want to configure it lower than is |
---|
534 | needed for the application. |
---|
535 | |
---|
536 | The clock tick quantum should be selected such that it all blocking and |
---|
537 | delay times in the application are evenly divisible by it. Otherwise, |
---|
538 | rounding errors will be introduced which may negatively impact the |
---|
539 | application. |
---|
540 | |
---|
541 | NOTES: |
---|
542 | This configuration option has no impact if the Clock Driver is not |
---|
543 | configured, see :ref:`CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`. |
---|
544 | |
---|
545 | There may be Clock Driver specific limits on the resolution or maximum value |
---|
546 | of a clock tick quantum. |
---|
547 | |
---|
548 | .. index:: CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
549 | .. index:: minimum task stack size |
---|
550 | |
---|
551 | .. _CONFIGURE_MINIMUM_TASK_STACK_SIZE: |
---|
552 | |
---|
553 | CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
554 | --------------------------------- |
---|
555 | |
---|
556 | CONSTANT: |
---|
557 | ``CONFIGURE_MINIMUM_TASK_STACK_SIZE`` |
---|
558 | |
---|
559 | OPTION TYPE: |
---|
560 | This configuration option is an integer define. |
---|
561 | |
---|
562 | DEFAULT VALUE: |
---|
563 | The default value is ``CPU_STACK_MINIMUM_SIZE``. |
---|
564 | |
---|
565 | VALUE CONSTRAINTS: |
---|
566 | The value of this configuration option shall satisfy all of the following |
---|
567 | constraints: |
---|
568 | |
---|
569 | * It shall be small enough so that the task |
---|
570 | stack space calculation carried out by ``<rtems/confdefs.h>`` does not |
---|
571 | overflow an integer of type ``uintptr_t``. |
---|
572 | |
---|
573 | * It shall be greater than or equal to a |
---|
574 | BSP-specific and application-specific minimum value. |
---|
575 | |
---|
576 | DESCRIPTION: |
---|
577 | The value of this configuration option defines the minimum stack size in |
---|
578 | bytes for every user task or thread in the system. |
---|
579 | |
---|
580 | NOTES: |
---|
581 | Adjusting this parameter should be done with caution. Examining the actual |
---|
582 | stack usage using the stack checker usage reporting facility is recommended |
---|
583 | (see also :ref:`CONFIGURE_STACK_CHECKER_ENABLED`). |
---|
584 | |
---|
585 | This parameter can be used to lower the minimum from that recommended. This |
---|
586 | can be used in low memory systems to reduce memory consumption for |
---|
587 | stacks. However, this shall be done with caution as it could increase the |
---|
588 | possibility of a blown task stack. |
---|
589 | |
---|
590 | This parameter can be used to increase the minimum from that |
---|
591 | recommended. This can be used in higher memory systems to reduce the risk |
---|
592 | of stack overflow without performing analysis on actual consumption. |
---|
593 | |
---|
594 | By default, this configuration parameter defines also the minimum stack |
---|
595 | size of POSIX threads. This can be changed with the |
---|
596 | :ref:`CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE` |
---|
597 | configuration option. |
---|
598 | |
---|
599 | In releases before RTEMS 5.1 the ``CONFIGURE_MINIMUM_TASK_STACK_SIZE`` was |
---|
600 | used to define the default value of :ref:`CONFIGURE_INTERRUPT_STACK_SIZE`. |
---|
601 | |
---|
602 | .. index:: CONFIGURE_STACK_CHECKER_ENABLED |
---|
603 | |
---|
604 | .. _CONFIGURE_STACK_CHECKER_ENABLED: |
---|
605 | |
---|
606 | CONFIGURE_STACK_CHECKER_ENABLED |
---|
607 | ------------------------------- |
---|
608 | |
---|
609 | CONSTANT: |
---|
610 | ``CONFIGURE_STACK_CHECKER_ENABLED`` |
---|
611 | |
---|
612 | OPTION TYPE: |
---|
613 | This configuration option is a boolean feature define. |
---|
614 | |
---|
615 | DEFAULT CONFIGURATION: |
---|
616 | If this configuration option is undefined, then the described feature is not |
---|
617 | enabled. |
---|
618 | |
---|
619 | DESCRIPTION: |
---|
620 | In case this configuration option is defined, then the stack checker is |
---|
621 | enabled. |
---|
622 | |
---|
623 | NOTES: |
---|
624 | The stack checker performs run-time stack bounds checking. This increases |
---|
625 | the time required to create tasks as well as adding overhead to each context |
---|
626 | switch. |
---|
627 | |
---|
628 | In 4.9 and older, this configuration option was named ``STACK_CHECKER_ON``. |
---|
629 | |
---|
630 | .. index:: CONFIGURE_TICKS_PER_TIMESLICE |
---|
631 | .. index:: ticks per timeslice |
---|
632 | |
---|
633 | .. _CONFIGURE_TICKS_PER_TIMESLICE: |
---|
634 | |
---|
635 | CONFIGURE_TICKS_PER_TIMESLICE |
---|
636 | ----------------------------- |
---|
637 | |
---|
638 | CONSTANT: |
---|
639 | ``CONFIGURE_TICKS_PER_TIMESLICE`` |
---|
640 | |
---|
641 | OPTION TYPE: |
---|
642 | This configuration option is an integer define. |
---|
643 | |
---|
644 | DEFAULT VALUE: |
---|
645 | The default value is 50. |
---|
646 | |
---|
647 | VALUE CONSTRAINTS: |
---|
648 | The value of this configuration option shall be greater than or equal to 0 |
---|
649 | and less than or equal to ``UINT32_MAX``. |
---|
650 | |
---|
651 | DESCRIPTION: |
---|
652 | The value of this configuration option defines the length of the timeslice |
---|
653 | quantum in ticks for each task. |
---|
654 | |
---|
655 | NOTES: |
---|
656 | This configuration option has no impact if the Clock Driver is not |
---|
657 | configured, see :ref:`CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`. |
---|
658 | |
---|
659 | .. index:: CONFIGURE_UNIFIED_WORK_AREAS |
---|
660 | .. index:: unified work areas |
---|
661 | .. index:: separate work areas |
---|
662 | .. index:: RTEMS Workspace |
---|
663 | .. index:: C Program Heap |
---|
664 | |
---|
665 | .. _CONFIGURE_UNIFIED_WORK_AREAS: |
---|
666 | |
---|
667 | CONFIGURE_UNIFIED_WORK_AREAS |
---|
668 | ---------------------------- |
---|
669 | |
---|
670 | CONSTANT: |
---|
671 | ``CONFIGURE_UNIFIED_WORK_AREAS`` |
---|
672 | |
---|
673 | OPTION TYPE: |
---|
674 | This configuration option is a boolean feature define. |
---|
675 | |
---|
676 | DEFAULT CONFIGURATION: |
---|
677 | If this configuration option is undefined, then there will be separate memory |
---|
678 | pools for the RTEMS Workspace and C Program Heap. |
---|
679 | |
---|
680 | DESCRIPTION: |
---|
681 | In case this configuration option is defined, then the RTEMS Workspace and |
---|
682 | the C Program Heap will be one pool of memory. |
---|
683 | |
---|
684 | NOTES: |
---|
685 | Having separate pools does have some advantages in the event a task blows a |
---|
686 | stack or writes outside its memory area. However, in low memory systems the |
---|
687 | overhead of the two pools plus the potential for unused memory in either |
---|
688 | pool is very undesirable. |
---|
689 | |
---|
690 | In high memory environments, this is desirable when you want to use the |
---|
691 | :ref:`ConfigUnlimitedObjects` option. You will be able to create objects |
---|
692 | until you run out of all available memory rather then just until you run out |
---|
693 | of RTEMS Workspace. |
---|
694 | |
---|
695 | .. index:: CONFIGURE_UNLIMITED_ALLOCATION_SIZE |
---|
696 | |
---|
697 | .. _CONFIGURE_UNLIMITED_ALLOCATION_SIZE: |
---|
698 | |
---|
699 | CONFIGURE_UNLIMITED_ALLOCATION_SIZE |
---|
700 | ----------------------------------- |
---|
701 | |
---|
702 | CONSTANT: |
---|
703 | ``CONFIGURE_UNLIMITED_ALLOCATION_SIZE`` |
---|
704 | |
---|
705 | OPTION TYPE: |
---|
706 | This configuration option is an integer define. |
---|
707 | |
---|
708 | DEFAULT VALUE: |
---|
709 | The default value is 8. |
---|
710 | |
---|
711 | VALUE CONSTRAINTS: |
---|
712 | The value of this configuration option shall meet the constraints of all |
---|
713 | object classes to which it is applied. |
---|
714 | |
---|
715 | DESCRIPTION: |
---|
716 | If :ref:`CONFIGURE_UNLIMITED_OBJECTS` is defined, then the value of this |
---|
717 | configuration option defines the default objects maximum of all object |
---|
718 | classes supporting :ref:`ConfigUnlimitedObjects` to |
---|
719 | ``rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)``. |
---|
720 | |
---|
721 | NOTES: |
---|
722 | By allowing users to declare all resources as being unlimited the user can |
---|
723 | avoid identifying and limiting the resources used. |
---|
724 | |
---|
725 | The object maximum of each class can be configured also individually using |
---|
726 | the :c:func:`rtems_resource_unlimited` macro. |
---|
727 | |
---|
728 | .. index:: CONFIGURE_UNLIMITED_OBJECTS |
---|
729 | |
---|
730 | .. _CONFIGURE_UNLIMITED_OBJECTS: |
---|
731 | |
---|
732 | CONFIGURE_UNLIMITED_OBJECTS |
---|
733 | --------------------------- |
---|
734 | |
---|
735 | CONSTANT: |
---|
736 | ``CONFIGURE_UNLIMITED_OBJECTS`` |
---|
737 | |
---|
738 | OPTION TYPE: |
---|
739 | This configuration option is a boolean feature define. |
---|
740 | |
---|
741 | DEFAULT CONFIGURATION: |
---|
742 | If this configuration option is undefined, then the described feature is not |
---|
743 | enabled. |
---|
744 | |
---|
745 | DESCRIPTION: |
---|
746 | In case this configuration option is defined, then unlimited objects are used |
---|
747 | by default. |
---|
748 | |
---|
749 | NOTES: |
---|
750 | When using unlimited objects, it is common practice to also specify |
---|
751 | :ref:`CONFIGURE_UNIFIED_WORK_AREAS` so the system operates with a single pool |
---|
752 | of memory for both RTEMS Workspace and C Program Heap. |
---|
753 | |
---|
754 | This option does not override an explicit configuration for a particular |
---|
755 | object class by the user. |
---|
756 | |
---|
757 | See also :ref:`CONFIGURE_UNLIMITED_ALLOCATION_SIZE`. |
---|
758 | |
---|
759 | .. index:: CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION |
---|
760 | |
---|
761 | .. _CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION: |
---|
762 | |
---|
763 | CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION |
---|
764 | --------------------------------------- |
---|
765 | |
---|
766 | CONSTANT: |
---|
767 | ``CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION`` |
---|
768 | |
---|
769 | OPTION TYPE: |
---|
770 | This configuration option is a boolean feature define. |
---|
771 | |
---|
772 | DEFAULT CONFIGURATION: |
---|
773 | If this configuration option is undefined, then the described feature is not |
---|
774 | enabled. |
---|
775 | |
---|
776 | DESCRIPTION: |
---|
777 | In case this configuration option is defined, then the system initialization |
---|
778 | is verbose. |
---|
779 | |
---|
780 | NOTES: |
---|
781 | You may use this feature to debug system initialization issues. The |
---|
782 | :c:func:`printk` function is used to print the information. |
---|
783 | |
---|
784 | .. index:: CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
785 | .. index:: clear C Program Heap |
---|
786 | .. index:: clear RTEMS Workspace |
---|
787 | .. index:: zero C Program Heap |
---|
788 | .. index:: zero RTEMS Workspace |
---|
789 | |
---|
790 | .. _CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY: |
---|
791 | |
---|
792 | CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
793 | -------------------------------------- |
---|
794 | |
---|
795 | CONSTANT: |
---|
796 | ``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY`` |
---|
797 | |
---|
798 | OPTION TYPE: |
---|
799 | This configuration option is a boolean feature define. |
---|
800 | |
---|
801 | DEFAULT CONFIGURATION: |
---|
802 | If this configuration option is undefined, then the described feature is not |
---|
803 | enabled. |
---|
804 | |
---|
805 | DESCRIPTION: |
---|
806 | In case this configuration option is defined, then the memory areas used for |
---|
807 | the RTEMS Workspace and the C Program Heap are zeroed with a ``0x00`` byte |
---|
808 | pattern during system initialization. |
---|
809 | |
---|
810 | NOTES: |
---|
811 | Zeroing memory can add significantly to the system initialization time. It is |
---|
812 | not necessary for RTEMS but is often assumed by support libraries. In case |
---|
813 | :ref:`CONFIGURE_DIRTY_MEMORY` is also defined, then the memory is first |
---|
814 | dirtied and then zeroed. |
---|