mirror of
https://git.rtems.org/rtems-docs/
synced 2025-06-06 14:43:34 +08:00
c-user: Use configuration option references
This commit is contained in:
parent
79d05f58d7
commit
248168db70
@ -28,9 +28,9 @@ automatically. It assumes that all tasks are floating point and that all will
|
|||||||
be allocated the minimum stack space. This calculation includes the amount of
|
be allocated the minimum stack space. This calculation includes the amount of
|
||||||
memory that will be allocated for internal use by RTEMS. The automatic
|
memory that will be allocated for internal use by RTEMS. The automatic
|
||||||
calculation may underestimate the workspace size truly needed by the
|
calculation may underestimate the workspace size truly needed by the
|
||||||
application, in which case one can use the ``CONFIGURE_MEMORY_OVERHEAD`` macro
|
application, in which case one can use the :ref:`CONFIGURE_MEMORY_OVERHEAD`
|
||||||
to add a value to the estimate. See :ref:`Specify Memory Overhead` for more
|
macro to add a value to the estimate. See :ref:`Specify Memory Overhead` for
|
||||||
details.
|
more details.
|
||||||
|
|
||||||
The memory area for the RTEMS Workspace is determined by the BSP. In case the
|
The memory area for the RTEMS Workspace is determined by the BSP. In case the
|
||||||
RTEMS Workspace is too large for the available memory, then a fatal run-time
|
RTEMS Workspace is too large for the available memory, then a fatal run-time
|
||||||
@ -40,8 +40,8 @@ The file ``<rtems/confdefs.h>`` will calculate the value of the
|
|||||||
``work_space_size`` parameter of the Configuration Table. There are many
|
``work_space_size`` parameter of the Configuration Table. There are many
|
||||||
parameters the application developer can specify to help ``<rtems/confdefs.h>``
|
parameters the application developer can specify to help ``<rtems/confdefs.h>``
|
||||||
in its calculations. Correctly specifying the application requirements via
|
in its calculations. Correctly specifying the application requirements via
|
||||||
parameters such as ``CONFIGURE_EXTRA_TASK_STACKS`` and
|
parameters such as :ref:`CONFIGURE_EXTRA_TASK_STACKS` and
|
||||||
``CONFIGURE_MAXIMUM_TASKS`` is critical for production software.
|
:ref:`CONFIGURE_MAXIMUM_TASKS` is critical for production software.
|
||||||
|
|
||||||
For each class of objects, the allocation can operate in one of two ways. The
|
For each class of objects, the allocation can operate in one of two ways. The
|
||||||
default way has an ceiling on the maximum number of object instances which can
|
default way has an ceiling on the maximum number of object instances which can
|
||||||
@ -133,41 +133,42 @@ milliseconds is as follows:
|
|||||||
In this example, only a few configuration parameters are specified. The impact
|
In this example, only a few configuration parameters are specified. The impact
|
||||||
of these are as follows:
|
of these are as follows:
|
||||||
|
|
||||||
- The example specified ``CONFIGURE_RTEMS_INIT_TASK_TABLE`` but did not specify
|
- The example specified :ref:`CONFIGURE_RTEMS_INIT_TASKS_TABLE` but did not
|
||||||
any additional parameters. This results in a configuration of an application
|
specify any additional parameters. This results in a configuration of an
|
||||||
which will begin execution of a single initialization task named ``Init``
|
application which will begin execution of a single initialization task named
|
||||||
which is non-preemptible and at priority one (1).
|
``Init`` which is non-preemptible and at priority one (1).
|
||||||
|
|
||||||
- By specifying ``CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER``, this application
|
- By specifying :ref:`CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER`, this
|
||||||
is configured to have a clock tick device driver. Without a clock tick device
|
application is configured to have a clock tick device driver. Without a clock
|
||||||
driver, RTEMS has no way to know that time is passing and will be unable to
|
tick device driver, RTEMS has no way to know that time is passing and will be
|
||||||
support delays and wall time. Further configuration details about time are
|
unable to support delays and wall time. Further configuration details about
|
||||||
provided. Per ``CONFIGURE_MICROSECONDS_PER_TICK`` and
|
time are provided. Per :ref:`CONFIGURE_MICROSECONDS_PER_TICK` and
|
||||||
``CONFIGURE_TICKS_PER_TIMESLICE``, the user specified they wanted a clock
|
:ref:`CONFIGURE_TICKS_PER_TIMESLICE`, the user specified they wanted a clock
|
||||||
tick to occur each millisecond, and that the length of a timeslice would be
|
tick to occur each millisecond, and that the length of a timeslice would be
|
||||||
fifty (50) milliseconds.
|
fifty (50) milliseconds.
|
||||||
|
|
||||||
- By specifying ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``, the application
|
- By specifying :ref:`CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER`, the
|
||||||
will include a console device driver. Although the console device driver may
|
application will include a console device driver. Although the console device
|
||||||
support a combination of multiple serial ports and display and keyboard
|
driver may support a combination of multiple serial ports and display and
|
||||||
combinations, it is only required to provide a single device named
|
keyboard combinations, it is only required to provide a single device named
|
||||||
``/dev/console``. This device will be used for Standard Input, Output and
|
``/dev/console``. This device will be used for Standard Input, Output and
|
||||||
Error I/O Streams. Thus when ``CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER``
|
Error I/O Streams. Thus when
|
||||||
is specified, implicitly three (3) file descriptors are reserved for the
|
:ref:`CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER` is specified, implicitly
|
||||||
Standard I/O Streams and those file descriptors are associated with
|
three (3) file descriptors are reserved for the Standard I/O Streams and
|
||||||
``/dev/console`` during initialization. All console devices are expected to
|
those file descriptors are associated with ``/dev/console`` during
|
||||||
support the POSIX*termios* interface.
|
initialization. All console devices are expected to support the
|
||||||
|
POSIX*termios* interface.
|
||||||
|
|
||||||
- The example above specifies via ``CONFIGURE_MAXIMUM_TASKS`` that the
|
- The example above specifies via :ref:`CONFIGURE_MAXIMUM_TASKS` that the
|
||||||
application requires a maximum of four (4) simultaneously existing Classic
|
application requires a maximum of four (4) simultaneously existing Classic
|
||||||
API tasks. Similarly, by specifying ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``,
|
API tasks. Similarly, by specifying :ref:`CONFIGURE_MAXIMUM_MESSAGE_QUEUES`,
|
||||||
there may be a maximum of only one (1) concurrently existent Classic API
|
there may be a maximum of only one (1) concurrently existent Classic API
|
||||||
message queues.
|
message queues.
|
||||||
|
|
||||||
- The most surprising configuration parameter in this example is the use of
|
- The most surprising configuration parameter in this example is the use of
|
||||||
``CONFIGURE_MESSAGE_BUFFER_MEMORY``. Message buffer memory is allocated from
|
:ref:`CONFIGURE_MESSAGE_BUFFER_MEMORY`. Message buffer memory is allocated
|
||||||
the RTEMS Workspace and must be accounted for. In this example, the single
|
from the RTEMS Workspace and must be accounted for. In this example, the
|
||||||
message queue will have up to twenty (20) messages of type ``struct
|
single message queue will have up to twenty (20) messages of type ``struct
|
||||||
USER_MESSAGE``.
|
USER_MESSAGE``.
|
||||||
|
|
||||||
- The :ref:`CONFIGURE_INIT` constant must be defined in order to make
|
- The :ref:`CONFIGURE_INIT` constant must be defined in order to make
|
||||||
|
Loading…
x
Reference in New Issue
Block a user