source: rtems-docs/c-user/config/general.rst @ cf9f212

Last change on this file since cf9f212 was cf9f212, checked in by Sebastian Huber <sebastian.huber@…>, on 11/17/21 at 07:46:56

c-user: Clarify BSP related configuration settings

  • Property mode set to 100644
File size: 30.4 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
4.. Copyright (C) 1988, 2022 On-Line Applications Research Corporation (OAR)
5
6.. This file is part of the RTEMS quality process and was automatically
7.. generated.  If you find something that needs to be fixed or
8.. worded better please post a report or patch to an RTEMS mailing list
9.. or raise a bug report:
10..
11.. https://www.rtems.org/bugs.html
12..
13.. For information on updating and regenerating please refer to the How-To
14.. section in the Software Requirements Engineering chapter of the
15.. RTEMS Software Engineering manual.  The manual is provided as a part of
16.. a release.  For development sources please refer to the online
17.. documentation at:
18..
19.. https://docs.rtems.org
20
21.. Generated from spec:/acfg/if/group-general
22
23General System Configuration
24============================
25
26This section describes general system configuration options.
27
28.. Generated from spec:/acfg/if/dirty-memory
29
30.. raw:: latex
31
32    \clearpage
33
34.. index:: CONFIGURE_DIRTY_MEMORY
35
36.. _CONFIGURE_DIRTY_MEMORY:
37
38CONFIGURE_DIRTY_MEMORY
39----------------------
40
41.. rubric:: CONSTANT:
42
43``CONFIGURE_DIRTY_MEMORY``
44
45.. rubric:: OPTION TYPE:
46
47This configuration option is a boolean feature define.
48
49.. rubric:: DEFAULT CONFIGURATION:
50
51If this configuration option is undefined, then the described feature is not
52enabled.
53
54.. rubric:: DESCRIPTION:
55
56In case this configuration option is defined, then the memory areas used for
57the RTEMS Workspace and the C Program Heap are dirtied with a ``0xCF`` byte
58pattern during system initialization.
59
60.. rubric:: NOTES:
61
62Dirtying memory can add significantly to system initialization time.  It may
63assist in finding code that incorrectly assumes the contents of free memory
64areas is cleared to zero during system initialization.  In case
65:ref:`CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY` is also defined, then the
66memory is first dirtied and then zeroed.
67
68See also :ref:`CONFIGURE_MALLOC_DIRTY`.
69
70.. Generated from spec:/acfg/if/disable-bsp-settings
71
72.. raw:: latex
73
74    \clearpage
75
76.. index:: CONFIGURE_DISABLE_BSP_SETTINGS
77
78.. _CONFIGURE_DISABLE_BSP_SETTINGS:
79
80CONFIGURE_DISABLE_BSP_SETTINGS
81------------------------------
82
83.. rubric:: CONSTANT:
84
85``CONFIGURE_DISABLE_BSP_SETTINGS``
86
87.. rubric:: OPTION TYPE:
88
89This configuration option is a boolean feature define.
90
91.. rubric:: DEFAULT CONFIGURATION:
92
93If this configuration option is undefined, then the described feature is not
94enabled.
95
96.. rubric:: DESCRIPTION:
97
98In case this configuration option is defined, then the optional BSP provided
99settings listed below are disabled.
100
101The optional BSP provided default values for the following application
102configuration options are disabled:
103
104* :ref:`CONFIGURE_IDLE_TASK_BODY`
105
106* :ref:`CONFIGURE_IDLE_TASK_STACK_SIZE`
107
108* :ref:`CONFIGURE_INTERRUPT_STACK_SIZE`
109
110The optional BSP provided initial extension set is disabled (see
111:term:`initial extension sets`).  The optional BSP provided
112prerequisite IO device drivers are disabled (see
113Device Driver Configuration).  The optional BSP provided support for
114:c:func:`sbrk` is disabled.
115
116This configuration option provides an all or nothing choice with respect to
117the optional BSP provided settings.
118
119.. Generated from spec:/acfg/if/disable-newlib-reentrancy
120
121.. raw:: latex
122
123    \clearpage
124
125.. index:: CONFIGURE_DISABLE_NEWLIB_REENTRANCY
126
127.. _CONFIGURE_DISABLE_NEWLIB_REENTRANCY:
128
129CONFIGURE_DISABLE_NEWLIB_REENTRANCY
130-----------------------------------
131
132.. rubric:: CONSTANT:
133
134``CONFIGURE_DISABLE_NEWLIB_REENTRANCY``
135
136.. rubric:: OPTION TYPE:
137
138This configuration option is a boolean feature define.
139
140.. rubric:: DEFAULT CONFIGURATION:
141
142If this configuration option is undefined, then the described feature is not
143enabled.
144
145.. rubric:: DESCRIPTION:
146
147In case this configuration option is defined, then the Newlib reentrancy
148support per thread is disabled and a global reentrancy structure is used.
149
150.. rubric:: NOTES:
151
152You can enable this option to reduce the size of the :term:`TCB`.  Use this
153option with care, since it can lead to race conditions and undefined system
154behaviour.  For example, :c:macro:`errno` is no longer a thread-local
155variable if this option is enabled.
156
157.. Generated from spec:/acfg/if/executive-ram-size
158
159.. raw:: latex
160
161    \clearpage
162
163.. index:: CONFIGURE_EXECUTIVE_RAM_SIZE
164
165.. _CONFIGURE_EXECUTIVE_RAM_SIZE:
166
167CONFIGURE_EXECUTIVE_RAM_SIZE
168----------------------------
169
170.. rubric:: CONSTANT:
171
172``CONFIGURE_EXECUTIVE_RAM_SIZE``
173
174.. rubric:: OPTION TYPE:
175
176This configuration option is an integer define.
177
178.. rubric:: DEFAULT VALUE:
179
180If this configuration option is undefined, then the RTEMS Workspace and task
181stack space size is calculated by ``<rtems/confdefs.h>`` based on the values
182configuration options.
183
184.. rubric:: DESCRIPTION:
185
186The value of this configuration option defines the RTEMS Workspace size in
187bytes.
188
189.. rubric:: NOTES:
190
191This is an advanced configuration option.  Use it only if you know exactly
192what you are doing.
193
194.. rubric:: CONSTRAINTS:
195
196The following constraints apply to this configuration option:
197
198* The value of the configuration option shall be greater than or equal to zero.
199
200* The value of the configuration option shall be less than or equal to
201  `UINTPTR_MAX <https://en.cppreference.com/w/c/types/integer>`_.
202
203* The value of the configuration option shall be less than or equal to a
204  BSP-specific and application-specific value which depends on the size of the
205  memory available to the application.
206
207.. Generated from spec:/acfg/if/extra-task-stacks
208
209.. raw:: latex
210
211    \clearpage
212
213.. index:: CONFIGURE_EXTRA_TASK_STACKS
214.. index:: memory for task tasks
215
216.. _CONFIGURE_EXTRA_TASK_STACKS:
217
218CONFIGURE_EXTRA_TASK_STACKS
219---------------------------
220
221.. rubric:: CONSTANT:
222
223``CONFIGURE_EXTRA_TASK_STACKS``
224
225.. rubric:: OPTION TYPE:
226
227This configuration option is an integer define.
228
229.. rubric:: DEFAULT VALUE:
230
231The default value is 0.
232
233.. rubric:: DESCRIPTION:
234
235The value of this configuration option defines the number of bytes the
236applications wishes to add to the task stack requirements calculated by
237``<rtems/confdefs.h>``.
238
239.. rubric:: NOTES:
240
241This parameter is very important.  If the application creates tasks with
242stacks larger then the minimum, then that memory is **not** accounted for by
243``<rtems/confdefs.h>``.
244
245.. rubric:: CONSTRAINTS:
246
247The following constraints apply to this configuration option:
248
249* The value of the configuration option shall be greater than or equal to zero.
250
251* The value of the configuration option shall be small enough so that the task
252  stack space calculation carried out by ``<rtems/confdefs.h>`` does not
253  overflow an integer of type `uintptr_t
254  <https://en.cppreference.com/w/c/types/integer>`_.
255
256.. Generated from spec:/acfg/if/initial-extensions
257
258.. raw:: latex
259
260    \clearpage
261
262.. index:: CONFIGURE_INITIAL_EXTENSIONS
263
264.. _CONFIGURE_INITIAL_EXTENSIONS:
265
266CONFIGURE_INITIAL_EXTENSIONS
267----------------------------
268
269.. rubric:: CONSTANT:
270
271``CONFIGURE_INITIAL_EXTENSIONS``
272
273.. rubric:: OPTION TYPE:
274
275This configuration option is an initializer define.
276
277.. rubric:: DEFAULT VALUE:
278
279The default value is the empty list.
280
281.. rubric:: DESCRIPTION:
282
283The value of this configuration option is used to initialize the table of
284initial user extensions.
285
286.. rubric:: NOTES:
287
288The value of this configuration option is placed before the entries of
289:c:macro:`BSP_INITIAL_EXTENSION` and after the entries of all other
290initial user extensions.
291
292.. rubric:: CONSTRAINTS:
293
294The value of the configuration option shall be a list of initializers for
295structures of type :c:type:`rtems_extensions_table`.
296
297.. Generated from spec:/acfg/if/interrupt-stack-size
298
299.. raw:: latex
300
301    \clearpage
302
303.. index:: CONFIGURE_INTERRUPT_STACK_SIZE
304.. index:: interrupt stack size
305
306.. _CONFIGURE_INTERRUPT_STACK_SIZE:
307
308CONFIGURE_INTERRUPT_STACK_SIZE
309------------------------------
310
311.. rubric:: CONSTANT:
312
313``CONFIGURE_INTERRUPT_STACK_SIZE``
314
315.. rubric:: OPTION TYPE:
316
317This configuration option is an integer define.
318
319.. rubric:: DEFAULT VALUE:
320
321If the :ref:`CONFIGURE_DISABLE_BSP_SETTINGS` configuration option is not defined and
322:c:macro:`BSP_INTERRUPT_STACK_SIZE` is provided by the
323:term:`BSP`, then the default value is defined by
324:c:macro:`BSP_INTERRUPT_STACK_SIZE`, otherwise the default value is
325:c:macro:`CPU_STACK_MINIMUM_SIZE`.
326
327.. rubric:: DESCRIPTION:
328
329The value of this configuration option defines the size of an interrupt stack
330in bytes.
331
332.. rubric:: NOTES:
333
334There is one interrupt stack available for each configured processor
335(:ref:`CONFIGURE_MAXIMUM_PROCESSORS`).  The interrupt stack areas are
336statically allocated in a special linker section (``.rtemsstack.interrupt``).
337The placement of this linker section is BSP-specific.
338
339Some BSPs use the interrupt stack as the initialization stack which is used
340to perform the sequential system initialization before the multithreading
341is started.
342
343The interrupt stacks are covered by the stack checker, see
344:ref:`CONFIGURE_STACK_CHECKER_ENABLED`.  However, using a too small interrupt stack
345size may still result in undefined behaviour.
346
347In releases before RTEMS 5.1 the default value was
348:ref:`CONFIGURE_MINIMUM_TASK_STACK_SIZE` instead of
349:c:macro:`CPU_STACK_MINIMUM_SIZE`.
350
351.. rubric:: CONSTRAINTS:
352
353The following constraints apply to this configuration option:
354
355* The value of the configuration option shall be greater than or equal to a
356  BSP-specific and application-specific minimum value.
357
358* The value of the configuration option shall be small enough so that the
359  interrupt stack area calculation carried out by ``<rtems/confdefs.h>`` does
360  not overflow an integer of type `size_t
361  <https://en.cppreference.com/w/c/types/size_t>`_.
362
363* The value of the configuration option shall be aligned according to
364  :c:macro:`CPU_INTERRUPT_STACK_ALIGNMENT`.
365
366.. Generated from spec:/acfg/if/malloc-dirty
367
368.. raw:: latex
369
370    \clearpage
371
372.. index:: CONFIGURE_MALLOC_DIRTY
373
374.. _CONFIGURE_MALLOC_DIRTY:
375
376CONFIGURE_MALLOC_DIRTY
377----------------------
378
379.. rubric:: CONSTANT:
380
381``CONFIGURE_MALLOC_DIRTY``
382
383.. rubric:: OPTION TYPE:
384
385This configuration option is a boolean feature define.
386
387.. rubric:: DEFAULT CONFIGURATION:
388
389If this configuration option is undefined, then the described feature is not
390enabled.
391
392.. rubric:: DESCRIPTION:
393
394In case this configuration option is defined, then each memory area returned
395by C Program Heap allocator functions such as :c:func:`malloc` is dirtied
396with a ``0xCF`` byte pattern before it is handed over to the application.
397
398.. rubric:: NOTES:
399
400The dirtying performed by this option is carried out for each successful
401memory allocation from the C Program Heap in contrast to
402:ref:`CONFIGURE_DIRTY_MEMORY` which dirties the memory only once during the
403system initialization.
404
405.. Generated from spec:/acfg/if/max-file-descriptors
406
407.. raw:: latex
408
409    \clearpage
410
411.. index:: CONFIGURE_MAXIMUM_FILE_DESCRIPTORS
412.. index:: maximum file descriptors
413
414.. _CONFIGURE_MAXIMUM_FILE_DESCRIPTORS:
415
416CONFIGURE_MAXIMUM_FILE_DESCRIPTORS
417----------------------------------
418
419.. rubric:: CONSTANT:
420
421``CONFIGURE_MAXIMUM_FILE_DESCRIPTORS``
422
423.. rubric:: OPTION TYPE:
424
425This configuration option is an integer define.
426
427.. rubric:: DEFAULT VALUE:
428
429The default value is 3.
430
431.. rubric:: DESCRIPTION:
432
433The value of this configuration option defines the maximum number of file
434like objects that can be concurrently open.
435
436.. rubric:: NOTES:
437
438The default value of three file descriptors allows RTEMS to support standard
439input, output, and error I/O streams on :file:`/dev/console`.
440
441.. rubric:: CONSTRAINTS:
442
443The following constraints apply to this configuration option:
444
445* The value of the configuration option shall be greater than or equal to zero.
446
447* The value of the configuration option shall be less than or equal to
448  `SIZE_MAX <https://en.cppreference.com/w/c/types/limits>`_.
449
450* The value of the configuration option shall be less than or equal to a
451  BSP-specific and application-specific value which depends on the size of the
452  memory available to the application.
453
454.. Generated from spec:/acfg/if/max-processors
455
456.. raw:: latex
457
458    \clearpage
459
460.. index:: CONFIGURE_MAXIMUM_PROCESSORS
461
462.. _CONFIGURE_MAXIMUM_PROCESSORS:
463
464CONFIGURE_MAXIMUM_PROCESSORS
465----------------------------
466
467.. rubric:: CONSTANT:
468
469``CONFIGURE_MAXIMUM_PROCESSORS``
470
471.. rubric:: OPTION TYPE:
472
473This configuration option is an integer define.
474
475.. rubric:: DEFAULT VALUE:
476
477The default value is 1.
478
479.. rubric:: DESCRIPTION:
480
481The value of this configuration option defines the maximum number of
482processors an application intends to use.  The number of actually available
483processors depends on the hardware and may be less.  It is recommended to use
484the smallest value suitable for the application in order to save memory.
485Each processor needs an IDLE task stack and interrupt stack for example.
486
487.. rubric:: NOTES:
488
489If there are more processors available than configured, the rest will be
490ignored.
491
492This configuration option is only evaluated in SMP configurations of RTEMS
493(e.g. RTEMS was built with the SMP build configuration option enabled).
494In all other configurations it has no effect.
495
496.. rubric:: CONSTRAINTS:
497
498The following constraints apply to this configuration option:
499
500* The value of the configuration option shall be greater than or equal to one.
501
502* The value of the configuration option shall be less than or equal to
503  :c:macro:`CPU_MAXIMUM_PROCESSORS`.
504
505.. Generated from spec:/acfg/if/max-thread-name-size
506
507.. raw:: latex
508
509    \clearpage
510
511.. index:: CONFIGURE_MAXIMUM_THREAD_NAME_SIZE
512.. index:: maximum thread name size
513
514.. _CONFIGURE_MAXIMUM_THREAD_NAME_SIZE:
515
516CONFIGURE_MAXIMUM_THREAD_NAME_SIZE
517----------------------------------
518
519.. rubric:: CONSTANT:
520
521``CONFIGURE_MAXIMUM_THREAD_NAME_SIZE``
522
523.. rubric:: OPTION TYPE:
524
525This configuration option is an integer define.
526
527.. rubric:: DEFAULT VALUE:
528
529The default value is 16.
530
531.. rubric:: DESCRIPTION:
532
533The value of this configuration option defines the maximum thread name size
534including the terminating ``NUL`` character.
535
536.. rubric:: NOTES:
537
538The default value was chosen for Linux compatibility, see
539`pthread_setname_np() <http://man7.org/linux/man-pages/man3/pthread_setname_np.3.html>`_.
540
541The size of the thread control block is increased by the maximum thread name
542size.
543
544This configuration option is available since RTEMS 5.1.
545
546.. rubric:: CONSTRAINTS:
547
548The following constraints apply to this configuration option:
549
550* The value of the configuration option shall be greater than or equal to zero.
551
552* The value of the configuration option shall be less than or equal to
553  `SIZE_MAX <https://en.cppreference.com/w/c/types/limits>`_.
554
555* The value of the configuration option shall be less than or equal to a
556  BSP-specific and application-specific value which depends on the size of the
557  memory available to the application.
558
559.. Generated from spec:/acfg/if/memory-overhead
560
561.. raw:: latex
562
563    \clearpage
564
565.. index:: CONFIGURE_MEMORY_OVERHEAD
566
567.. _CONFIGURE_MEMORY_OVERHEAD:
568
569CONFIGURE_MEMORY_OVERHEAD
570-------------------------
571
572.. rubric:: CONSTANT:
573
574``CONFIGURE_MEMORY_OVERHEAD``
575
576.. rubric:: OPTION TYPE:
577
578This configuration option is an integer define.
579
580.. rubric:: DEFAULT VALUE:
581
582The default value is 0.
583
584.. rubric:: DESCRIPTION:
585
586The value of this configuration option defines the number of kilobytes the
587application wishes to add to the RTEMS Workspace size calculated by
588``<rtems/confdefs.h>``.
589
590.. rubric:: NOTES:
591
592This configuration option should only be used when it is suspected that a bug
593in ``<rtems/confdefs.h>`` has resulted in an underestimation.  Typically the
594memory allocation will be too low when an application does not account for
595all message queue buffers or task stacks, see
596:ref:`CONFIGURE_MESSAGE_BUFFER_MEMORY`.
597
598.. rubric:: CONSTRAINTS:
599
600The following constraints apply to this configuration option:
601
602* The value of the configuration option shall be greater than or equal to zero.
603
604* The value of the configuration option shall be less than or equal to a
605  BSP-specific and application-specific value which depends on the size of the
606  memory available to the application.
607
608* The value of the configuration option shall be small enough so that the RTEMS
609  Workspace size calculation carried out by ``<rtems/confdefs.h>`` does not
610  overflow an integer of type `uintptr_t
611  <https://en.cppreference.com/w/c/types/integer>`_.
612
613.. Generated from spec:/acfg/if/message-buffer-memory
614
615.. raw:: latex
616
617    \clearpage
618
619.. index:: CONFIGURE_MESSAGE_BUFFER_MEMORY
620.. index:: configure message queue buffer memory
621.. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE
622.. index:: memory for a single message queue's buffers
623
624.. _CONFIGURE_MESSAGE_BUFFER_MEMORY:
625
626CONFIGURE_MESSAGE_BUFFER_MEMORY
627-------------------------------
628
629.. rubric:: CONSTANT:
630
631``CONFIGURE_MESSAGE_BUFFER_MEMORY``
632
633.. rubric:: OPTION TYPE:
634
635This configuration option is an integer define.
636
637.. rubric:: DEFAULT VALUE:
638
639The default value is 0.
640
641.. rubric:: DESCRIPTION:
642
643The value of this configuration option defines the number of bytes reserved
644for message queue buffers in the RTEMS Workspace.
645
646.. rubric:: NOTES:
647
648The configuration options :ref:`CONFIGURE_MAXIMUM_MESSAGE_QUEUES` and
649:ref:`CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES` define only how many message
650queues can be created by the application.  The memory for the message
651buffers is configured by this option.  For each message queue you have to
652reserve some memory for the message buffers.  The size depends on the
653maximum number of pending messages and the maximum size of the messages of
654a message queue.  Use the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` macro
655to specify the message buffer memory for each message queue and sum them up
656to define the value for ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``.
657
658The interface for the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` help
659macro is as follows:
660
661.. code-block:: c
662
663    CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( max_messages, max_msg_size )
664
665Where ``max_messages`` is the maximum number of pending messages and
666``max_msg_size`` is the maximum size in bytes of the messages of the
667corresponding message queue.  Both parameters shall be compile time
668constants.  Not using this help macro (e.g. just using
669``max_messages * max_msg_size``) may result in an underestimate of the
670RTEMS Workspace size.
671
672The following example illustrates how the
673``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` help macro can be used to assist in
674calculating the message buffer memory required.  In this example, there are
675two message queues used in this application.  The first message queue has a
676maximum of 24 pending messages with the message structure defined by the
677type ``one_message_type``.  The other message queue has a maximum of 500
678pending messages with the message structure defined by the type
679``other_message_type``.
680
681.. code-block:: c
682
683    #define CONFIGURE_MESSAGE_BUFFER_MEMORY ( \
684        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
685          24, \
686          sizeof( one_message_type ) \
687        ) \
688        + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
689          500, \
690          sizeof( other_message_type ) \
691        ) \
692      )
693
694.. rubric:: CONSTRAINTS:
695
696The following constraints apply to this configuration option:
697
698* The value of the configuration option shall be greater than or equal to zero.
699
700* The value of the configuration option shall be less than or equal to a
701  BSP-specific and application-specific value which depends on the size of the
702  memory available to the application.
703
704* The value of the configuration option shall be small enough so that the RTEMS
705  Workspace size calculation carried out by ``<rtems/confdefs.h>`` does not
706  overflow an integer of type `uintptr_t
707  <https://en.cppreference.com/w/c/types/integer>`_.
708
709.. Generated from spec:/acfg/if/microseconds-per-tick
710
711.. raw:: latex
712
713    \clearpage
714
715.. index:: CONFIGURE_MICROSECONDS_PER_TICK
716.. index:: clock tick quantum
717.. index:: tick quantum
718
719.. _CONFIGURE_MICROSECONDS_PER_TICK:
720
721CONFIGURE_MICROSECONDS_PER_TICK
722-------------------------------
723
724.. rubric:: CONSTANT:
725
726``CONFIGURE_MICROSECONDS_PER_TICK``
727
728.. rubric:: OPTION TYPE:
729
730This configuration option is an integer define.
731
732.. rubric:: DEFAULT VALUE:
733
734The default value is 10000.
735
736.. rubric:: DESCRIPTION:
737
738The value of this configuration option defines the length of time in
739microseconds between clock ticks (clock tick quantum).
740
741When the clock tick quantum value is too low, the system will spend so much
742time processing clock ticks that it does not have processing time available
743to perform application work. In this case, the system will become
744unresponsive.
745
746The lowest practical time quantum varies widely based upon the speed of the
747target hardware and the architectural overhead associated with
748interrupts. In general terms, you do not want to configure it lower than is
749needed for the application.
750
751The clock tick quantum should be selected such that it all blocking and
752delay times in the application are evenly divisible by it. Otherwise,
753rounding errors will be introduced which may negatively impact the
754application.
755
756.. rubric:: NOTES:
757
758This configuration option has no impact if the Clock Driver is not
759configured, see :ref:`CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`.
760
761There may be Clock Driver specific limits on the resolution or maximum value
762of a clock tick quantum.
763
764.. rubric:: CONSTRAINTS:
765
766The following constraints apply to this configuration option:
767
768* The value of the configuration option shall be greater than or equal to a
769  value defined by the :term:`Clock Driver`.
770
771* The value of the configuration option shall be less than or equal to a value
772  defined by the :term:`Clock Driver`.
773
774* The resulting clock ticks per second should be an integer.
775
776.. Generated from spec:/acfg/if/min-task-stack-size
777
778.. raw:: latex
779
780    \clearpage
781
782.. index:: CONFIGURE_MINIMUM_TASK_STACK_SIZE
783.. index:: minimum task stack size
784
785.. _CONFIGURE_MINIMUM_TASK_STACK_SIZE:
786
787CONFIGURE_MINIMUM_TASK_STACK_SIZE
788---------------------------------
789
790.. rubric:: CONSTANT:
791
792``CONFIGURE_MINIMUM_TASK_STACK_SIZE``
793
794.. rubric:: OPTION TYPE:
795
796This configuration option is an integer define.
797
798.. rubric:: DEFAULT VALUE:
799
800The default value is :c:macro:`CPU_STACK_MINIMUM_SIZE`.
801
802.. rubric:: DESCRIPTION:
803
804The value of this configuration option defines the minimum stack size in
805bytes for every user task or thread in the system.
806
807.. rubric:: NOTES:
808
809Adjusting this parameter should be done with caution.  Examining the actual
810stack usage using the stack checker usage reporting facility is recommended
811(see also :ref:`CONFIGURE_STACK_CHECKER_ENABLED`).
812
813This parameter can be used to lower the minimum from that recommended. This
814can be used in low memory systems to reduce memory consumption for
815stacks. However, this shall be done with caution as it could increase the
816possibility of a blown task stack.
817
818This parameter can be used to increase the minimum from that
819recommended. This can be used in higher memory systems to reduce the risk
820of stack overflow without performing analysis on actual consumption.
821
822By default, this configuration parameter defines also the minimum stack
823size of POSIX threads.  This can be changed with the
824:ref:`CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE`
825configuration option.
826
827In releases before RTEMS 5.1 the ``CONFIGURE_MINIMUM_TASK_STACK_SIZE`` was
828used to define the default value of :ref:`CONFIGURE_INTERRUPT_STACK_SIZE`.
829
830.. rubric:: CONSTRAINTS:
831
832The following constraints apply to this configuration option:
833
834* The value of the configuration option shall be small enough so that the task
835  stack space calculation carried out by ``<rtems/confdefs.h>`` does not
836  overflow an integer of type `uintptr_t
837  <https://en.cppreference.com/w/c/types/integer>`_.
838
839* The value of the configuration option shall be greater than or equal to a
840  BSP-specific and application-specific minimum value.
841
842.. Generated from spec:/acfg/if/stack-checker-enabled
843
844.. raw:: latex
845
846    \clearpage
847
848.. index:: CONFIGURE_STACK_CHECKER_ENABLED
849
850.. _CONFIGURE_STACK_CHECKER_ENABLED:
851
852CONFIGURE_STACK_CHECKER_ENABLED
853-------------------------------
854
855.. rubric:: CONSTANT:
856
857``CONFIGURE_STACK_CHECKER_ENABLED``
858
859.. rubric:: OPTION TYPE:
860
861This configuration option is a boolean feature define.
862
863.. rubric:: DEFAULT CONFIGURATION:
864
865If this configuration option is undefined, then the described feature is not
866enabled.
867
868.. rubric:: DESCRIPTION:
869
870In case this configuration option is defined, then the stack checker is
871enabled.
872
873.. rubric:: NOTES:
874
875The stack checker performs run-time stack bounds checking.  This increases
876the time required to create tasks as well as adding overhead to each context
877switch.
878
879In 4.9 and older, this configuration option was named ``STACK_CHECKER_ON``.
880
881.. Generated from spec:/acfg/if/ticks-per-time-slice
882
883.. raw:: latex
884
885    \clearpage
886
887.. index:: CONFIGURE_TICKS_PER_TIMESLICE
888.. index:: ticks per timeslice
889
890.. _CONFIGURE_TICKS_PER_TIMESLICE:
891
892CONFIGURE_TICKS_PER_TIMESLICE
893-----------------------------
894
895.. rubric:: CONSTANT:
896
897``CONFIGURE_TICKS_PER_TIMESLICE``
898
899.. rubric:: OPTION TYPE:
900
901This configuration option is an integer define.
902
903.. rubric:: DEFAULT VALUE:
904
905The default value is 50.
906
907.. rubric:: DESCRIPTION:
908
909The value of this configuration option defines the length of the timeslice
910quantum in ticks for each task.
911
912.. rubric:: NOTES:
913
914This configuration option has no impact if the Clock Driver is not
915configured, see :ref:`CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER`.
916
917.. rubric:: CONSTRAINTS:
918
919The following constraints apply to this configuration option:
920
921* The value of the configuration option shall be greater than or equal to zero.
922
923* The value of the configuration option shall be less than or equal to
924  `UINT32_MAX <https://en.cppreference.com/w/c/types/integer>`_.
925
926.. Generated from spec:/acfg/if/unified-work-areas
927
928.. raw:: latex
929
930    \clearpage
931
932.. index:: CONFIGURE_UNIFIED_WORK_AREAS
933.. index:: unified work areas
934.. index:: separate work areas
935.. index:: RTEMS Workspace
936.. index:: C Program Heap
937
938.. _CONFIGURE_UNIFIED_WORK_AREAS:
939
940CONFIGURE_UNIFIED_WORK_AREAS
941----------------------------
942
943.. rubric:: CONSTANT:
944
945``CONFIGURE_UNIFIED_WORK_AREAS``
946
947.. rubric:: OPTION TYPE:
948
949This configuration option is a boolean feature define.
950
951.. rubric:: DEFAULT CONFIGURATION:
952
953If this configuration option is undefined, then there will be separate memory
954pools for the RTEMS Workspace and C Program Heap.
955
956.. rubric:: DESCRIPTION:
957
958In case this configuration option is defined, then the RTEMS Workspace and
959the C Program Heap will be one pool of memory.
960
961.. rubric:: NOTES:
962
963Having separate pools does have some advantages in the event a task blows a
964stack or writes outside its memory area. However, in low memory systems the
965overhead of the two pools plus the potential for unused memory in either
966pool is very undesirable.
967
968In high memory environments, this is desirable when you want to use the
969:ref:`ConfigUnlimitedObjects` option.  You will be able to create objects
970until you run out of all available memory rather then just until you run out
971of RTEMS Workspace.
972
973.. Generated from spec:/acfg/if/unlimited-allocation-size
974
975.. raw:: latex
976
977    \clearpage
978
979.. index:: CONFIGURE_UNLIMITED_ALLOCATION_SIZE
980
981.. _CONFIGURE_UNLIMITED_ALLOCATION_SIZE:
982
983CONFIGURE_UNLIMITED_ALLOCATION_SIZE
984-----------------------------------
985
986.. rubric:: CONSTANT:
987
988``CONFIGURE_UNLIMITED_ALLOCATION_SIZE``
989
990.. rubric:: OPTION TYPE:
991
992This configuration option is an integer define.
993
994.. rubric:: DEFAULT VALUE:
995
996The default value is 8.
997
998.. rubric:: DESCRIPTION:
999
1000If :ref:`CONFIGURE_UNLIMITED_OBJECTS` is defined, then the value of this
1001configuration option defines the default objects maximum of all object
1002classes supporting :ref:`ConfigUnlimitedObjects` to
1003``rtems_resource_unlimited( CONFIGURE_UNLIMITED_ALLOCATION_SIZE )``.
1004
1005.. rubric:: NOTES:
1006
1007By allowing users to declare all resources as being unlimited the user can
1008avoid identifying and limiting the resources used.
1009
1010The object maximum of each class can be configured also individually using
1011the :c:func:`rtems_resource_unlimited` macro.
1012
1013.. rubric:: CONSTRAINTS:
1014
1015The value of the configuration option shall meet the constraints of all object
1016classes to which it is applied.
1017
1018.. Generated from spec:/acfg/if/unlimited-objects
1019
1020.. raw:: latex
1021
1022    \clearpage
1023
1024.. index:: CONFIGURE_UNLIMITED_OBJECTS
1025
1026.. _CONFIGURE_UNLIMITED_OBJECTS:
1027
1028CONFIGURE_UNLIMITED_OBJECTS
1029---------------------------
1030
1031.. rubric:: CONSTANT:
1032
1033``CONFIGURE_UNLIMITED_OBJECTS``
1034
1035.. rubric:: OPTION TYPE:
1036
1037This configuration option is a boolean feature define.
1038
1039.. rubric:: DEFAULT CONFIGURATION:
1040
1041If this configuration option is undefined, then the described feature is not
1042enabled.
1043
1044.. rubric:: DESCRIPTION:
1045
1046In case this configuration option is defined, then unlimited objects are used
1047by default.
1048
1049.. rubric:: NOTES:
1050
1051When using unlimited objects, it is common practice to also specify
1052:ref:`CONFIGURE_UNIFIED_WORK_AREAS` so the system operates with a single pool
1053of memory for both RTEMS Workspace and C Program Heap.
1054
1055This option does not override an explicit configuration for a particular
1056object class by the user.
1057
1058See also :ref:`CONFIGURE_UNLIMITED_ALLOCATION_SIZE`.
1059
1060.. Generated from spec:/acfg/if/verbose-system-init
1061
1062.. raw:: latex
1063
1064    \clearpage
1065
1066.. index:: CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION
1067
1068.. _CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION:
1069
1070CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION
1071---------------------------------------
1072
1073.. rubric:: CONSTANT:
1074
1075``CONFIGURE_VERBOSE_SYSTEM_INITIALIZATION``
1076
1077.. rubric:: OPTION TYPE:
1078
1079This configuration option is a boolean feature define.
1080
1081.. rubric:: DEFAULT CONFIGURATION:
1082
1083If this configuration option is undefined, then the described feature is not
1084enabled.
1085
1086.. rubric:: DESCRIPTION:
1087
1088In case this configuration option is defined, then the system initialization
1089is verbose.
1090
1091.. rubric:: NOTES:
1092
1093You may use this feature to debug system initialization issues.  The
1094:c:func:`printk` function is used to print the information.
1095
1096.. Generated from spec:/acfg/if/zero-workspace-automatically
1097
1098.. raw:: latex
1099
1100    \clearpage
1101
1102.. index:: CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
1103.. index:: clear C Program Heap
1104.. index:: clear RTEMS Workspace
1105.. index:: zero C Program Heap
1106.. index:: zero RTEMS Workspace
1107
1108.. _CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY:
1109
1110CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY
1111--------------------------------------
1112
1113.. rubric:: CONSTANT:
1114
1115``CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY``
1116
1117.. rubric:: OPTION TYPE:
1118
1119This configuration option is a boolean feature define.
1120
1121.. rubric:: DEFAULT CONFIGURATION:
1122
1123If this configuration option is undefined, then the described feature is not
1124enabled.
1125
1126.. rubric:: DESCRIPTION:
1127
1128In case this configuration option is defined, then the memory areas used for
1129the RTEMS Workspace and the C Program Heap are zeroed with a ``0x00`` byte
1130pattern during system initialization.
1131
1132.. rubric:: NOTES:
1133
1134Zeroing memory can add significantly to the system initialization time. It is
1135not necessary for RTEMS but is often assumed by support libraries.  In case
1136:ref:`CONFIGURE_DIRTY_MEMORY` is also defined, then the memory is first
1137dirtied and then zeroed.
Note: See TracBrowser for help on using the repository browser.