[PATCH] c-user: Modify CONFIGURE_INTERRUPT_STACK_SIZE
sebastian.huber at embedded-brains.de
Mon Oct 22 12:24:19 UTC 2018
Use CPU_STACK_MINIMUM_SIZE instead of CONFIGURE_MINIMUM_TASK_STACK_SIZE
to set the default value.
c-user/configuring_a_system.rst | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/c-user/configuring_a_system.rst b/c-user/configuring_a_system.rst
index 3e44239..73da125 100644
@@ -1668,27 +1668,40 @@ CONSTANT:
- Unsigned integer (``uint32_t``).
+ Unsigned integer.
- The default value is CONFIGURE_MINIMUM_TASK_STACK_SIZE, which is the
- minimum interrupt stack size.
+ The default value is ``BSP_INTERRUPT_STACK_SIZE`` in case it is defined,
+ otherwise the default value is ``CPU_STACK_MINIMUM_SIZE``.
- ``CONFIGURE_INTERRUPT_STACK_SIZE`` is set to the size of the interrupt
- stack. The interrupt stack size is often set by the BSP but since this
- memory may be allocated from the RTEMS Workspace, it must be accounted for.
+ The ``CONFIGURE_INTERRUPT_STACK_SIZE`` configuration option defines the
+ size of an interrupt stack in bytes.
- In some BSPs, changing this constant does NOT change the size of the
- interrupt stack, only the amount of memory reserved for it.
- Patches which result in this constant only being used in memory
- calculations when the interrupt stack is intended to be allocated from the
- RTEMS Workspace would be welcomed by the RTEMS Project.
+ The interrupt stack size must be aligned according to
+ There is one interrupt stack available for each configured processor
+ (:ref:`CONFIGURE_MAXIMUM_PROCESSORS <CONFIGURE_MAXIMUM_PROCESSORS>`). The
+ interrupt stack areas are statically allocated in a special linker section
+ (``.rtemsstack.interrupt``). The placement of this linker section is
+ Some BSPs use the interrupt stack as the initialization stack which is used
+ to perform the sequential system initialization before the multithreading
+ is started.
+ The interrupt stacks are covered by the :ref:`stack checker
+ <CONFIGURE_STACK_CHECKER_ENABLED>`. However, using a too small interrupt
+ stack size may still result in undefined behaviour.
+ In releases before RTEMS 5.1 the default value was
+ ``CONFIGURE_MINIMUM_TASK_STACK_SIZE`` instead of
.. index:: CONFIGURE_EXTRA_TASK_STACKS
.. index:: memory for task tasks
More information about the devel