RTEMS CPU Kit with SuperCore  4.10.99.0
Defines | Variables
rtems/confdefs.h File Reference

Configuration Table Template that will be Instantiated by an Application. More...

#include <rtems.h>
#include <rtems/score/apimutex.h>
#include <rtems/score/wkspace.h>
#include <bsp.h>
#include <sys/reent.h>
#include <rtems/libio.h>
#include <rtems/imfs.h>
#include <rtems/scheduler.h>
#include <rtems/malloc.h>
#include <rtems/posix/key.h>
#include <sys/types.h>
#include <signal.h>
#include <limits.h>
#include <mqueue.h>
#include <rtems/posix/barrier.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/mutex.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/pthread.h>
#include <rtems/posix/rwlock.h>
#include <rtems/posix/semaphore.h>
#include <rtems/posix/spinlock.h>
#include <rtems/posix/threadsup.h>
#include <rtems/posix/timer.h>
Include dependency graph for confdefs.h:

Go to the source code of this file.

Defines

#define CONFIGURE_NEWLIB_EXTENSION   1
 This macro determines whether the RTEMS reentrancy support for the Newlib C Library is enabled.
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS   3
 This macro defines the number of POSIX file descriptors allocated and managed by libio.
#define CONFIGURE_LIBIO_SEMAPHORES   1
 Semaphore count used by the IO library.
#define CONFIGURE_LIBIO_POSIX_KEYS   1
 POSIX key count used by the IO library.
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS   1
 This macro determines if termios is disabled by this application.
#define CONFIGURE_TERMIOS_SEMAPHORES   ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)
 This macro reserves the number of semaphores required by termios based upon the number of communication ports that will use it.
#define CONFIGURE_MAXIMUM_PTYS   0
 This macro specifies the number of PTYs that can be concurrently active.
#define CONFIGURE_SMP_MAXIMUM_PROCESSORS   1
#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK   IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
 IMFS.
#define CONFIGURE_BARRIERS_FOR_FIFOS   0
 This defines the miniIMFS file system table entry.
#define CONFIGURE_SEMAPHORES_FOR_FIFOS   0
#define CONFIGURE_STACK_CHECKER_EXTENSION   0
 DEVFS.
#define CONFIGURE_MAXIMUM_PRIORITY   PRIORITY_DEFAULT_MAXIMUM
 Maximum priority configuration.
#define CONFIGURE_SCHEDULER_PRIORITY
#define CONFIGURE_SCHEDULER_NAME   rtems_build_name('U', 'P', 'D', ' ')
#define CONFIGURE_SCHEDULER_CONTEXT
#define CONFIGURE_SCHEDULER_CONTROLS   RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME)
#define CONFIGURE_IDLE_TASK_BODY   _Thread_Idle_body
 Idle task body configuration.
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE   CPU_STACK_MINIMUM_SIZE
 By default, use the minimum stack size requested by this port.
#define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE   (2 * CONFIGURE_MINIMUM_TASK_STACK_SIZE)
#define CONFIGURE_IDLE_TASK_STACK_SIZE   CONFIGURE_MINIMUM_TASK_STACK_SIZE
 Idle task stack size configuration.
#define CONFIGURE_INTERRUPT_STACK_SIZE   CONFIGURE_MINIMUM_TASK_STACK_SIZE
 Interrupt stack size configuration.
#define CONFIGURE_INTERRUPT_STACK_MEMORY   _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE )
 This reserves memory for the interrupt stack if it is to be allocated by RTEMS rather than the BSP.
#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT   NULL
 Configure the very much optional task stack allocator initialization.
#define CONFIGURE_TASK_STACK_ALLOCATOR   _Workspace_Allocate
#define CONFIGURE_TASK_STACK_DEALLOCATOR   _Workspace_Free
#define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY   FALSE
 Should the RTEMS Workspace and C Program Heap be cleared automatically at system start up?
#define _Configure_Zero_or_One(_number)   ((_number) ? 1 : 0)
 Zero of one returns 0 if the parameter is 0 else 1 is returned.
#define _Configure_Align_up(_val, _align)   (((_val) + (_align) - 1) & ~((_align) - 1))
#define _Configure_From_workspace(_size)
 This is a helper macro used in calculations in this file.
#define _Configure_From_stackspace(_stack_size)   _Configure_From_workspace(_stack_size)
 This is a helper macro used in stack space calculations in this file.
#define _Configure_Max_Objects(_max)   (_Configure_Zero_or_One(_max) * rtems_resource_maximum_per_allocation(_max))
 Do not use the unlimited bit as part of the multiplication for memory usage.
#define _Configure_Object_RAM(_number, _size)
 This macro accounts for how memory for a set of configured objects is allocated from the Executive Workspace.
#define CONFIGURE_INIT_TASK_TABLE   NULL
#define CONFIGURE_INIT_TASK_TABLE_SIZE   0
#define CONFIGURE_INIT_TASK_STACK_SIZE   0
#define NULL_DRIVER_TABLE_ENTRY   { NULL, NULL, NULL, NULL, NULL, NULL }
#define CONFIGURE_MAXIMUM_DRIVERS
 This specifies the maximum number of device drivers that can be installed in the system at one time.
#define CONFIGURE_LIBBLOCK_TASKS   0
#define CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS   0
#define CONFIGURE_LIBBLOCK_SEMAPHORES   0
#define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK   0
#define CONFIGURE_MULTIPROCESSING_TABLE   NULL
#define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER   0
#define CONFIGURE_MAXIMUM_TASKS   0
 This macro specifies that the user wants to use unlimited objects for any classic or posix objects that have not already been given resource limits.
#define CONFIGURE_TASKS   (CONFIGURE_MAXIMUM_TASKS + CONFIGURE_LIBBLOCK_TASKS)
#define CONFIGURE_NOTEPADS_ENABLED   TRUE
#define CONFIGURE_MAXIMUM_TASK_VARIABLES   0
 This macro calculates the memory required for task variables.
#define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables)   0
#define CONFIGURE_MAXIMUM_TIMERS   0
#define CONFIGURE_MEMORY_FOR_TIMERS(_timers)   0
#define CONFIGURE_MAXIMUM_SEMAPHORES   0
#define CONFIGURE_SEMAPHORES
#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores)   _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) )
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES   0
#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues)   0
#define CONFIGURE_MAXIMUM_PARTITIONS   0
#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions)   0
#define CONFIGURE_MAXIMUM_REGIONS   0
#define CONFIGURE_MEMORY_FOR_REGIONS(_regions)   0
#define CONFIGURE_MAXIMUM_PORTS   0
#define CONFIGURE_MEMORY_FOR_PORTS(_ports)   0
#define CONFIGURE_MAXIMUM_PERIODS   0
#define CONFIGURE_MEMORY_FOR_PERIODS(_periods)   0
#define CONFIGURE_MAXIMUM_BARRIERS   0
#define CONFIGURE_BARRIERS   (CONFIGURE_MAXIMUM_BARRIERS + CONFIGURE_BARRIERS_FOR_FIFOS)
#define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers)   0
#define CONFIGURE_MAXIMUM_USER_EXTENSIONS   0
#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions)   0
#define CONFIGURE_MICROSECONDS_PER_TICK   RTEMS_MILLISECONDS_TO_MICROSECONDS(10)
#define CONFIGURE_TICKS_PER_TIMESLICE   50
#define CONFIGURE_MAXIMUM_POSIX_KEYS   0
#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS
#define CONFIGURE_POSIX_KEYS   (CONFIGURE_MAXIMUM_POSIX_KEYS + CONFIGURE_LIBIO_POSIX_KEYS)
#define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys, _key_value_pairs)
#define _Configure_POSIX_Named_Object_RAM(_number, _size)
 Account for the object control structures plus the name of the object to be duplicated.
#define CONFIGURE_MAXIMUM_POSIX_THREADS   0
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES   0
#define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes)   _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES   0
#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars)
#define CONFIGURE_MAXIMUM_POSIX_TIMERS   0
#define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers)   _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) )
#define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS   0
#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals)
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES   0
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS   0
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues)
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_mqueue_fds)
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES   0
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores)
#define CONFIGURE_MAXIMUM_POSIX_BARRIERS   0
#define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers)   _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) )
#define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS   0
#define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks)   _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) )
#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS   0
#define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks)   _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) )
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME   NULL
#define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE   0
#define CONFIGURE_MEMORY_FOR_POSIX
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE   0
#define CONFIGURE_GNAT_MUTEXES   0
#define CONFIGURE_MAXIMUM_ADA_TASKS   0
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS   0
#define CONFIGURE_GO_INIT_MUTEXES   0
#define CONFIGURE_GO_INIT_CONDITION_VARIABLES   0
#define CONFIGURE_MAXIMUM_GOROUTINES   0
#define CONFIGURE_GOROUTINES_TASK_VARIABLES   0
#define CONFIGURE_MAXIMUM_GO_CHANNELS   0
#define CONFIGURE_EXTRA_TASK_STACKS   0
 This is so we can account for tasks with stacks greater than minimum size.
#define CONFIGURE_POSIX_THREADS
 This macro provides a summation of the various POSIX thread requirements.
#define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks)
 Account for allocating the following per object + array of object control structures + local pointer table -- pointer per object plus a zero'th entry in the local pointer table.
#define CONFIGURE_MEMORY_FOR_MP   0
 This defines the amount of memory configured for the multiprocessing support required by this application.
#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size)
 The following macro is used to calculate the memory allocated by RTEMS for the message buffers associated with a particular message queue.
#define CONFIGURE_MESSAGE_BUFFER_MEMORY   0
 This macros is set to the amount of memory required for pending message buffers in bytes.
#define CONFIGURE_MEMORY_OVERHEAD   0
 This macro is available just in case the confdefs.h file underallocates memory for a particular application.
#define CONFIGURE_INTERRUPT_VECTOR_TABLE
 On architectures that use Simple Vectored Interrupts, it is RTEMS responsibility to allocate the vector table.
#define CONFIGURE_API_MUTEX_MEMORY   _Configure_Object_RAM(2, sizeof(API_Mutex_Control))
 RTEMS uses two instance of an internal mutex class.
#define CONFIGURE_IDLE_TASKS_COUNT   CONFIGURE_SMP_MAXIMUM_PROCESSORS
 This calculates the amount of memory reserved for the IDLE tasks.
#define CONFIGURE_MEMORY_FOR_IDLE_TASK   CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_IDLE_TASKS_COUNT, 0)
 This defines the formula used to compute the amount of memory reserved for IDLE task control structures.
#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD
 This macro accounts for general RTEMS system overhead.
#define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS
 This macro reserves the memory required by the statically configured user extensions.
#define CONFIGURE_MEMORY_FOR_CLASSIC
 This macro provides a summation of the memory required by the Classic API as configured.
#define CONFIGURE_MEMORY_FOR_SMP
#define CONFIGURE_EXECUTIVE_RAM_SIZE
 This calculates the memory required for the executive workspace.
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART   0
 This accounts for any extra memory required by the Classic API Initialization Task.
#define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART   0
 This accounts for any extra memory required by the POSIX API Initialization Thread.
#define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS
 This macro provides a summation of the various initialization task and thread stack requirements.
#define CONFIGURE_IDLE_TASKS_STACK
#define CONFIGURE_TASKS_STACK
#define CONFIGURE_POSIX_THREADS_STACK
#define CONFIGURE_GOROUTINES_STACK
#define CONFIGURE_ADA_TASKS_STACK
#define CONFIGURE_STACK_SPACE_SIZE

Variables

rtems_initialization_tasks_table Initialization_tasks []
rtems_multiprocessing_table Multiprocessing_configuration
posix_api_configuration_table Configuration_POSIX_API
int rtems_telnetd_maximum_ptys
 This variable contains the maximum number of PTYs that can be concurrently active.

Detailed Description

Configuration Table Template that will be Instantiated by an Application.

This include file contains the configuration table template that will be instantiated by an application based on the setting of a number of macros. The macros are documented in the Configuring a System chapter of the Classic API User's Guide

The model is to estimate the memory required for each configured item and sum those estimates. The estimate can be too high or too low for a variety of reasons:

Reasons estimate is too high: + FP contexts (not all tasks are FP)

Reasons estimate is too low: + stacks greater than minimum size + messages + application must account for device driver resources + application must account for add-on library resource requirements

NOTE: Eventually this may be able to take into account some of the above. This procedure has evolved from just enough to support the RTEMS Test Suites into something that can be used remarkably reliably by most applications.


Define Documentation

#define _Configure_From_stackspace (   _stack_size)    _Configure_From_workspace(_stack_size)

This is a helper macro used in stack space calculations in this file.

It may be provided by the application in case a special task stack allocator is used. The default is allocation from the RTEMS Workspace.

#define _Configure_From_workspace (   _size)
Value:
(ssize_t) (_Configure_Zero_or_One(_size) * \
     _Configure_Align_up((_size) + HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT))

This is a helper macro used in calculations in this file.

It is used to noted when an element is allocated from the RTEMS Workspace and adds a factor to account for heap overhead plus an alignment factor that may be applied.

#define _Configure_Object_RAM (   _number,
  _size 
)
Value:
( \
    _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \
    _Configure_From_workspace( \
      _Configure_Zero_or_One(_number) * ( \
        (_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *) + \
        _Configure_Align_up(sizeof(void *), CPU_ALIGNMENT) + \
        _Configure_Align_up(sizeof(uint32_t), CPU_ALIGNMENT) \
      ) \
    ) \
  )

This macro accounts for how memory for a set of configured objects is allocated from the Executive Workspace.

NOTE: It does NOT attempt to address the more complex case of unlimited objects.

#define _Configure_POSIX_Named_Object_RAM (   _number,
  _size 
)
Value:
_Configure_Object_RAM( (_number), _size ) + \
    (_Configure_Max_Objects(_number) * _Configure_From_workspace(NAME_MAX) )

Account for the object control structures plus the name of the object to be duplicated.

#define CONFIGURE_ADA_TASKS_STACK
Value:
(_Configure_Max_Objects( CONFIGURE_MAXIMUM_ADA_TASKS ) * \
    _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
#define CONFIGURE_API_MUTEX_MEMORY   _Configure_Object_RAM(2, sizeof(API_Mutex_Control))

RTEMS uses two instance of an internal mutex class.

This accounts for these mutexes.

#define CONFIGURE_BARRIERS_FOR_FIFOS   0

This defines the miniIMFS file system table entry.

Internall it is called FIFOs not pipes This defines the IMFS file system table entry. This sets up the resources for the PIPES/FIFOs

#define CONFIGURE_EXECUTIVE_RAM_SIZE
Value:
(( \
   CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \
   CONFIGURE_MEMORY_FOR_TASKS( \
     CONFIGURE_TASKS, CONFIGURE_TASKS) + \
   CONFIGURE_MEMORY_FOR_TASKS( \
     CONFIGURE_POSIX_THREADS, CONFIGURE_POSIX_THREADS) + \
   CONFIGURE_MEMORY_FOR_CLASSIC + \
   CONFIGURE_MEMORY_FOR_POSIX_KEYS( \
      CONFIGURE_POSIX_KEYS, \
      CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS ) + \
   CONFIGURE_MEMORY_FOR_POSIX + \
   CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \
   CONFIGURE_MEMORY_FOR_MP + \
   CONFIGURE_MEMORY_FOR_SMP + \
   CONFIGURE_MESSAGE_BUFFER_MEMORY + \
   (CONFIGURE_MEMORY_OVERHEAD * 1024) \
) & ~0x7)

This calculates the memory required for the executive workspace.

#define CONFIGURE_EXTRA_TASK_STACKS   0

This is so we can account for tasks with stacks greater than minimum size.

This is in bytes.

#define CONFIGURE_GOROUTINES_STACK
Value:
(_Configure_Max_Objects( CONFIGURE_MAXIMUM_GOROUTINES ) * \
    _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
#define CONFIGURE_IDLE_TASK_BODY   _Thread_Idle_body

Idle task body configuration.

There is a default IDLE thread body provided by RTEMS which has the possibility of being CPU specific. There may be a BSP specific override of the RTEMS default body and in turn, the application may override and provide its own.

#define CONFIGURE_IDLE_TASK_STACK_SIZE   CONFIGURE_MINIMUM_TASK_STACK_SIZE

Idle task stack size configuration.

By default, the IDLE task will have a stack of minimum size. The BSP or application may override this value.

#define CONFIGURE_IDLE_TASKS_COUNT   CONFIGURE_SMP_MAXIMUM_PROCESSORS

This calculates the amount of memory reserved for the IDLE tasks.

In an SMP system, each CPU core has its own idle task.

#define CONFIGURE_IDLE_TASKS_STACK
Value:
(CONFIGURE_IDLE_TASKS_COUNT * \
    _Configure_From_stackspace( CONFIGURE_IDLE_TASK_STACK_SIZE ) )
#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK   IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK

IMFS.

This specifies the number of bytes per block for files within the IMFS. There are a maximum number of blocks per file so this dictates the maximum size of a file. This has to be balanced with the unused portion of each block that might be wasted.

#define CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS
Value:
(CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \
    CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART)

This macro provides a summation of the various initialization task and thread stack requirements.

#define CONFIGURE_INTERRUPT_STACK_MEMORY   _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE )

This reserves memory for the interrupt stack if it is to be allocated by RTEMS rather than the BSP.

Todo:
Try to get to the point where all BSPs support allocating the memory from the Workspace.
#define CONFIGURE_INTERRUPT_STACK_SIZE   CONFIGURE_MINIMUM_TASK_STACK_SIZE

Interrupt stack size configuration.

By default, the interrupt stack will be of minimum size. The BSP or application may override this value.

#define CONFIGURE_INTERRUPT_VECTOR_TABLE
Value:

On architectures that use Simple Vectored Interrupts, it is RTEMS responsibility to allocate the vector table.

This avoids reserving the memory on architectures that use the Programmable Interrupt Controller Vectored Interrupts.

#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS   3

This macro defines the number of POSIX file descriptors allocated and managed by libio.

These are the "integer" file descriptors that are used by calls like open(2) and read(2).

#define CONFIGURE_MAXIMUM_DRIVERS

This specifies the maximum number of device drivers that can be installed in the system at one time.

It must account for both the statically and dynamically installed drivers.

#define CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS
Value:
(CONFIGURE_MAXIMUM_POSIX_KEYS * \
     (CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_TASKS))
#define CONFIGURE_MAXIMUM_PRIORITY   PRIORITY_DEFAULT_MAXIMUM

Maximum priority configuration.

This configures the maximum priority value that a task may have.

The following applies to the data space requirements of the Priority Scheduler.

By reducing the number of priorities in a system, the amount of RAM required by RTEMS can be significantly reduced. RTEMS allocates a Chain_Control structure per priority and this structure contains 3 pointers. So the default is (256 * 12) = 3K on 32-bit architectures.

This must be one less than a power of 2 between 4 and 256. Valid values along with the application priority levels and memory saved when pointers are 32-bits in size are:

+ 3, 2 application priorities, 3024 bytes saved + 7, 5 application priorities, 2976 bytes saved + 15, 13 application priorities, 2880 bytes saved + 31, 29 application priorities, 2688 bytes saved + 63, 61 application priorities, 2304 bytes saved + 127, 125 application priorities, 1536 bytes saved + 255, 253 application priorities, 0 bytes saved

It is specified in terms of Classic API priority values.

#define CONFIGURE_MAXIMUM_TASK_VARIABLES   0

This macro calculates the memory required for task variables.

Each task variable is individually allocated from the Workspace. Hence, we do the multiplication on the configured size.

Note:
Per-task variables are disabled for SMP configurations.
#define CONFIGURE_MEMORY_FOR_CLASSIC
Value:
(CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES + \
    CONFIGURE_GOROUTINES_TASK_VARIABLES) + \
   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \
    CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \
   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES) + \
   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
   CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \
   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
   CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_BARRIERS) + \
   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \
  )

This macro provides a summation of the memory required by the Classic API as configured.

#define CONFIGURE_MEMORY_FOR_POSIX
Value:
( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES + \
          CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_MUTEXES) + \
      CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
          CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
          CONFIGURE_MAXIMUM_GO_CHANNELS + CONFIGURE_GO_INIT_CONDITION_VARIABLES) + \
      CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
          CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \
      CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \
          CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \
      CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS( \
          CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS ) + \
      CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \
          CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \
      CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \
      CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \
          CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \
      CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \
          CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \
      CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) \
     )
#define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES (   _condvars)
#define CONFIGURE_MEMORY_FOR_POSIX_KEYS (   _keys,
  _key_value_pairs 
)
Value:
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS (   _mqueue_fds)
Value:
#define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES (   _message_queues)
#define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS (   _queued_signals)
Value:
_Configure_From_workspace( \
      (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) )
#define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES (   _semaphores)
#define CONFIGURE_MEMORY_FOR_SMP
Value:
(CONFIGURE_SMP_MAXIMUM_PROCESSORS * \
      _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE ) \
     )
#define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS
Value:
(CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS == 0 ? 0 : \
    _Configure_From_workspace( \
      CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \
        * sizeof(User_extensions_Switch_control) \
    ))

This macro reserves the memory required by the statically configured user extensions.

#define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD
Value:
( CONFIGURE_MEMORY_FOR_IDLE_TASK +                /* IDLE and stack */ \
    CONFIGURE_INTERRUPT_VECTOR_TABLE +             /* interrupt vectors */ \
    CONFIGURE_INTERRUPT_STACK_MEMORY +             /* interrupt stack */ \
    CONFIGURE_API_MUTEX_MEMORY                     /* allocation mutex */ \
  )

This macro accounts for general RTEMS system overhead.

#define CONFIGURE_MEMORY_FOR_TASKS (   _tasks,
  _number_FP_tasks 
)
Value:
( \
    _Configure_Object_RAM(_tasks, sizeof(Configuration_Thread_control)) \
      + _Configure_Max_Objects(_number_FP_tasks) \
        * _Configure_From_workspace(CONTEXT_FP_SIZE) \
        * (CONTEXT_FP_SIZE != 0) \
  )

Account for allocating the following per object + array of object control structures + local pointer table -- pointer per object plus a zero'th entry in the local pointer table.

#define CONFIGURE_MEMORY_OVERHEAD   0

This macro is available just in case the confdefs.h file underallocates memory for a particular application.

This lets the user add some extra memory in case something broken and underestimates.

It is also possible for cases where confdefs.h overallocates memory, you could substract memory from the allocated. The estimate is just that, an estimate, and assumes worst case alignment and padding on each allocated element. So in some cases it could be too conservative.

NOTE: Historically this was used for message buffers.

#define CONFIGURE_MESSAGE_BUFFER_MEMORY   0

This macros is set to the amount of memory required for pending message buffers in bytes.

It should be constructed by adding together a set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE.

#define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE (   _messages,
  _size 
)
Value:
_Configure_From_workspace( \
      (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control)))

The following macro is used to calculate the memory allocated by RTEMS for the message buffers associated with a particular message queue.

There is a fixed amount of overhead per message.

#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS   1

This macro determines if termios is disabled by this application.

This only means that resources will not be reserved. If you end up using termios, it will fail. This macro specifies the number of serial or PTY ports that will use termios.

#define CONFIGURE_POSIX_THREADS
Value:
(CONFIGURE_MAXIMUM_POSIX_THREADS + \
     CONFIGURE_MAXIMUM_ADA_TASKS + \
     CONFIGURE_MAXIMUM_GOROUTINES)

This macro provides a summation of the various POSIX thread requirements.

#define CONFIGURE_POSIX_THREADS_STACK
Value:
(_Configure_Max_Objects( CONFIGURE_MAXIMUM_POSIX_THREADS ) * \
    _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) )
#define CONFIGURE_SCHEDULER_CONTEXT
Value:
RTEMS_SCHEDULER_CONTEXT_PRIORITY( \
        dflt, \
        CONFIGURE_MAXIMUM_PRIORITY + 1 \
      )
#define CONFIGURE_SEMAPHORES
Value:
(CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
      CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
      CONFIGURE_SEMAPHORES_FOR_FIFOS)
#define CONFIGURE_STACK_CHECKER_EXTENSION   0

DEVFS.

DOSFS RFS JFFS2 This configures the stack checker user extension.

#define CONFIGURE_STACK_SPACE_SIZE
Value:
( \
    CONFIGURE_IDLE_TASKS_STACK + \
    CONFIGURE_INITIALIZATION_THREADS_EXTRA_STACKS + \
    CONFIGURE_TASKS_STACK + \
    CONFIGURE_POSIX_THREADS_STACK + \
    CONFIGURE_GOROUTINES_STACK + \
    CONFIGURE_ADA_TASKS_STACK + \
    CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK + \
    CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS + \
    CONFIGURE_EXTRA_TASK_STACKS \
  )
#define CONFIGURE_TASKS_STACK
Value:
(_Configure_Max_Objects( CONFIGURE_TASKS ) * \
    _Configure_From_stackspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) )