[6449498] | 1 | @c COPYRIGHT (c) 1988-2002. |
---|
[ae68ff0] | 2 | @c On-Line Applications Research Corporation (OAR). |
---|
| 3 | @c All rights reserved. |
---|
| 4 | @c |
---|
[139b2e4a] | 5 | @c $Id$ |
---|
| 6 | @c |
---|
[ae68ff0] | 7 | |
---|
[bae90e1] | 8 | @c The following macros from confdefs.h have not been discussed in this |
---|
| 9 | @c chapter: |
---|
| 10 | @c |
---|
[6e58367] | 11 | @c CONFIGURE_NEWLIB_EXTENSION - probably not needed |
---|
[bae90e1] | 12 | @c |
---|
| 13 | @c In addition, there should be examples of defining your own |
---|
| 14 | @c Device Driver Table, Init task table, etc. |
---|
| 15 | @c |
---|
| 16 | @c Regardless, this is a big step up. :) |
---|
| 17 | @c |
---|
| 18 | |
---|
[ae68ff0] | 19 | @chapter Configuring a System |
---|
[20515fc] | 20 | |
---|
[794d745] | 21 | @section Introduction |
---|
| 22 | |
---|
| 23 | RTEMS must be configured for an application. This configuration |
---|
| 24 | information encompasses a variety of information including |
---|
| 25 | the length of each clock tick, the maximum number of each RTEMS |
---|
| 26 | object that can be created, the application initialization tasks, |
---|
| 27 | and the device drivers in the application. This information |
---|
| 28 | is placed in data structures that are given to RTEMS at |
---|
| 29 | system initialization time. This chapter details the |
---|
| 30 | format of these data structures as well as a simpler |
---|
| 31 | mechanism to automate the generation of these structures. |
---|
| 32 | |
---|
[ae10dbd] | 33 | @ifset is-Ada |
---|
| 34 | System configuration is ALWAYS done from C. When developing |
---|
| 35 | an Ada application, the user is responsible for creating at |
---|
| 36 | least one C file which contains the Ada run-time initialization |
---|
| 37 | and the RTEMS System Configuration. There is no Ada binding |
---|
| 38 | for RTEMS System Configuration information. Thus all examples |
---|
| 39 | and data structures shown in this chapter are in C. |
---|
| 40 | @end ifset |
---|
[794d745] | 41 | |
---|
[bae90e1] | 42 | @section Automatic Generation of System Configuration |
---|
| 43 | |
---|
[169502e] | 44 | @cindex confdefs.h |
---|
[794d745] | 45 | @findex confdefs.h |
---|
[169502e] | 46 | |
---|
[bfa0476] | 47 | RTEMS provides the @code{rtems/confdefs.h} C language header file that |
---|
[bae90e1] | 48 | based on the setting of a variety of macros can automatically |
---|
| 49 | produce nearly all of the configuration tables required |
---|
| 50 | by an RTEMS application. Rather than building the individual |
---|
[e95cfafb] | 51 | tables by hand, the application simply specifies the values |
---|
[bae90e1] | 52 | for the configuration parameters it wishes to set. In the following |
---|
| 53 | example, the configuration information for a simple system with |
---|
| 54 | a message queue and a time slice of 50 milliseconds is configured: |
---|
| 55 | |
---|
| 56 | @example |
---|
| 57 | @group |
---|
[6e58367] | 58 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
| 59 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[bae90e1] | 60 | |
---|
| 61 | #define CONFIGURE_MICROSECONDS_PER_TICK 1000 /* 1 millisecond */ |
---|
| 62 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 /* 50 milliseconds */ |
---|
| 63 | |
---|
[81ecc05b] | 64 | #define CONFIGURE_MAXIMUM_TASKS 4 |
---|
[bae90e1] | 65 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 66 | @end group |
---|
| 67 | @end example |
---|
| 68 | |
---|
| 69 | This system will begin execution with the single initialization task |
---|
| 70 | named @code{Init}. It will be configured to have both a console |
---|
| 71 | device driver (for standard I/O) and a clock tick device driver. |
---|
| 72 | |
---|
| 73 | For each configuration parameter in the configuration tables, the |
---|
| 74 | macro corresponding to that field is discussed. Most systems |
---|
[bfa0476] | 75 | can be easily configured using the @code{rtems/confdefs.h} mechanism. |
---|
[bae90e1] | 76 | |
---|
[6e58367] | 77 | The @code{CONFIGURE_INIT} constant must be defined in order to |
---|
[bfa0476] | 78 | make @code{rtems/confdefs.h} instantiate the configuration data |
---|
[6e58367] | 79 | structures. This can only be defined in one source file per |
---|
[bfa0476] | 80 | application that includes @code{rtems/confdefs.h} or the symbol |
---|
[6e58367] | 81 | table will be instantiated multiple times and linking errors |
---|
| 82 | produced. |
---|
| 83 | |
---|
[81ecc05b] | 84 | The user should be aware that the defaults are intentionally |
---|
| 85 | set as low as possible. By default, no application resources |
---|
[bfa0476] | 86 | are configured. The @code{rtems/confdefs.h} file ensures that |
---|
[81ecc05b] | 87 | at least one application tasks or thread is configured |
---|
| 88 | and that at least one of the initialization task/thread |
---|
| 89 | tables is configured. |
---|
| 90 | |
---|
[bfa0476] | 91 | The @code{rtems/confdefs.h} file estimates the amount of |
---|
[81ecc05b] | 92 | memory required for the RTEMS Executive Workspace. This |
---|
| 93 | estimate is only as accurate as the information given |
---|
[bfa0476] | 94 | to @code{rtems/confdefs.h} and may be either too high or too |
---|
[81ecc05b] | 95 | low for a variety of reasons. Some of the reasons that |
---|
[bfa0476] | 96 | @code{rtems/confdefs.h} may reserve too much memory for RTEMS |
---|
[81ecc05b] | 97 | are: |
---|
| 98 | |
---|
| 99 | @itemize @bullet |
---|
| 100 | @item All tasks/threads are assumed to be floating point. |
---|
| 101 | @end itemize |
---|
| 102 | |
---|
| 103 | Conversely, there are many more reasons, the resource |
---|
| 104 | estimate could be too low: |
---|
| 105 | |
---|
| 106 | @itemize @bullet |
---|
| 107 | @item Task/thread stacks greater than minimum size must be |
---|
| 108 | accounted for explicitly by developer. |
---|
| 109 | |
---|
| 110 | @item Memory for messages is not included. |
---|
| 111 | |
---|
| 112 | @item Device driver requirements are not included. |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | @item Network stack requirements are not included. |
---|
| 116 | |
---|
| 117 | @item Requirements for add-on libraries are not included. |
---|
| 118 | @end itemize |
---|
| 119 | |
---|
[bfa0476] | 120 | In general, @code{rtems/confdefs.h} is very accurate when given |
---|
[81ecc05b] | 121 | enough information. However, it is quite easy to use |
---|
| 122 | a library and not account for its resources. |
---|
| 123 | |
---|
[1dbf307] | 124 | The following subsection list all of the constants which can be |
---|
| 125 | set by the user. |
---|
| 126 | |
---|
| 127 | @subsection Library Support Definitions |
---|
| 128 | |
---|
[6e58367] | 129 | This section defines the file system and IO library |
---|
| 130 | related configuration parameters supported by |
---|
[bfa0476] | 131 | @code{rtems/confdefs.h}. |
---|
[6e58367] | 132 | |
---|
[1dbf307] | 133 | @itemize @bullet |
---|
[d5671b1] | 134 | @findex CONFIGURE_MALLOC_STATISTICS |
---|
| 135 | @item @code{CONFIGURE_MALLOC_STATISTICS} is defined when the application |
---|
| 136 | wishes to enable the gathering of more detailed statistics on the |
---|
| 137 | C Malloc Family of routines. |
---|
| 138 | |
---|
| 139 | @findex CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 140 | @item @code{CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK} is defined by a BSP |
---|
| 141 | to indicate that it does not allocate all available memory to the |
---|
| 142 | C Program Heap used by the Malloc Family of routines. If defined, |
---|
| 143 | when @code{malloc()} is unable to allocate memory, it will call |
---|
| 144 | the BSP supplied @code{sbrk()} to obtain more memory. |
---|
| 145 | |
---|
[794d745] | 146 | @findex CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
[6e58367] | 147 | @item @code{CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS} is set to the |
---|
| 148 | maximum number of files that can be concurrently open. Libio requires |
---|
| 149 | a Classic RTEMS semaphore for each file descriptor as well as one |
---|
[81ecc05b] | 150 | global one. The default value is 3 file descriptors which is |
---|
| 151 | enough to support standard input, output, and error output. |
---|
| 152 | |
---|
| 153 | @findex CONFIGURE_TERMIOS_DISABLED |
---|
| 154 | @item @code{CONFIGURE_TERMIOS_DISABLED} is defined if the |
---|
| 155 | software implementing POSIX termios functionality is |
---|
| 156 | not going to be used by this application. By default, this |
---|
| 157 | is not defined and resources are reserved for the |
---|
| 158 | termios functionality. |
---|
| 159 | |
---|
| 160 | @findex CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
| 161 | @item @code{CONFIGURE_NUMBER_OF_TERMIOS_PORTS} is set to the |
---|
| 162 | number of ports using the termios functionality. Each |
---|
| 163 | concurrently active termios port requires resources. |
---|
| 164 | By default, this is set to 1 so a console port can be |
---|
| 165 | used. |
---|
[6e58367] | 166 | |
---|
[794d745] | 167 | @findex CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
[6e58367] | 168 | @item @code{CONFIGURE_HAS_OWN_MOUNT_TABLE} is defined when the |
---|
| 169 | application provides their own filesystem mount table. The |
---|
| 170 | mount table is an array of @code{rtems_filesystem_mount_table_t} |
---|
| 171 | entries pointed to by the global variable |
---|
| 172 | @code{rtems_filesystem_mount_table}. The number of |
---|
| 173 | entries in this table is in an integer variable named |
---|
| 174 | @code{rtems_filesystem_mount_table_t}. |
---|
| 175 | |
---|
[81ecc05b] | 176 | @findex CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM |
---|
| 177 | @item @code{CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM} is defined |
---|
| 178 | if the application wishes to use the full functionality |
---|
| 179 | IMFS. By default, the miniIMFS is used. The miniIMFS |
---|
| 180 | is a minimal functionality subset of the In-Memory |
---|
| 181 | FileSystem (IMFS). The miniIMFS is comparable |
---|
[6e58367] | 182 | in functionality to the pseudo-filesystem name space provided |
---|
| 183 | before RTEMS release 4.5.0. The miniIMFS supports |
---|
| 184 | only directories and device nodes and is smaller in executable |
---|
[81ecc05b] | 185 | code size than the full IMFS. |
---|
[6e58367] | 186 | |
---|
[794d745] | 187 | @findex STACK_CHECKER_ON |
---|
[6e58367] | 188 | @item @code{STACK_CHECKER_ON} is defined when the application |
---|
| 189 | wishes to enable run-time stack bounds checking. This increases |
---|
| 190 | the time required to create tasks as well as adding overhead |
---|
| 191 | to each context switch. By default, this is not defined and |
---|
| 192 | thus stack checking is disabled. |
---|
| 193 | |
---|
[1dbf307] | 194 | @end itemize |
---|
| 195 | |
---|
| 196 | @subsection Basic System Information |
---|
| 197 | |
---|
[6e58367] | 198 | This section defines the general system configuration parameters supported by |
---|
[bfa0476] | 199 | @code{rtems/confdefs.h}. |
---|
[6e58367] | 200 | |
---|
[1dbf307] | 201 | @itemize @bullet |
---|
[794d745] | 202 | @findex CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
[6e58367] | 203 | @item @code{CONFIGURE_HAS_OWN_CONFIGURATION_TABLE} should only be defined |
---|
| 204 | if the application is providing their own complete set of configuration |
---|
| 205 | tables. |
---|
| 206 | |
---|
[66c50e2] | 207 | @findex CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 208 | @item @code{CONFIGURE_INTERRUPT_STACK_SIZE} is set to the |
---|
[6e58367] | 209 | size of the interrupt stack. The interrupt stack size is |
---|
| 210 | usually set by the BSP but since this memory is allocated |
---|
| 211 | from the RTEMS Ram Workspace, it must be accounted for. The |
---|
[81ecc05b] | 212 | default for this field is RTEMS_MINIMUM_STACK_SIZE. [NOTE: |
---|
[66c50e2] | 213 | In some BSPs, changing this constant does NOT change the |
---|
[81ecc05b] | 214 | size of the interrupt stack, only the amount of memory |
---|
| 215 | reserved for it.] |
---|
[6e58367] | 216 | |
---|
[794d745] | 217 | @findex CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
[6e58367] | 218 | @item @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA} is the base |
---|
| 219 | address of the RTEMS RAM Workspace. By default, this value |
---|
| 220 | is NULL indicating that the BSP is to determine the location |
---|
| 221 | of the RTEMS RAM Workspace. |
---|
| 222 | |
---|
[794d745] | 223 | @findex CONFIGURE_MICROSECONDS_PER_TICK |
---|
[6e58367] | 224 | @item @code{CONFIGURE_MICROSECONDS_PER_TICK} is the length |
---|
| 225 | of time between clock ticks. By default, this is set to |
---|
| 226 | 10000 microseconds. |
---|
| 227 | |
---|
[794d745] | 228 | @findex CONFIGURE_TICKS_PER_TIMESLICE |
---|
[3e066540] | 229 | @item @code{CONFIGURE_TICKS_PER_TIMESLICE} is the length |
---|
| 230 | of the timeslice quantum in ticks for each task. By |
---|
| 231 | default, this is 50. |
---|
| 232 | |
---|
[66c50e2] | 233 | @fnindex CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 234 | @item @code{CONFIGURE_INTERRUPT_STACK_SIZE} is set to the |
---|
| 235 | desired stack size for the interrupt. If not specified, |
---|
| 236 | the interrupt stack will be of minimum size. The default |
---|
| 237 | value is @code{RTEMS_MINIMUM_STACK_SIZE}. |
---|
| 238 | |
---|
[3e066540] | 239 | @findex CONFIGURE_TASK_STACK_ALLOCATOR |
---|
| 240 | @item @code{CONFIGURE_TASK_STACK_ALLOCATOR} |
---|
| 241 | may point to a user provided routine to allocate task stacks. |
---|
| 242 | The default value for this field is NULL which indicates that |
---|
| 243 | task stacks will be allocated from the RTEMS Workspace. |
---|
| 244 | |
---|
| 245 | @findex CONFIGURE_TASK_STACK_DEALLOCATOR |
---|
| 246 | @item @code{CONFIGURE_TASK_STACK_DEALLOCATOR} |
---|
| 247 | may point to a user provided routine to free task stacks. |
---|
| 248 | The default value for this field is NULL which indicates that |
---|
| 249 | task stacks will be allocated from the RTEMS Workspace. |
---|
| 250 | |
---|
| 251 | @findex CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 252 | @item @code{CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY} |
---|
| 253 | indicates whether RTEMS should zero the RTEMS Workspace and |
---|
| 254 | C Program Heap as part of its initialization. If set to |
---|
| 255 | TRUE, the Workspace is zeroed. Otherwise, it is not. |
---|
| 256 | Unless overridden by the BSP, the default value for this |
---|
| 257 | field is FALSE. |
---|
[6e58367] | 258 | |
---|
[bfa0476] | 259 | @findex CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
| 260 | @item @code{CONFIGURE_MESSAGE_BUFFER_MEMORY} is set to the number of |
---|
| 261 | bytes the application requires to be reserved for pending message queue |
---|
| 262 | buffers. This value should include memory for all buffers across |
---|
| 263 | all APIs. The default value is 0. |
---|
| 264 | |
---|
[794d745] | 265 | @findex CONFIGURE_MEMORY_OVERHEAD |
---|
[6e58367] | 266 | @item @code{CONFIGURE_MEMORY_OVERHEAD} is set to the number of |
---|
[bfa0476] | 267 | kilobytes the application wishes to add to the requirements calculated |
---|
| 268 | by @code{rtems/confdefs.h}. The default value is 0. |
---|
[6e58367] | 269 | |
---|
[794d745] | 270 | @findex CONFIGURE_EXTRA_TASK_STACKS |
---|
[6e58367] | 271 | @item @code{CONFIGURE_EXTRA_TASK_STACKS} is set to the number of |
---|
| 272 | bytes the applications wishes to add to the task stack requirements |
---|
[bfa0476] | 273 | calculated by @code{rtems/confdefs.h}. This parameter is very important. |
---|
[6e58367] | 274 | If the application creates tasks with stacks larger then the |
---|
[bfa0476] | 275 | minimum, then that memory is NOT accounted for by @code{rtems/confdefs.h}. |
---|
[6e58367] | 276 | The default value is 0. |
---|
| 277 | |
---|
[1dbf307] | 278 | @end itemize |
---|
| 279 | |
---|
| 280 | NOTE: The required size of the Executive RAM Work Area is calculated |
---|
[bfa0476] | 281 | automatically when using the @code{rtems/confdefs.h} mechanism. |
---|
[1dbf307] | 282 | |
---|
[3e066540] | 283 | @c |
---|
| 284 | @c |
---|
| 285 | @c |
---|
| 286 | @subsection Idle Task Configuration |
---|
| 287 | |
---|
| 288 | This section defines the IDLE task related configuration parameters |
---|
| 289 | supported by @code{rtems/confdefs.h}. |
---|
| 290 | |
---|
| 291 | @itemize @bullet |
---|
| 292 | |
---|
| 293 | @fnindex CONFIGURE_IDLE_TASK_BODY |
---|
| 294 | @item @code{CONFIGURE_IDLE_TASK_BODY} is set to the method name |
---|
| 295 | corresponding to the application specific IDLE thread body. If |
---|
| 296 | not specified, the BSP or RTEMS default IDLE thread body will |
---|
| 297 | be used. The default value is NULL. |
---|
| 298 | |
---|
| 299 | @fnindex CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 300 | @item @code{CONFIGURE_IDLE_TASK_STACK_SIZE} is set to the |
---|
| 301 | desired stack size for the IDLE task. If not specified, |
---|
| 302 | the IDLE task will have a stack of minimum size. The default |
---|
| 303 | value is @code{RTEMS_MINIMUM_STACK_SIZE}. |
---|
| 304 | |
---|
| 305 | @end itemize |
---|
| 306 | |
---|
| 307 | @c |
---|
| 308 | @c |
---|
| 309 | @c |
---|
[1dbf307] | 310 | @subsection Device Driver Table |
---|
| 311 | |
---|
[6e58367] | 312 | This section defines the configuration parameters related |
---|
| 313 | to the automatic generation of a Device Driver Table. As |
---|
[bfa0476] | 314 | @code{rtems/confdefs.h} only is aware of a small set of |
---|
[6e58367] | 315 | standard device drivers, the generated Device Driver |
---|
| 316 | Table is suitable for simple applications with no |
---|
| 317 | custom device drivers. |
---|
| 318 | |
---|
[1dbf307] | 319 | @itemize @bullet |
---|
[794d745] | 320 | @findex CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
[6e58367] | 321 | @item @code{CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE} is defined if |
---|
| 322 | the application wishes to provide their own Device Driver Table. |
---|
| 323 | The table generated is an array of @code{rtems_driver_address_table} |
---|
| 324 | entries named @code{Device_drivers}. By default, this is not |
---|
[bfa0476] | 325 | defined indicating the @code{rtems/confdefs.h} is providing the |
---|
[6e58367] | 326 | device driver table. |
---|
| 327 | |
---|
[6d00095] | 328 | @findex CONFIGURE_MAXIMUM_DRIVERS |
---|
| 329 | @item @code{CONFIGURE_MAXIMUM_DRIVERS} is defined |
---|
| 330 | as the number of device drivers per node. By default, this is |
---|
| 331 | set to 10. |
---|
| 332 | |
---|
[794d745] | 333 | @findex CONFIGURE_MAXIMUM_DEVICES |
---|
[6e58367] | 334 | @item @code{CONFIGURE_MAXIMUM_DEVICES} is defined |
---|
| 335 | to the number of individual devices that may be registered |
---|
| 336 | in the system. By default, this is set to 20. |
---|
| 337 | |
---|
[794d745] | 338 | @findex CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
[6e58367] | 339 | @item @code{CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER} |
---|
| 340 | is defined |
---|
| 341 | if the application wishes to include the Console Device Driver. |
---|
| 342 | This device driver is responsible for providing standard input |
---|
| 343 | and output using "/dev/console". By default, this is not |
---|
| 344 | defined. |
---|
| 345 | |
---|
[794d745] | 346 | @findex CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[6e58367] | 347 | @item @code{CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER} |
---|
| 348 | is defined |
---|
| 349 | if the application wishes to include the Console Device Driver. |
---|
| 350 | This device driver is responsible for providing standard input |
---|
| 351 | and output using "/dev/console". By default, this is not |
---|
| 352 | defined. |
---|
| 353 | |
---|
[794d745] | 354 | @findex CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
[6e58367] | 355 | @item @code{CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER} |
---|
| 356 | is defined if the application wishes to include the Timer Driver. |
---|
| 357 | This device driver is used to benchmark execution times |
---|
| 358 | by the RTEMS Timing Test Suites. By default, this is not |
---|
| 359 | defined. |
---|
| 360 | |
---|
| 361 | @c @item @code{CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER} |
---|
| 362 | @c is defined |
---|
| 363 | @c if the application wishes to include the Real-Time Clock Driver. |
---|
| 364 | @c By default, this is not defined. |
---|
| 365 | |
---|
[794d745] | 366 | @findex CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
[6e58367] | 367 | @item @code{CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER} |
---|
| 368 | is defined if the application wishes to include the Stub Device Driver. |
---|
| 369 | This device driver simply provides entry points that return |
---|
| 370 | successful and is primarily a test fixture. |
---|
| 371 | By default, this is not defined. |
---|
| 372 | |
---|
[68fe9f96] | 373 | @findex CONFIGURE_APPLICATION_EXTRA_DRIVERS |
---|
| 374 | @item @code{CONFIGURE_APPLICATION_EXTRA_DRIVERS} |
---|
| 375 | is defined if the application has device drivers it needs to |
---|
| 376 | include in the Device Driver Table. This should be defined |
---|
| 377 | to the set of device driver entries that will be placed in |
---|
| 378 | the table. By default, this is not defined. |
---|
| 379 | |
---|
[1dbf307] | 380 | @end itemize |
---|
| 381 | |
---|
| 382 | @subsection Multiprocessing Configuration |
---|
| 383 | |
---|
[6e58367] | 384 | This section defines the multiprocessing related |
---|
[bfa0476] | 385 | system configuration parameters supported by @code{rtems/confdefs.h}. |
---|
[6e58367] | 386 | This class of Configuration Constants are only applicable if |
---|
| 387 | @code{CONFIGURE_MP_APPLICATION} is defined. |
---|
| 388 | |
---|
[1dbf307] | 389 | @itemize @bullet |
---|
[5622ddc4] | 390 | @findex CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
| 391 | @item @code{CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE} is defined |
---|
[6e58367] | 392 | if the application wishes to provide their own Multiprocessing |
---|
| 393 | Configuration Table. The generated table is named |
---|
| 394 | @code{Multiprocessing_configuration}. By default, this |
---|
| 395 | is not defined. |
---|
| 396 | |
---|
[794d745] | 397 | @findex CONFIGURE_MP_NODE_NUMBER |
---|
[6e58367] | 398 | @item @code{CONFIGURE_MP_NODE_NUMBER} is the node number of |
---|
| 399 | this node in a multiprocessor system. The default node number |
---|
| 400 | is @code{NODE_NUMBER} which is set directly in RTEMS test Makefiles. |
---|
| 401 | |
---|
[794d745] | 402 | @findex CONFIGURE_MP_MAXIMUM_NODES |
---|
[6e58367] | 403 | @item @code{CONFIGURE_MP_MAXIMUM_NODES} is the maximum number |
---|
| 404 | of nodes in a multiprocessor system. The default is 2. |
---|
| 405 | |
---|
[794d745] | 406 | @findex CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
[6e58367] | 407 | @item @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS} |
---|
| 408 | is the maximum number |
---|
| 409 | of concurrently active global objects in a multiprocessor |
---|
| 410 | system. The default is 32. |
---|
| 411 | |
---|
[794d745] | 412 | @findex CONFIGURE_MP_MAXIMUM_PROXIES |
---|
[6e58367] | 413 | @item @code{CONFIGURE_MP_MAXIMUM_PROXIES} is the maximum number |
---|
| 414 | of concurrently active thread/task proxies in a multiprocessor |
---|
| 415 | system. The default is 32. |
---|
| 416 | |
---|
[794d745] | 417 | @findex CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
[6e58367] | 418 | @item @code{CONFIGURE_MP_MPCI_TABLE_POINTER} is the pointer |
---|
| 419 | to the MPCI Configuration Table. The default value of |
---|
| 420 | this field is @code{&MPCI_table}. |
---|
[1dbf307] | 421 | @end itemize |
---|
| 422 | |
---|
| 423 | @subsection Classic API Configuration |
---|
| 424 | |
---|
[6e58367] | 425 | This section defines the Classic API related |
---|
[bfa0476] | 426 | system configuration parameters supported by @code{rtems/confdefs.h}. |
---|
[6e58367] | 427 | |
---|
[1dbf307] | 428 | @itemize @bullet |
---|
[794d745] | 429 | @findex CONFIGURE_MAXIMUM_TASKS |
---|
[6e58367] | 430 | @item @code{CONFIGURE_MAXIMUM_TASKS} is the maximum number of |
---|
| 431 | Classic API tasks that can be concurrently active. |
---|
[81ecc05b] | 432 | The default for this field is 0. |
---|
[6e58367] | 433 | |
---|
[794d745] | 434 | @findex CONFIGURE_MAXIMUM_TIMERS |
---|
[6e58367] | 435 | @item @code{CONFIGURE_MAXIMUM_TIMERS} is the maximum number of |
---|
| 436 | Classic API timers that can be concurrently active. |
---|
| 437 | The default for this field is 0. |
---|
| 438 | |
---|
[794d745] | 439 | @findex CONFIGURE_MAXIMUM_SEMAPHORES |
---|
[6e58367] | 440 | @item @code{CONFIGURE_MAXIMUM_SEMAPHORES} is the maximum number of |
---|
| 441 | Classic API semaphores that can be concurrently active. |
---|
| 442 | The default for this field is 0. |
---|
| 443 | |
---|
[794d745] | 444 | @findex CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
[6e58367] | 445 | @item @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES} is the maximum number of |
---|
| 446 | Classic API message queues that can be concurrently active. |
---|
| 447 | The default for this field is 0. |
---|
| 448 | |
---|
[794d745] | 449 | @findex CONFIGURE_MAXIMUM_PARTITIONS |
---|
[6e58367] | 450 | @item @code{CONFIGURE_MAXIMUM_PARTITIONS} is the maximum number of |
---|
| 451 | Classic API partitions that can be concurrently active. |
---|
| 452 | The default for this field is 0. |
---|
| 453 | |
---|
[794d745] | 454 | @findex CONFIGURE_MAXIMUM_REGIONS |
---|
[6e58367] | 455 | @item @code{CONFIGURE_MAXIMUM_REGIONS} is the maximum number of |
---|
| 456 | Classic API regions that can be concurrently active. |
---|
| 457 | The default for this field is 0. |
---|
| 458 | |
---|
[794d745] | 459 | @findex CONFIGURE_MAXIMUM_PORTS |
---|
[6e58367] | 460 | @item @code{CONFIGURE_MAXIMUM_PORTS} is the maximum number of |
---|
| 461 | Classic API ports that can be concurrently active. |
---|
| 462 | The default for this field is 0. |
---|
| 463 | |
---|
[794d745] | 464 | @findex CONFIGURE_MAXIMUM_PERIODS |
---|
[6e58367] | 465 | @item @code{CONFIGURE_MAXIMUM_PERIODS} is the maximum number of |
---|
| 466 | Classic API rate monotonic periods that can be concurrently active. |
---|
| 467 | The default for this field is 0. |
---|
| 468 | |
---|
[794d745] | 469 | @findex CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
[6e58367] | 470 | @item @code{CONFIGURE_MAXIMUM_USER_EXTENSIONS} is the maximum number of |
---|
| 471 | Classic API user extensions that can be concurrently active. |
---|
| 472 | The default for this field is 0. |
---|
| 473 | |
---|
[1dbf307] | 474 | @end itemize |
---|
| 475 | |
---|
[6e58367] | 476 | @subsection Classic API Initialization Tasks Table Configuration |
---|
| 477 | |
---|
[bfa0476] | 478 | The @code{rtems/confdefs.h} configuration system can automatically |
---|
[6e58367] | 479 | generate an Initialization Tasks Table named |
---|
| 480 | @code{Initialization_tasks} with a single entry. The following |
---|
| 481 | parameters control the generation of that table. |
---|
[1dbf307] | 482 | |
---|
| 483 | @itemize @bullet |
---|
[794d745] | 484 | @findex CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
[6e58367] | 485 | @item @code{CONFIGURE_RTEMS_INIT_TASKS_TABLE} is defined |
---|
| 486 | if the user wishes to use a Classic RTEMS API Initialization |
---|
| 487 | Task Table. The application may choose to use the initialization |
---|
| 488 | tasks or threads table from another API. By default, this |
---|
| 489 | field is not defined as the user MUST select their own |
---|
| 490 | API for initialization tasks. |
---|
| 491 | |
---|
[794d745] | 492 | @findex CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
[6e58367] | 493 | @item @code{CONFIGURE_HAS_OWN_INIT_TASK_TABLE} is defined |
---|
| 494 | if the user wishes to define their own Classic API Initialization |
---|
| 495 | Tasks Table. This table should be named @code{Initialization_tasks}. |
---|
| 496 | By default, this is not defined. |
---|
| 497 | |
---|
[794d745] | 498 | @findex CONFIGURE_INIT_TASK_NAME |
---|
[6e58367] | 499 | @item @code{CONFIGURE_INIT_TASK_NAME} is the name |
---|
| 500 | of the single initialization task defined by the |
---|
| 501 | Classic API Initialization Tasks Table. By default |
---|
| 502 | the value is @code{rtems_build_name( 'U', 'I', '1', ' ' )}. |
---|
| 503 | |
---|
[794d745] | 504 | @findex CONFIGURE_INIT_TASK_STACK_SIZE |
---|
[6e58367] | 505 | @item @code{CONFIGURE_INIT_TASK_STACK_SIZE} |
---|
| 506 | is the stack size |
---|
| 507 | of the single initialization task defined by the |
---|
| 508 | Classic API Initialization Tasks Table. By default |
---|
| 509 | the value is @code{RTEMS_MINIMUM_STACK_SIZE}. |
---|
| 510 | |
---|
[794d745] | 511 | @findex CONFIGURE_INIT_TASK_PRIORITY |
---|
[6e58367] | 512 | @item @code{CONFIGURE_INIT_TASK_PRIORITY} |
---|
| 513 | is the initial priority |
---|
| 514 | of the single initialization task defined by the |
---|
| 515 | Classic API Initialization Tasks Table. By default |
---|
| 516 | the value is 1 which is the highest priority |
---|
| 517 | in the Classic API. |
---|
| 518 | |
---|
[794d745] | 519 | @findex CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
[6e58367] | 520 | @item @code{CONFIGURE_INIT_TASK_ATTRIBUTES} |
---|
| 521 | is the task attributes |
---|
| 522 | of the single initialization task defined by the |
---|
| 523 | Classic API Initialization Tasks Table. By default |
---|
| 524 | the value is @code{RTEMS_DEFAULT_ATTRIBUTES}. |
---|
| 525 | |
---|
[794d745] | 526 | @findex CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
[6e58367] | 527 | @item @code{CONFIGURE_INIT_TASK_ENTRY_POINT} |
---|
| 528 | is the entry point (a.k.a. function name) |
---|
| 529 | of the single initialization task defined by the |
---|
| 530 | Classic API Initialization Tasks Table. By default |
---|
| 531 | the value is @code{Init}. |
---|
| 532 | |
---|
[794d745] | 533 | @findex CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
[6e58367] | 534 | @item @code{CONFIGURE_INIT_TASK_INITIAL_MODES} |
---|
| 535 | is the initial execution mode |
---|
| 536 | of the single initialization task defined by the |
---|
| 537 | Classic API Initialization Tasks Table. By default |
---|
| 538 | the value is @code{RTEMS_NO_PREEMPT}. |
---|
| 539 | |
---|
[794d745] | 540 | @findex CONFIGURE_INIT_TASK_ARGUMENTS |
---|
[6e58367] | 541 | @item @code{CONFIGURE_INIT_TASK_ARGUMENTS} |
---|
| 542 | is the task argument |
---|
| 543 | of the single initialization task defined by the |
---|
| 544 | Classic API Initialization Tasks Table. By default |
---|
| 545 | the value is 0. |
---|
| 546 | |
---|
[1dbf307] | 547 | @end itemize |
---|
| 548 | |
---|
| 549 | |
---|
| 550 | @subsection POSIX API Configuration |
---|
| 551 | |
---|
[6e58367] | 552 | The parameters in this section are used to configure resources |
---|
| 553 | for the RTEMS POSIX API. They are only relevant if the POSIX API |
---|
| 554 | is enabled at configure time using the @code{--enable-posix} option. |
---|
| 555 | |
---|
[1dbf307] | 556 | @itemize @bullet |
---|
[794d745] | 557 | @findex CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
[6e58367] | 558 | @item @code{CONFIGURE_MAXIMUM_POSIX_THREADS} is the maximum number of |
---|
| 559 | POSIX API threads that can be concurrently active. |
---|
[81ecc05b] | 560 | The default is 0. |
---|
[6e58367] | 561 | |
---|
[794d745] | 562 | @findex CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
[6e58367] | 563 | @item @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES} is the maximum number of |
---|
| 564 | POSIX API mutexes that can be concurrently active. |
---|
| 565 | The default is 0. |
---|
| 566 | |
---|
[794d745] | 567 | @findex CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
[6e58367] | 568 | @item @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES} is the maximum number of |
---|
| 569 | POSIX API condition variables that can be concurrently active. |
---|
| 570 | The default is 0. |
---|
| 571 | |
---|
[794d745] | 572 | @findex CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
[6e58367] | 573 | @item @code{CONFIGURE_MAXIMUM_POSIX_KEYS} is the maximum number of |
---|
| 574 | POSIX API keys that can be concurrently active. |
---|
| 575 | The default is 0. |
---|
| 576 | |
---|
[794d745] | 577 | @findex CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
[6e58367] | 578 | @item @code{CONFIGURE_MAXIMUM_POSIX_TIMERS} is the maximum number of |
---|
| 579 | POSIX API timers that can be concurrently active. |
---|
| 580 | The default is 0. |
---|
| 581 | |
---|
[794d745] | 582 | @findex CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
[6e58367] | 583 | @item @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS} is the maximum number of |
---|
| 584 | POSIX API queued signals that can be concurrently active. |
---|
| 585 | The default is 0. |
---|
| 586 | |
---|
[794d745] | 587 | @findex CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
[6e58367] | 588 | @item @code{CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES} is the maximum number of |
---|
| 589 | POSIX API message queues that can be concurrently active. |
---|
| 590 | The default is 0. |
---|
| 591 | |
---|
[794d745] | 592 | @findex CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
[6e58367] | 593 | @item @code{CONFIGURE_MAXIMUM_POSIX_SEMAPHORES} is the maximum number of |
---|
| 594 | POSIX API semaphores that can be concurrently active. |
---|
| 595 | The default is 0. |
---|
| 596 | |
---|
[1dbf307] | 597 | @end itemize |
---|
| 598 | |
---|
[6e58367] | 599 | @subsection POSIX Initialization Threads Table Configuration |
---|
| 600 | |
---|
[bfa0476] | 601 | The @code{rtems/confdefs.h} configuration system can automatically |
---|
[6e58367] | 602 | generate a POSIX Initialization Threads Table named |
---|
| 603 | @code{POSIX_Initialization_threads} with a single entry. The following |
---|
| 604 | parameters control the generation of that table. |
---|
[1dbf307] | 605 | |
---|
| 606 | @itemize @bullet |
---|
[794d745] | 607 | @findex CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
[6e58367] | 608 | @item @code{CONFIGURE_POSIX_INIT_THREAD_TABLE} |
---|
| 609 | is defined |
---|
| 610 | if the user wishes to use a POSIX API Initialization |
---|
| 611 | Threads Table. The application may choose to use the initialization |
---|
| 612 | tasks or threads table from another API. By default, this |
---|
| 613 | field is not defined as the user MUST select their own |
---|
| 614 | API for initialization tasks. |
---|
| 615 | |
---|
[794d745] | 616 | @findex CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
[6e58367] | 617 | @item @code{CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE} |
---|
| 618 | is defined if the user wishes to define their own POSIX API Initialization |
---|
| 619 | Threads Table. This table should be named @code{POSIX_Initialization_threads}. |
---|
| 620 | By default, this is not defined. |
---|
| 621 | |
---|
[794d745] | 622 | @findex CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
[6e58367] | 623 | @item @code{CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT} |
---|
| 624 | is the entry point (a.k.a. function name) |
---|
| 625 | of the single initialization thread defined by the |
---|
| 626 | POSIX API Initialization Threads Table. By default |
---|
| 627 | the value is @code{POSIX_Init}. |
---|
| 628 | |
---|
[794d745] | 629 | @findex CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
[6e58367] | 630 | @item @code{CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE} |
---|
| 631 | is the stack size of the single initialization thread defined by the |
---|
| 632 | POSIX API Initialization Threads Table. By default |
---|
| 633 | the value is @code{RTEMS_MINIMUM_STACK_SIZE * 2}. |
---|
| 634 | |
---|
[1dbf307] | 635 | @end itemize |
---|
| 636 | |
---|
| 637 | @subsection ITRON API Configuration |
---|
| 638 | |
---|
[6e58367] | 639 | The parameters in this section are used to configure resources |
---|
| 640 | for the RTEMS ITRON API. They are only relevant if the POSIX API |
---|
| 641 | is enabled at configure time using the @code{--enable-itron} option. |
---|
| 642 | |
---|
[1dbf307] | 643 | @itemize @bullet |
---|
[794d745] | 644 | @findex CONFIGURE_MAXIMUM_ITRON_TASKS |
---|
[6e58367] | 645 | @item @code{CONFIGURE_MAXIMUM_ITRON_TASKS} |
---|
| 646 | is the maximum number of |
---|
| 647 | ITRON API tasks that can be concurrently active. |
---|
[81ecc05b] | 648 | The default is 0. |
---|
[6e58367] | 649 | |
---|
[794d745] | 650 | @findex CONFIGURE_MAXIMUM_ITRON_SEMAPHORES |
---|
[6e58367] | 651 | @item @code{CONFIGURE_MAXIMUM_ITRON_SEMAPHORES} |
---|
| 652 | is the maximum number of |
---|
| 653 | ITRON API semaphores that can be concurrently active. |
---|
| 654 | The default is 0. |
---|
| 655 | |
---|
[794d745] | 656 | @findex CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS |
---|
[6e58367] | 657 | @item @code{CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS} |
---|
| 658 | is the maximum number of |
---|
| 659 | ITRON API eventflags that can be concurrently active. |
---|
| 660 | The default is 0. |
---|
| 661 | |
---|
[794d745] | 662 | @findex CONFIGURE_MAXIMUM_ITRON_MAILBOXES |
---|
[6e58367] | 663 | @item @code{CONFIGURE_MAXIMUM_ITRON_MAILBOXES} |
---|
| 664 | is the maximum number of |
---|
| 665 | ITRON API mailboxes that can be concurrently active. |
---|
| 666 | The default is 0. |
---|
| 667 | |
---|
[794d745] | 668 | @findex CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS |
---|
[6e58367] | 669 | @item @code{CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS} |
---|
| 670 | is the maximum number of |
---|
| 671 | ITRON API message buffers that can be concurrently active. |
---|
| 672 | The default is 0. |
---|
| 673 | |
---|
[794d745] | 674 | @findex CONFIGURE_MAXIMUM_ITRON_PORTS |
---|
[6e58367] | 675 | @item @code{CONFIGURE_MAXIMUM_ITRON_PORTS} |
---|
| 676 | is the maximum number of |
---|
| 677 | ITRON API ports that can be concurrently active. |
---|
| 678 | The default is 0. |
---|
| 679 | |
---|
[794d745] | 680 | @findex CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS |
---|
[6e58367] | 681 | @item @code{CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS} |
---|
| 682 | is the maximum number of |
---|
| 683 | ITRON API memory pools that can be concurrently active. |
---|
| 684 | The default is 0. |
---|
| 685 | |
---|
[794d745] | 686 | @findex CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS |
---|
[6e58367] | 687 | @item @code{CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS} |
---|
| 688 | is the maximum number of |
---|
| 689 | ITRON API fixed memory pools that can be concurrently active. |
---|
| 690 | The default is 0. |
---|
| 691 | |
---|
[1dbf307] | 692 | @end itemize |
---|
| 693 | |
---|
| 694 | @subsection ITRON Initialization Task Table Configuration |
---|
| 695 | |
---|
[bfa0476] | 696 | The @code{rtems/confdefs.h} configuration system can automatically |
---|
[6e58367] | 697 | generate an ITRON Initialization Tasks Table named |
---|
| 698 | @code{ITRON_Initialization_tasks} with a single entry. The following |
---|
| 699 | parameters control the generation of that table. |
---|
| 700 | |
---|
[1dbf307] | 701 | @itemize @bullet |
---|
[794d745] | 702 | @findex CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
[6e58367] | 703 | @item @code{CONFIGURE_ITRON_INIT_TASK_TABLE} is defined |
---|
| 704 | if the user wishes to use a ITRON API Initialization |
---|
| 705 | Tasks Table. The application may choose to use the initialization |
---|
| 706 | tasks or threads table from another API. By default, this |
---|
| 707 | field is not defined as the user MUST select their own |
---|
| 708 | API for initialization tasks. |
---|
| 709 | |
---|
[794d745] | 710 | @findex CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE |
---|
[6e58367] | 711 | @item @code{CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE} |
---|
| 712 | is defined if the user wishes to define their own ITRON API Initialization |
---|
| 713 | Tasks Table. This table should be named @code{ITRON_Initialization_tasks}. |
---|
| 714 | By default, this is not defined. |
---|
| 715 | |
---|
[794d745] | 716 | @findex CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT |
---|
[6e58367] | 717 | @item @code{CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT} |
---|
| 718 | is the entry point (a.k.a. function name) |
---|
| 719 | of the single initialization task defined by the |
---|
| 720 | ITRON API Initialization Tasks Table. By default |
---|
| 721 | the value is @code{ITRON_Init}. |
---|
| 722 | |
---|
[794d745] | 723 | @findex CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES |
---|
[6e58367] | 724 | @item @code{CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES} |
---|
| 725 | is the attribute set |
---|
| 726 | of the single initialization task defined by the |
---|
| 727 | ITRON API Initialization Tasks Table. By default |
---|
| 728 | the value is @code{TA_HLNG}. |
---|
| 729 | |
---|
[794d745] | 730 | @findex CONFIGURE_ITRON_INIT_TASK_PRIORITY |
---|
[6e58367] | 731 | @item @code{CONFIGURE_ITRON_INIT_TASK_PRIORITY} |
---|
| 732 | is the initial priority |
---|
| 733 | of the single initialization task defined by the |
---|
| 734 | ITRON API Initialization Tasks Table. By default |
---|
| 735 | the value is @code{1} which is the highest priority |
---|
| 736 | in the ITRON API. |
---|
| 737 | |
---|
[794d745] | 738 | @findex CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
[6e58367] | 739 | @item @code{CONFIGURE_ITRON_INIT_TASK_STACK_SIZE} |
---|
| 740 | is the stack size of the single initialization task defined by the |
---|
| 741 | ITRON API Initialization Tasks Table. By default |
---|
| 742 | the value is @code{RTEMS_MINIMUM_STACK_SIZE}. |
---|
| 743 | |
---|
[1dbf307] | 744 | @end itemize |
---|
| 745 | |
---|
| 746 | @subsection Ada Tasks |
---|
| 747 | |
---|
[6e58367] | 748 | This section defines the system configuration parameters supported |
---|
[bfa0476] | 749 | by @code{rtems/confdefs.h} related to configuring RTEMS to support |
---|
[6e58367] | 750 | a task using Ada tasking with GNAT. |
---|
| 751 | |
---|
[1dbf307] | 752 | @itemize @bullet |
---|
[794d745] | 753 | @findex CONFIGURE_GNAT_RTEMS |
---|
[6e58367] | 754 | @item @code{CONFIGURE_GNAT_RTEMS} is defined to inform |
---|
| 755 | RTEMS that the GNAT Ada run-time is to be used by the |
---|
| 756 | application. This configuration parameter is critical |
---|
[bfa0476] | 757 | as it makes @code{rtems/confdefs.h} configure the resources |
---|
[6e58367] | 758 | (mutexes and keys) used implicitly by the GNAT run-time. |
---|
| 759 | By default, this parameter is not defined. |
---|
| 760 | |
---|
[794d745] | 761 | @findex CONFIGURE_MAXIMUM_ADA_TASKS |
---|
[6e58367] | 762 | @item @code{CONFIGURE_MAXIMUM_ADA_TASKS} is the |
---|
| 763 | number of Ada tasks that can be concurrently active |
---|
| 764 | in the system. By default, when @code{CONFIGURE_GNAT_RTEMS} |
---|
| 765 | is defined, this is set to 20. |
---|
| 766 | |
---|
[794d745] | 767 | @findex CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
[6e58367] | 768 | @item @code{CONFIGURE_MAXIMUM_FAKE_ADA_TASKS} is |
---|
| 769 | the number of "fake" Ada tasks that can be concurrently |
---|
| 770 | active in the system. A "fake" Ada task is a non-Ada |
---|
| 771 | task that makes calls back into Ada code and thus |
---|
| 772 | implicitly uses the Ada run-time. |
---|
| 773 | |
---|
[1dbf307] | 774 | @end itemize |
---|
| 775 | |
---|
[ae68ff0] | 776 | @section Configuration Table |
---|
| 777 | |
---|
[169502e] | 778 | @cindex Configuration Table |
---|
| 779 | @cindex RTEMS Configuration Table |
---|
| 780 | |
---|
[ae68ff0] | 781 | The RTEMS Configuration Table is used to tailor an |
---|
| 782 | application for its specific needs. For example, the user can |
---|
| 783 | configure the number of device drivers or which APIs may be used. |
---|
| 784 | THe address of the user-defined Configuration Table is passed as an |
---|
[ae10dbd] | 785 | argument to the @code{rtems_initialize_executive} |
---|
[75e22db] | 786 | directive, which MUST be the first RTEMS directive called. |
---|
[ae10dbd] | 787 | The RTEMS Configuration Table is defined in the following C structure: |
---|
[ae68ff0] | 788 | |
---|
[adee5979] | 789 | @findex rtems_configuration_table |
---|
[ae68ff0] | 790 | @example |
---|
| 791 | @group |
---|
| 792 | typedef struct @{ |
---|
[ae10dbd] | 793 | void *work_space_start; |
---|
| 794 | uint32_t work_space_size; |
---|
| 795 | uint32_t maximum_extensions; |
---|
| 796 | uint32_t microseconds_per_tick; |
---|
| 797 | uint32_t ticks_per_timeslice; |
---|
[3e066540] | 798 | void (*idle_task)( void ); |
---|
| 799 | uint32_t idle_task_stack_size; |
---|
[66c50e2] | 800 | uint32_t interrupt_stack_size; |
---|
[3e066540] | 801 | void * (*stack_allocate_hook)( uint32_t ); |
---|
| 802 | void (*stack_free_hook)( void * ); |
---|
| 803 | boolean do_zero_of_workspace; |
---|
[ae10dbd] | 804 | uint32_t maximum_drivers; |
---|
| 805 | uint32_t number_of_device_drivers; |
---|
| 806 | rtems_driver_address_table *Device_driver_table; |
---|
| 807 | uint32_t number_of_initial_extensions; |
---|
| 808 | rtems_extensions_table *User_extension_table; |
---|
[3e066540] | 809 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[ae10dbd] | 810 | rtems_multiprocessing_table *User_multiprocessing_table; |
---|
[3e066540] | 811 | #endif |
---|
[ae10dbd] | 812 | rtems_api_configuration_table *RTEMS_api_configuration; |
---|
| 813 | posix_api_configuration_table *POSIX_api_configuration; |
---|
[3e066540] | 814 | itron_api_configuration *ITRON_api_configuration; |
---|
[ae68ff0] | 815 | @} rtems_configuration_table; |
---|
| 816 | @end group |
---|
| 817 | @end example |
---|
| 818 | |
---|
| 819 | @table @b |
---|
| 820 | @item work_space_start |
---|
| 821 | is the address of the RTEMS RAM Workspace. |
---|
| 822 | This area contains items such as the |
---|
| 823 | various object control blocks (TCBs, QCBs, ...) and task stacks. |
---|
| 824 | If the address is not aligned on a four-word boundary, then |
---|
| 825 | RTEMS will invoke the fatal error handler during |
---|
[ae10dbd] | 826 | @code{rtems_initialize_executive}. |
---|
[bfa0476] | 827 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 828 | an RTEMS application, the value for this field corresponds |
---|
[adee5979] | 829 | to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA} |
---|
| 830 | which defaults to @code{NULL}. Normally, this field should be |
---|
| 831 | configured as @code{NULL} as BSPs will assign memory for the |
---|
| 832 | RTEMS RAM Workspace as part of system initialization. |
---|
[ae68ff0] | 833 | |
---|
| 834 | @item work_space_size |
---|
| 835 | is the calculated size of the |
---|
| 836 | RTEMS RAM Workspace. The section Sizing the RTEMS RAM Workspace |
---|
| 837 | details how to arrive at this number. |
---|
[bfa0476] | 838 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 839 | an RTEMS application, the value for this field corresponds |
---|
| 840 | to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_SIZE} |
---|
| 841 | and is calculated based on the other system configuration settings. |
---|
[ae68ff0] | 842 | |
---|
| 843 | @item microseconds_per_tick |
---|
| 844 | is number of microseconds per clock tick. |
---|
[bfa0476] | 845 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 846 | an RTEMS application, the value for this field corresponds |
---|
| 847 | to the setting of the macro @code{CONFIGURE_MICROSECONDS_PER_TICK}. |
---|
[adee5979] | 848 | If not defined by the application, then the |
---|
| 849 | @code{CONFIGURE_MICROSECONDS_PER_TICK} macro defaults to 10000 |
---|
| 850 | (10 milliseconds). |
---|
[ae68ff0] | 851 | |
---|
| 852 | @item ticks_per_timeslice |
---|
| 853 | is the number of clock ticks for a timeslice. |
---|
[bfa0476] | 854 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 855 | an RTEMS application, the value for this field corresponds |
---|
| 856 | to the setting of the macro @code{CONFIGURE_TICKS_PER_TIMESLICE}. |
---|
[ae68ff0] | 857 | |
---|
[3e066540] | 858 | @item idle_task |
---|
| 859 | is the address of the optional user |
---|
| 860 | provided routine which is used as the system's IDLE task. If |
---|
| 861 | this field is not NULL, then the RTEMS default IDLE task is not |
---|
| 862 | used. This field may be NULL to indicate that the default IDLE |
---|
| 863 | is to be used. When using the @code{rtems/confdefs.h} mechanism |
---|
| 864 | for configuring an RTEMS application, the value for this field |
---|
| 865 | corresponds to the setting of the macro @code{CONFIGURE_IDLE_TASK_BODY}. |
---|
| 866 | |
---|
| 867 | @item idle_task_stack_size |
---|
| 868 | is the size of the RTEMS idle task stack in bytes. |
---|
| 869 | If this number is less than MINIMUM_STACK_SIZE, then the |
---|
[66c50e2] | 870 | idle task's stack will be MINIMUM_STACK_SIZE in bytes. |
---|
[3e066540] | 871 | When using the @code{rtems/confdefs.h} mechanism |
---|
| 872 | for configuring an RTEMS application, the value for this field |
---|
| 873 | corresponds to the setting of the macro |
---|
| 874 | @code{CONFIGURE_IDLE_TASK_STACK_SIZE}. |
---|
| 875 | |
---|
[66c50e2] | 876 | @item interrupt_stack_size |
---|
| 877 | is the size of the RTEMS interrupt stack in bytes. |
---|
| 878 | If this number is less than MINIMUM_STACK_SIZE, then the |
---|
| 879 | interrupt stack will be MINIMUM_STACK_SIZE in bytes. |
---|
| 880 | When using the @code{rtems/confdefs.h} mechanism |
---|
| 881 | for configuring an RTEMS application, the value for this field |
---|
| 882 | corresponds to the setting of the macro |
---|
| 883 | @code{CONFIGURE_INTERRUPT_STACK_SIZE}. |
---|
| 884 | |
---|
[3e066540] | 885 | @item stack_allocate_hook |
---|
| 886 | may point to a user provided routine to allocate task stacks. |
---|
| 887 | The default is to allocate task stacks from the RTEMS Workspace. |
---|
| 888 | When using the @code{rtems/confdefs.h} mechanism |
---|
| 889 | for configuring an RTEMS application, the value for this field |
---|
| 890 | corresponds to the setting of the macro |
---|
| 891 | @code{CONFIGURE_TASK_STACK_ALLOCATOR}. |
---|
| 892 | |
---|
| 893 | @item stack_free_hook |
---|
| 894 | may point to a user provided routine to free task stacks. |
---|
| 895 | The default is to allocate task stacks from the RTEMS Workspace. |
---|
| 896 | When using the @code{rtems/confdefs.h} mechanism |
---|
| 897 | for configuring an RTEMS application, the value for this field |
---|
| 898 | corresponds to the setting of the macro |
---|
| 899 | @code{CONFIGURE_TASK_STACK_DEALLOCATOR}. |
---|
| 900 | |
---|
| 901 | @item do_zero_of_workspace |
---|
| 902 | indicates whether RTEMS should zero the RTEMS Workspace and |
---|
| 903 | C Program Heap as part of its initialization. If set to |
---|
| 904 | TRUE, the Workspace is zeroed. Otherwise, it is not. |
---|
| 905 | When using the @code{rtems/confdefs.h} mechanism |
---|
| 906 | for configuring an RTEMS application, the value for this field |
---|
| 907 | corresponds to the setting of the macro |
---|
| 908 | @code{CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY}. |
---|
| 909 | |
---|
[6d00095] | 910 | @item maximum_drivers |
---|
| 911 | is the maximum number of device drivers that can be registered. |
---|
[bfa0476] | 912 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[6d00095] | 913 | an RTEMS application, the value for this field corresponds |
---|
| 914 | to the setting of the macro @code{CONFIGURE_MAXIMUM_DRIVERS}. |
---|
| 915 | |
---|
[ae68ff0] | 916 | @item number_of_device_drivers |
---|
| 917 | is the number of device drivers for the system. There should be |
---|
| 918 | the same number of entries in the Device Driver Table. If this field |
---|
[bae90e1] | 919 | is zero, then the @code{User_driver_address_table} entry should be NULL. |
---|
[bfa0476] | 920 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 921 | an RTEMS application, the value for this field is calculated |
---|
| 922 | automatically based on the number of entries in the |
---|
| 923 | Device Driver Table. This calculation is based on the assumption |
---|
| 924 | that the Device Driver Table is named @code{Device_drivers} |
---|
| 925 | and defined in C. This table may be generated automatically |
---|
| 926 | for simple applications using only the device drivers that correspond |
---|
| 927 | to the following macros: |
---|
| 928 | |
---|
| 929 | @itemize @bullet |
---|
| 930 | |
---|
[6e58367] | 931 | @item @code{CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER} |
---|
| 932 | @item @code{CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER} |
---|
| 933 | @item @code{CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER} |
---|
| 934 | @item @code{CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER} |
---|
| 935 | @item @code{CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER} |
---|
[bae90e1] | 936 | |
---|
| 937 | @end itemize |
---|
| 938 | |
---|
| 939 | Note that network device drivers are not configured in the |
---|
| 940 | Device Driver Table. |
---|
[ae68ff0] | 941 | |
---|
| 942 | @item Device_driver_table |
---|
| 943 | is the address of the Device Driver Table. This table contains the entry |
---|
| 944 | points for each device driver. If the number_of_device_drivers field is zero, |
---|
| 945 | then this entry should be NULL. The format of this table will be |
---|
| 946 | discussed below. |
---|
[bfa0476] | 947 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 948 | an RTEMS application, the Device Driver Table is assumed to be |
---|
| 949 | named @code{Device_drivers} and defined in C. If the application is providing |
---|
| 950 | its own Device Driver Table, then the macro |
---|
| 951 | @code{CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE} must be defined to indicate |
---|
[bfa0476] | 952 | this and prevent @code{rtems/confdefs.h} from generating the table. |
---|
[ae68ff0] | 953 | |
---|
[9b64c2d5] | 954 | @item number_of_initial_extensions |
---|
| 955 | is the number of initial user extensions. There should be |
---|
| 956 | the same number of entries as in the User_extension_table. If this field |
---|
| 957 | is zero, then the User_driver_address_table entry should be NULL. |
---|
[bfa0476] | 958 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 959 | an RTEMS application, the value for this field corresponds |
---|
| 960 | to the setting of the macro @code{CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS} |
---|
[bfa0476] | 961 | which is set automatically by @code{rtems/confdefs.h} based on the size |
---|
[bae90e1] | 962 | of the User Extensions Table. |
---|
[9b64c2d5] | 963 | |
---|
[ae68ff0] | 964 | @item User_extension_table |
---|
| 965 | is the address of the User |
---|
| 966 | Extension Table. This table contains the entry points for the |
---|
| 967 | static set of optional user extensions. If no user extensions |
---|
| 968 | are configured, then this entry should be NULL. The format of |
---|
| 969 | this table will be discussed below. |
---|
[bfa0476] | 970 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 971 | an RTEMS application, the User Extensions Table is named |
---|
| 972 | @code{Configuration_Initial_Extensions} and defined in |
---|
| 973 | confdefs.h. It is initialized based on the following |
---|
| 974 | macros: |
---|
| 975 | |
---|
| 976 | @itemize @bullet |
---|
| 977 | |
---|
| 978 | @item @code{CONFIGURE_INITIAL_EXTENSIONS} |
---|
| 979 | @item @code{STACK_CHECKER_EXTENSION} |
---|
| 980 | |
---|
| 981 | @end itemize |
---|
| 982 | |
---|
| 983 | The application may configure one or more initial user extension |
---|
| 984 | sets by setting the @code{CONFIGURE_INITIAL_EXTENSIONS} macro. By |
---|
| 985 | defining the @code{STACK_CHECKER_EXTENSION} macro, the task stack bounds |
---|
| 986 | checking user extension set is automatically included in the |
---|
| 987 | application. |
---|
[ae68ff0] | 988 | |
---|
| 989 | @item User_multiprocessing_table |
---|
| 990 | is the address of the Multiprocessor Configuration Table. This |
---|
| 991 | table contains information needed by RTEMS only when used in a multiprocessor |
---|
| 992 | configuration. This field must be NULL when RTEMS is used in a |
---|
| 993 | single processor configuration. |
---|
[bfa0476] | 994 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 995 | an RTEMS application, the Multiprocessor Configuration Table |
---|
[adee5979] | 996 | is automatically generated when the @code{CONFIGURE_MP_APPLICATION} |
---|
| 997 | is defined. If @code{CONFIGURE_MP_APPLICATION} is not defined, the this |
---|
[bae90e1] | 998 | entry is set to NULL. The generated table has the name |
---|
| 999 | @code{Multiprocessing_configuration}. |
---|
[ae68ff0] | 1000 | |
---|
| 1001 | @item RTEMS_api_configuration |
---|
| 1002 | is the address of the RTEMS API Configuration Table. This table |
---|
| 1003 | contains information needed by the RTEMS API. This field should be |
---|
| 1004 | NULL if the RTEMS API is not used. [NOTE: Currently the RTEMS API |
---|
| 1005 | is required to support support components such as BSPs and libraries |
---|
[bae90e1] | 1006 | which use this API.] This table is built automatically and this |
---|
[bfa0476] | 1007 | entry filled in, if using the @code{rtems/confdefs.h} application |
---|
[bae90e1] | 1008 | configuration mechanism. The generated table has the name |
---|
| 1009 | @code{Configuration_RTEMS_API}. |
---|
[ae68ff0] | 1010 | |
---|
| 1011 | @item POSIX_api_configuration |
---|
| 1012 | is the address of the POSIX API Configuration Table. This table |
---|
| 1013 | contains information needed by the POSIX API. This field should be |
---|
[bae90e1] | 1014 | NULL if the POSIX API is not used. This table is built automatically |
---|
[bfa0476] | 1015 | and this entry filled in, if using the @code{rtems/confdefs.h} application |
---|
| 1016 | configuration mechanism. The @code{rtems/confdefs.h} application |
---|
[bae90e1] | 1017 | mechanism will fill this field in with the address of the |
---|
| 1018 | @code{Configuration_POSIX_API} table of POSIX API is configured |
---|
| 1019 | and NULL if the POSIX API is not configured. |
---|
[ae68ff0] | 1020 | |
---|
| 1021 | @end table |
---|
| 1022 | |
---|
| 1023 | @section RTEMS API Configuration Table |
---|
| 1024 | |
---|
[169502e] | 1025 | @cindex RTEMS API Configuration Table |
---|
| 1026 | |
---|
[ae68ff0] | 1027 | The RTEMS API Configuration Table is used to configure the |
---|
| 1028 | managers which constitute the RTEMS API for a particular application. |
---|
| 1029 | For example, the user can configure the maximum number of tasks for |
---|
| 1030 | this application. The RTEMS API Configuration Table is defined in |
---|
[ae10dbd] | 1031 | the following C structure: |
---|
[ae68ff0] | 1032 | |
---|
[adee5979] | 1033 | @findex rtems_api_configuration_table |
---|
[ae68ff0] | 1034 | @example |
---|
| 1035 | @group |
---|
| 1036 | typedef struct @{ |
---|
[ae10dbd] | 1037 | uint32_t maximum_tasks; |
---|
| 1038 | uint32_t maximum_timers; |
---|
| 1039 | uint32_t maximum_semaphores; |
---|
| 1040 | uint32_t maximum_message_queues; |
---|
| 1041 | uint32_t maximum_partitions; |
---|
| 1042 | uint32_t maximum_regions; |
---|
| 1043 | uint32_t maximum_ports; |
---|
| 1044 | uint32_t maximum_periods; |
---|
| 1045 | uint32_t maximum_barriers; |
---|
| 1046 | uint32_t number_of_initialization_tasks; |
---|
[ae68ff0] | 1047 | rtems_initialization_tasks_table *User_initialization_tasks_table; |
---|
| 1048 | @} rtems_api_configuration_table; |
---|
| 1049 | @end group |
---|
| 1050 | @end example |
---|
| 1051 | |
---|
| 1052 | @table @b |
---|
| 1053 | @item maximum_tasks |
---|
| 1054 | is the maximum number of tasks that |
---|
| 1055 | can be concurrently active (created) in the system including |
---|
| 1056 | initialization tasks. |
---|
[bfa0476] | 1057 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1058 | an RTEMS application, the value for this field corresponds |
---|
| 1059 | to the setting of the macro @code{CONFIGURE_MAXIMUM_TASKS}. |
---|
| 1060 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TASKS} |
---|
| 1061 | macro defaults to 10. |
---|
[ae68ff0] | 1062 | |
---|
| 1063 | @item maximum_timers |
---|
| 1064 | is the maximum number of timers |
---|
| 1065 | that can be concurrently active in the system. |
---|
[bfa0476] | 1066 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1067 | an RTEMS application, the value for this field corresponds |
---|
| 1068 | to the setting of the macro @code{CONFIGURE_MAXIMUM_TIMERS}. |
---|
| 1069 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_TIMERS} |
---|
| 1070 | macro defaults to 0. |
---|
[ae68ff0] | 1071 | |
---|
| 1072 | @item maximum_semaphores |
---|
| 1073 | is the maximum number of |
---|
| 1074 | semaphores that can be concurrently active in the system. |
---|
[bfa0476] | 1075 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1076 | an RTEMS application, the value for this field corresponds |
---|
| 1077 | to the setting of the macro @code{CONFIGURE_MAXIMUM_SEMAPHORES}. |
---|
| 1078 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_SEMAPHORES} |
---|
| 1079 | macro defaults to 0. |
---|
[ae68ff0] | 1080 | |
---|
| 1081 | @item maximum_message_queues |
---|
| 1082 | is the maximum number of |
---|
| 1083 | message queues that can be concurrently active in the system. |
---|
[bfa0476] | 1084 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1085 | an RTEMS application, the value for this field corresponds |
---|
| 1086 | to the setting of the macro @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES}. |
---|
| 1087 | If not defined by the application, then the |
---|
| 1088 | @code{CONFIGURE_MAXIMUM_MESSAGE_QUEUES} macro defaults to 0. |
---|
[ae68ff0] | 1089 | |
---|
| 1090 | @item maximum_partitions |
---|
| 1091 | is the maximum number of |
---|
| 1092 | partitions that can be concurrently active in the system. |
---|
[bfa0476] | 1093 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1094 | an RTEMS application, the value for this field corresponds |
---|
| 1095 | to the setting of the macro @code{CONFIGURE_MAXIMUM_PARTITIONS}. |
---|
| 1096 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PARTITIONS} |
---|
| 1097 | macro defaults to 0. |
---|
[ae68ff0] | 1098 | |
---|
| 1099 | @item maximum_regions |
---|
| 1100 | is the maximum number of regions |
---|
| 1101 | that can be concurrently active in the system. |
---|
[bfa0476] | 1102 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1103 | an RTEMS application, the value for this field corresponds |
---|
| 1104 | to the setting of the macro @code{CONFIGURE_MAXIMUM_REGIONS}. |
---|
| 1105 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_REGIONS} |
---|
| 1106 | macro defaults to 0. |
---|
[ae68ff0] | 1107 | |
---|
| 1108 | @item maximum_ports |
---|
| 1109 | is the maximum number of ports into |
---|
| 1110 | dual-port memory areas that can be concurrently active in the |
---|
| 1111 | system. |
---|
[bfa0476] | 1112 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1113 | an RTEMS application, the value for this field corresponds |
---|
| 1114 | to the setting of the macro @code{CONFIGURE_MAXIMUM_PORTS}. |
---|
| 1115 | If not defined by the application, then the @code{CONFIGURE_MAXIMUM_PORTS} |
---|
| 1116 | macro defaults to 0. |
---|
[ae68ff0] | 1117 | |
---|
| 1118 | @item number_of_initialization_tasks |
---|
| 1119 | is the number of initialization tasks configured. At least one |
---|
[bae90e1] | 1120 | RTEMS initialization task or POSIX initializatin must be configured |
---|
| 1121 | in order for the user's application to begin executing. |
---|
[bfa0476] | 1122 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1123 | an RTEMS application, the user must define the |
---|
| 1124 | @code{CONFIGURE_RTEMS_INIT_TASKS_TABLE} to indicate that there |
---|
| 1125 | is one or more RTEMS initialization task. If the application |
---|
| 1126 | only has one RTEMS initialization task, then the automatically |
---|
| 1127 | generated Initialization Task Table will be sufficient. The following |
---|
| 1128 | macros correspond to the single initialization task: |
---|
| 1129 | |
---|
| 1130 | @itemize @bullet |
---|
| 1131 | |
---|
| 1132 | @item @code{CONFIGURE_INIT_TASK_NAME} - is the name of the task. |
---|
| 1133 | If this macro is not defined by the application, then this defaults |
---|
| 1134 | to the task name of @code{"UI1 "} for User Initialization Task 1. |
---|
| 1135 | |
---|
| 1136 | @item @code{CONFIGURE_INIT_TASK_STACK_SIZE} - is the stack size |
---|
| 1137 | of the single initialization task. If this macro is not defined |
---|
| 1138 | by the application, then this defaults to @code{RTEMS_MINIMUM_STACK_SIZE}. |
---|
| 1139 | |
---|
| 1140 | @item @code{CONFIGURE_INIT_TASK_PRIORITY} - is the initial priority |
---|
| 1141 | of the single initialization task. If this macro is not defined |
---|
| 1142 | by the application, then this defaults to 1. |
---|
| 1143 | |
---|
| 1144 | @item @code{CONFIGURE_INIT_TASK_ATTRIBUTES} - is the attributes |
---|
| 1145 | of the single initialization task. If this macro is not defined |
---|
| 1146 | by the application, then this defaults to @code{RTEMS_DEFAULT_ATTRIBUTES}. |
---|
| 1147 | |
---|
| 1148 | @item @code{CONFIGURE_INIT_TASK_ENTRY_POINT} - is the entry point |
---|
| 1149 | of the single initialization task. If this macro is not defined |
---|
| 1150 | by the application, then this defaults to the C language routine |
---|
| 1151 | @code{Init}. |
---|
| 1152 | |
---|
| 1153 | @item @code{CONFIGURE_INIT_TASK_INITIAL_MODES} - is the initial execution |
---|
| 1154 | modes of the single initialization task. If this macro is not defined |
---|
| 1155 | by the application, then this defaults to @code{RTEMS_NO_PREEMPT}. |
---|
| 1156 | |
---|
| 1157 | @item @code{CONFIGURE_INIT_TASK_ARGUMENTS} - is the argument passed to the |
---|
| 1158 | of the single initialization task. If this macro is not defined |
---|
| 1159 | by the application, then this defaults to 0. |
---|
| 1160 | |
---|
| 1161 | |
---|
| 1162 | @end itemize |
---|
| 1163 | |
---|
| 1164 | |
---|
| 1165 | has the option to have |
---|
| 1166 | value for this field corresponds |
---|
| 1167 | to the setting of the macro @code{}. |
---|
[ae68ff0] | 1168 | |
---|
| 1169 | @item User_initialization_tasks_table |
---|
| 1170 | is the address of the Initialization Task Table. This table contains the |
---|
| 1171 | information needed to create and start each of the |
---|
| 1172 | initialization tasks. The format of this table will be discussed below. |
---|
[bfa0476] | 1173 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1174 | an RTEMS application, the value for this field corresponds |
---|
| 1175 | to the setting of the macro @code{CONFIGURE_EXECUTIVE_RAM_WORK_AREA}. |
---|
[ae68ff0] | 1176 | |
---|
| 1177 | @end table |
---|
| 1178 | |
---|
| 1179 | @section POSIX API Configuration Table |
---|
| 1180 | |
---|
[169502e] | 1181 | @cindex POSIX API Configuration Table |
---|
| 1182 | |
---|
[ae68ff0] | 1183 | The POSIX API Configuration Table is used to configure the |
---|
| 1184 | managers which constitute the POSIX API for a particular application. |
---|
| 1185 | For example, the user can configure the maximum number of threads for |
---|
| 1186 | this application. The POSIX API Configuration Table is defined in |
---|
[ae10dbd] | 1187 | the following C structure: |
---|
[ae68ff0] | 1188 | |
---|
[adee5979] | 1189 | @findex posix_initialization_threads_table |
---|
| 1190 | @findex posix_api_configuration_table |
---|
[ae68ff0] | 1191 | @example |
---|
| 1192 | @group |
---|
| 1193 | typedef struct @{ |
---|
[92c2ae1f] | 1194 | void *(*thread_entry)(void *); |
---|
[ae68ff0] | 1195 | @} posix_initialization_threads_table; |
---|
| 1196 | |
---|
| 1197 | typedef struct @{ |
---|
| 1198 | int maximum_threads; |
---|
| 1199 | int maximum_mutexes; |
---|
| 1200 | int maximum_condition_variables; |
---|
| 1201 | int maximum_keys; |
---|
[2a766a0] | 1202 | int maximum_timers; |
---|
[ae68ff0] | 1203 | int maximum_queued_signals; |
---|
[ae10dbd] | 1204 | int maximum_message_queues; |
---|
| 1205 | int maximum_semaphores; |
---|
| 1206 | int maximum_barriers; |
---|
| 1207 | int maximum_rwlocks; |
---|
| 1208 | int maximum_spinlocks; |
---|
[ae68ff0] | 1209 | int number_of_initialization_tasks; |
---|
| 1210 | posix_initialization_threads_table *User_initialization_tasks_table; |
---|
| 1211 | @} posix_api_configuration_table; |
---|
| 1212 | @end group |
---|
| 1213 | @end example |
---|
| 1214 | |
---|
| 1215 | @table @b |
---|
| 1216 | @item maximum_threads |
---|
| 1217 | is the maximum number of threads that |
---|
| 1218 | can be concurrently active (created) in the system including |
---|
| 1219 | initialization threads. |
---|
[bfa0476] | 1220 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1221 | an RTEMS application, the value for this field corresponds |
---|
| 1222 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_THREADS}. |
---|
| 1223 | If not defined by the application, then the |
---|
| 1224 | @code{CONFIGURE_MAXIMUM_POSIX_THREADS} macro defaults to 10. |
---|
[ae68ff0] | 1225 | |
---|
| 1226 | @item maximum_mutexes |
---|
| 1227 | is the maximum number of mutexes that can be concurrently |
---|
| 1228 | active in the system. |
---|
[bfa0476] | 1229 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1230 | an RTEMS application, the value for this field corresponds |
---|
| 1231 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES}. |
---|
| 1232 | If not defined by the application, then the |
---|
| 1233 | @code{CONFIGURE_MAXIMUM_POSIX_MUTEXES} macro defaults to 0. |
---|
[ae68ff0] | 1234 | |
---|
| 1235 | @item maximum_condition_variables |
---|
| 1236 | is the maximum number of condition variables that can be |
---|
| 1237 | concurrently active in the system. |
---|
[bfa0476] | 1238 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1239 | an RTEMS application, the value for this field corresponds |
---|
| 1240 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES}. |
---|
| 1241 | If not defined by the application, then the |
---|
| 1242 | @code{CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES} macro defaults to 0. |
---|
[ae68ff0] | 1243 | |
---|
| 1244 | @item maximum_keys |
---|
| 1245 | is the maximum number of keys that can be concurrently active in the system. |
---|
[bfa0476] | 1246 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1247 | an RTEMS application, the value for this field corresponds |
---|
| 1248 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_KEYS}. |
---|
| 1249 | If not defined by the application, then the |
---|
| 1250 | @code{CONFIGURE_MAXIMUM_POSIX_KEYS} macro defaults to 0. |
---|
[ae68ff0] | 1251 | |
---|
[c13cd48] | 1252 | @item maximum_timers |
---|
[2a766a0] | 1253 | is the maximum number of POSIX timers that can be concurrently active |
---|
| 1254 | in the system. |
---|
[bfa0476] | 1255 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1256 | an RTEMS application, the value for this field corresponds |
---|
| 1257 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_TIMERS}. |
---|
| 1258 | If not defined by the application, then the |
---|
| 1259 | @code{CONFIGURE_MAXIMUM_POSIX_TIMERS} macro defaults to 0. |
---|
[2a766a0] | 1260 | |
---|
[ae68ff0] | 1261 | @item maximum_queued_signals |
---|
| 1262 | is the maximum number of queued signals that can be concurrently |
---|
| 1263 | pending in the system. |
---|
[bfa0476] | 1264 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1265 | an RTEMS application, the value for this field corresponds |
---|
| 1266 | to the setting of the macro @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS}. |
---|
| 1267 | If not defined by the application, then the |
---|
| 1268 | @code{CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS} macro defaults to 0. |
---|
[ae68ff0] | 1269 | |
---|
| 1270 | @item number_of_initialization_threads |
---|
| 1271 | is the number of initialization threads configured. At least one |
---|
| 1272 | initialization threads must be configured. |
---|
[bfa0476] | 1273 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1274 | an RTEMS application, the user must define the |
---|
| 1275 | @code{CONFIGURE_POSIX_INIT_THREAD_TABLE} to indicate that there |
---|
| 1276 | is one or more POSIX initialization thread. If the application |
---|
| 1277 | only has one POSIX initialization thread, then the automatically |
---|
| 1278 | generated POSIX Initialization Thread Table will be sufficient. The following |
---|
| 1279 | macros correspond to the single initialization task: |
---|
| 1280 | |
---|
| 1281 | @itemize @bullet |
---|
| 1282 | |
---|
| 1283 | @item @code{CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT} - is the entry |
---|
| 1284 | point of the thread. If this macro is not defined by the application, |
---|
| 1285 | then this defaults to the C routine @code{POSIX_Init}. |
---|
| 1286 | |
---|
| 1287 | @item @code{CONFIGURE_POSIX_INIT_TASK_STACK_SIZE} - is the stack size |
---|
| 1288 | of the single initialization thread. If this macro is not defined |
---|
| 1289 | by the application, then this defaults to |
---|
| 1290 | @code{(RTEMS_MINIMUM_STACK_SIZE * 2)}. |
---|
| 1291 | |
---|
| 1292 | @end itemize |
---|
[ae68ff0] | 1293 | |
---|
| 1294 | @item User_initialization_threads_table |
---|
| 1295 | is the address of the Initialization Threads Table. This table contains the |
---|
| 1296 | information needed to create and start each of the initialization threads. |
---|
| 1297 | The format of each entry in this table is defined in the |
---|
[ae10dbd] | 1298 | @code{posix_initialization_threads_table} structure. |
---|
[bfa0476] | 1299 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1300 | an RTEMS application, the value for this field corresponds |
---|
| 1301 | to the address of the @code{POSIX_Initialization_threads} structure. |
---|
[ae68ff0] | 1302 | |
---|
| 1303 | @end table |
---|
| 1304 | |
---|
| 1305 | @section CPU Dependent Information Table |
---|
| 1306 | |
---|
[169502e] | 1307 | @cindex CPU Dependent Information Table |
---|
| 1308 | |
---|
[ae68ff0] | 1309 | The CPU Dependent Information Table is used to |
---|
| 1310 | describe processor dependent information required by RTEMS. |
---|
| 1311 | This table is generally used to supply RTEMS with information |
---|
| 1312 | only known by the Board Support Package. The contents of this |
---|
| 1313 | table are discussed in the CPU Dependent Information Table |
---|
[17a3c69] | 1314 | chapter of the Applications Supplement document for a specific |
---|
[ae68ff0] | 1315 | target processor. |
---|
| 1316 | |
---|
[bfa0476] | 1317 | The @code{rtems/confdefs.h} mechanism does not support generating this |
---|
[bae90e1] | 1318 | table. It is normally filled in by the Board Support Package. |
---|
| 1319 | |
---|
[ae68ff0] | 1320 | @section Initialization Task Table |
---|
| 1321 | |
---|
[169502e] | 1322 | @cindex Initialization Tasks Table |
---|
| 1323 | |
---|
[ae68ff0] | 1324 | The Initialization Task Table is used to describe |
---|
| 1325 | each of the user initialization tasks to the Initialization |
---|
| 1326 | Manager. The table contains one entry for each initialization |
---|
| 1327 | task the user wishes to create and start. The fields of this |
---|
| 1328 | data structure directly correspond to arguments to the |
---|
[bae90e1] | 1329 | @code{@value{DIRPREFIX}task_create} and |
---|
| 1330 | @code{@value{DIRPREFIX}task_start} directives. The number of entries is |
---|
| 1331 | found in the @code{number_of_initialization_tasks} entry in the |
---|
| 1332 | Configuration Table. |
---|
| 1333 | |
---|
| 1334 | The format of each entry in the |
---|
[ae10dbd] | 1335 | Initialization Task Table is defined in the following C structure: |
---|
[ae68ff0] | 1336 | |
---|
[adee5979] | 1337 | @findex rtems_initialization_tasks_table |
---|
[ae68ff0] | 1338 | @example |
---|
| 1339 | typedef struct @{ |
---|
| 1340 | rtems_name name; |
---|
[ae10dbd] | 1341 | size_t stack_size; |
---|
[ae68ff0] | 1342 | rtems_task_priority initial_priority; |
---|
| 1343 | rtems_attribute attribute_set; |
---|
| 1344 | rtems_task_entry entry_point; |
---|
| 1345 | rtems_mode mode_set; |
---|
| 1346 | rtems_task_argument argument; |
---|
| 1347 | @} rtems_initialization_tasks_table; |
---|
| 1348 | @end example |
---|
| 1349 | |
---|
| 1350 | @table @b |
---|
| 1351 | @item name |
---|
| 1352 | is the name of this initialization task. |
---|
| 1353 | |
---|
| 1354 | @item stack_size |
---|
| 1355 | is the size of the stack for this initialization task. |
---|
| 1356 | |
---|
| 1357 | @item initial_priority |
---|
| 1358 | is the priority of this initialization task. |
---|
| 1359 | |
---|
| 1360 | @item attribute_set |
---|
| 1361 | is the attribute set used during creation of this initialization task. |
---|
| 1362 | |
---|
| 1363 | @item entry_point |
---|
| 1364 | is the address of the entry point of this initialization task. |
---|
| 1365 | |
---|
| 1366 | @item mode_set |
---|
| 1367 | is the initial execution mode of this initialization task. |
---|
| 1368 | |
---|
| 1369 | @item argument |
---|
| 1370 | is the initial argument for this initialization task. |
---|
| 1371 | |
---|
| 1372 | @end table |
---|
| 1373 | |
---|
| 1374 | A typical declaration for an Initialization Task Table might appear as follows: |
---|
| 1375 | |
---|
| 1376 | @example |
---|
| 1377 | rtems_initialization_tasks_table |
---|
| 1378 | Initialization_tasks[2] = @{ |
---|
| 1379 | @{ INIT_1_NAME, |
---|
| 1380 | 1024, |
---|
| 1381 | 1, |
---|
| 1382 | DEFAULT_ATTRIBUTES, |
---|
| 1383 | Init_1, |
---|
| 1384 | DEFAULT_MODES, |
---|
| 1385 | 1 |
---|
| 1386 | |
---|
| 1387 | @}, |
---|
| 1388 | @{ INIT_2_NAME, |
---|
| 1389 | 1024, |
---|
| 1390 | 250, |
---|
| 1391 | FLOATING_POINT, |
---|
| 1392 | Init_2, |
---|
[92c2ae1f] | 1393 | NO_PREEMPT, |
---|
[ae68ff0] | 1394 | 2 |
---|
| 1395 | |
---|
| 1396 | @} |
---|
| 1397 | @}; |
---|
| 1398 | @end example |
---|
| 1399 | |
---|
| 1400 | @section Driver Address Table |
---|
| 1401 | |
---|
[169502e] | 1402 | @cindex Device Driver Table |
---|
| 1403 | |
---|
[6d00095] | 1404 | The Device Driver Table is used to inform the I/O Manager of the set of |
---|
| 1405 | entry points for each device driver configured in the system. The table |
---|
| 1406 | contains one entry for each device driver required by the application. |
---|
| 1407 | The number of entries is defined in the number_of_device_drivers entry |
---|
| 1408 | in the Configuration Table. This table is copied to the Device Drive |
---|
| 1409 | Table during the IO Manager's initialization giving the entries in this |
---|
| 1410 | table the lower major numbers. The format of each entry in the Device |
---|
[ae10dbd] | 1411 | Driver Table is defined in the following C structure: |
---|
[ae68ff0] | 1412 | |
---|
[adee5979] | 1413 | @findex rtems_driver_address_table |
---|
[ae68ff0] | 1414 | @example |
---|
| 1415 | typedef struct @{ |
---|
[ae10dbd] | 1416 | rtems_device_driver_entry initialization_entry; |
---|
| 1417 | rtems_device_driver_entry open_entry; |
---|
| 1418 | rtems_device_driver_entry close_entry; |
---|
| 1419 | rtems_device_driver_entry read_entry; |
---|
| 1420 | rtems_device_driver_entry write_entry; |
---|
| 1421 | rtems_device_driver_entry control_entry; |
---|
[ae68ff0] | 1422 | @} rtems_driver_address_table; |
---|
| 1423 | @end example |
---|
| 1424 | |
---|
| 1425 | @table @b |
---|
[ae10dbd] | 1426 | @item initialization_entry |
---|
[75e22db] | 1427 | is the address of the entry point called by |
---|
[ae10dbd] | 1428 | @code{rtems_io_initialize} |
---|
[ae68ff0] | 1429 | to initialize a device driver and its associated devices. |
---|
| 1430 | |
---|
[ae10dbd] | 1431 | @item open_entry |
---|
| 1432 | is the address of the entry point called by @code{rtems_io_open}. |
---|
[ae68ff0] | 1433 | |
---|
[ae10dbd] | 1434 | @item close_entry |
---|
| 1435 | is the address of the entry point called by @code{rtems_io_close}. |
---|
[ae68ff0] | 1436 | |
---|
[ae10dbd] | 1437 | @item read_entry |
---|
| 1438 | is the address of the entry point called by @code{rtems_io_read}. |
---|
[ae68ff0] | 1439 | |
---|
[ae10dbd] | 1440 | @item write_entry |
---|
| 1441 | is the address of the entry point called by @code{rtems_io_write}. |
---|
[ae68ff0] | 1442 | |
---|
[ae10dbd] | 1443 | @item control_entry |
---|
| 1444 | is the address of the entry point called by @code{rtems_io_control}. |
---|
[ae68ff0] | 1445 | |
---|
| 1446 | @end table |
---|
| 1447 | |
---|
| 1448 | Driver entry points configured as NULL will always |
---|
[4fa4ea65] | 1449 | return a status code of @code{@value{RPREFIX}SUCCESSFUL}. No user code will be |
---|
[ae68ff0] | 1450 | executed in this situation. |
---|
| 1451 | |
---|
| 1452 | A typical declaration for a Device Driver Table might appear as follows: |
---|
| 1453 | |
---|
| 1454 | @example |
---|
| 1455 | rtems_driver_address_table Driver_table[2] = @{ |
---|
| 1456 | @{ tty_initialize, tty_open, tty_close, /* major = 0 */ |
---|
| 1457 | tty_read, tty_write, tty_control |
---|
| 1458 | @}, |
---|
| 1459 | @{ lp_initialize, lp_open, lp_close, /* major = 1 */ |
---|
| 1460 | NULL, lp_write, lp_control |
---|
| 1461 | @} |
---|
| 1462 | @}; |
---|
| 1463 | @end example |
---|
| 1464 | |
---|
| 1465 | More information regarding the construction and |
---|
| 1466 | operation of device drivers is provided in the I/O Manager |
---|
| 1467 | chapter. |
---|
| 1468 | |
---|
| 1469 | @section User Extensions Table |
---|
| 1470 | |
---|
[169502e] | 1471 | @cindex User Extensions Table |
---|
| 1472 | |
---|
[ae68ff0] | 1473 | The User Extensions Table is used to inform RTEMS of |
---|
| 1474 | the optional user-supplied static extension set. This table |
---|
| 1475 | contains one entry for each possible extension. The entries are |
---|
| 1476 | called at critical times in the life of the system and |
---|
| 1477 | individual tasks. The application may create dynamic extensions |
---|
| 1478 | in addition to this single static set. The format of each entry |
---|
[ae10dbd] | 1479 | in the User Extensions Table is defined in the following C structure: |
---|
[ae68ff0] | 1480 | |
---|
[022fbf3e] | 1481 | @example |
---|
[ae10dbd] | 1482 | typedef void rtems_extension; |
---|
| 1483 | typedef rtems_extension (*rtems_task_create_extension)( |
---|
| 1484 | Thread_Control * /* executing */, |
---|
| 1485 | Thread_Control * /* created */ |
---|
| 1486 | ); |
---|
| 1487 | typedef rtems_extension (*rtems_task_delete_extension)( |
---|
| 1488 | Thread_Control * /* executing */, |
---|
| 1489 | Thread_Control * /* deleted */ |
---|
| 1490 | ); |
---|
| 1491 | typedef rtems_extension (*rtems_task_start_extension)( |
---|
| 1492 | Thread_Control * /* executing */, |
---|
| 1493 | Thread_Control * /* started */ |
---|
| 1494 | ); |
---|
| 1495 | typedef rtems_extension (*rtems_task_restart_extension)( |
---|
| 1496 | Thread_Control * /* executing */, |
---|
| 1497 | Thread_Control * /* restarted */ |
---|
| 1498 | ); |
---|
| 1499 | typedef rtems_extension (*rtems_task_switch_extension)( |
---|
| 1500 | Thread_Control * /* executing */, |
---|
| 1501 | Thread_Control * /* heir */ |
---|
| 1502 | ); |
---|
| 1503 | typedef rtems_extension (*rtems_task_begin_extension)( |
---|
| 1504 | Thread_Control * /* beginning */ |
---|
| 1505 | ); |
---|
| 1506 | typedef rtems_extension (*rtems_task_exitted_extension)( |
---|
| 1507 | Thread_Control * /* exiting */ |
---|
| 1508 | ); |
---|
| 1509 | typedef rtems_extension (*rtems_fatal_extension)( |
---|
| 1510 | Internal_errors_Source /* the_source */, |
---|
| 1511 | boolean /* is_internal */, |
---|
| 1512 | uint32_t /* the_error */ |
---|
| 1513 | ); |
---|
[92c2ae1f] | 1514 | |
---|
[ae68ff0] | 1515 | typedef struct @{ |
---|
[92c2ae1f] | 1516 | rtems_task_create_extension thread_create; |
---|
| 1517 | rtems_task_start_extension thread_start; |
---|
| 1518 | rtems_task_restart_extension thread_restart; |
---|
| 1519 | rtems_task_delete_extension thread_delete; |
---|
| 1520 | rtems_task_switch_extension thread_switch; |
---|
| 1521 | rtems_task_begin_extension thread_begin; |
---|
| 1522 | rtems_task_exitted_extension thread_exitted; |
---|
| 1523 | rtems_fatal_extension fatal; |
---|
[ae10dbd] | 1524 | @} rtems_extensions_table; |
---|
[92c2ae1f] | 1525 | @end example |
---|
[ae68ff0] | 1526 | |
---|
| 1527 | @table @b |
---|
| 1528 | |
---|
| 1529 | @item thread_create |
---|
| 1530 | is the address of the |
---|
| 1531 | user-supplied subroutine for the TASK_CREATE extension. If this |
---|
| 1532 | extension for task creation is defined, it is called from the |
---|
| 1533 | task_create directive. A value of NULL indicates that no |
---|
| 1534 | extension is provided. |
---|
| 1535 | |
---|
| 1536 | @item thread_start |
---|
| 1537 | is the address of the user-supplied |
---|
| 1538 | subroutine for the TASK_START extension. If this extension for |
---|
| 1539 | task initiation is defined, it is called from the task_start |
---|
| 1540 | directive. A value of NULL indicates that no extension is |
---|
| 1541 | provided. |
---|
| 1542 | |
---|
| 1543 | @item thread_restart |
---|
| 1544 | is the address of the user-supplied |
---|
| 1545 | subroutine for the TASK_RESTART extension. If this extension |
---|
| 1546 | for task re-initiation is defined, it is called from the |
---|
| 1547 | task_restart directive. A value of NULL indicates that no |
---|
| 1548 | extension is provided. |
---|
| 1549 | |
---|
| 1550 | @item thread_delete |
---|
| 1551 | is the address of the user-supplied |
---|
| 1552 | subroutine for the TASK_DELETE extension. If this RTEMS |
---|
| 1553 | extension for task deletion is defined, it is called from the |
---|
| 1554 | task_delete directive. A value of NULL indicates that no |
---|
| 1555 | extension is provided. |
---|
| 1556 | |
---|
| 1557 | @item thread_switch |
---|
| 1558 | is the address of the user-supplied |
---|
| 1559 | subroutine for the task context switch extension. This |
---|
| 1560 | subroutine is called from RTEMS dispatcher after the current |
---|
| 1561 | task has been swapped out but before the new task has been |
---|
| 1562 | swapped in. A value of NULL indicates that no extension is |
---|
| 1563 | provided. As this routine is invoked after saving the current |
---|
| 1564 | task's context and before restoring the heir task's context, it |
---|
| 1565 | is not necessary for this routine to save and restore any |
---|
| 1566 | registers. |
---|
| 1567 | |
---|
| 1568 | @item thread_begin |
---|
| 1569 | is the address of the user-supplied |
---|
| 1570 | subroutine which is invoked immediately before a task begins |
---|
| 1571 | execution. It is invoked in the context of the beginning task. |
---|
| 1572 | A value of NULL indicates that no extension is provided. |
---|
| 1573 | |
---|
| 1574 | @item thread_exitted |
---|
| 1575 | is the address of the user-supplied |
---|
| 1576 | subroutine which is invoked when a task exits. This procedure |
---|
| 1577 | is responsible for some action which will allow the system to |
---|
| 1578 | continue execution (i.e. delete or restart the task) or to |
---|
| 1579 | terminate with a fatal error. If this field is set to NULL, the |
---|
[75e22db] | 1580 | default RTEMS TASK_EXITTED handler will be invoked. |
---|
[ae68ff0] | 1581 | |
---|
| 1582 | @item fatal |
---|
| 1583 | is the address of the user-supplied |
---|
| 1584 | subroutine for the FATAL extension. This RTEMS extension of |
---|
[75e22db] | 1585 | fatal error handling is called from the |
---|
| 1586 | @code{@value{DIRPREFIX}fatal_error_occurred} |
---|
[ae68ff0] | 1587 | directive. If the user's fatal error handler returns or if this |
---|
| 1588 | entry is NULL then the default RTEMS fatal error handler will be |
---|
| 1589 | executed. |
---|
| 1590 | |
---|
| 1591 | @end table |
---|
| 1592 | |
---|
| 1593 | A typical declaration for a User Extension Table |
---|
| 1594 | which defines the TASK_CREATE, TASK_DELETE, TASK_SWITCH, and |
---|
| 1595 | FATAL extension might appear as follows: |
---|
| 1596 | |
---|
| 1597 | @example |
---|
| 1598 | rtems_extensions_table User_extensions = @{ |
---|
| 1599 | task_create_extension, |
---|
| 1600 | NULL, |
---|
| 1601 | NULL, |
---|
| 1602 | task_delete_extension, |
---|
| 1603 | task_switch_extension, |
---|
| 1604 | NULL, |
---|
| 1605 | NULL, |
---|
| 1606 | fatal_extension |
---|
| 1607 | @}; |
---|
| 1608 | @end example |
---|
| 1609 | |
---|
| 1610 | More information regarding the user extensions is |
---|
| 1611 | provided in the User Extensions chapter. |
---|
| 1612 | |
---|
| 1613 | @section Multiprocessor Configuration Table |
---|
| 1614 | |
---|
[169502e] | 1615 | @cindex Multiprocessor Configuration Table |
---|
| 1616 | |
---|
[ae68ff0] | 1617 | The Multiprocessor Configuration Table contains |
---|
| 1618 | information needed when using RTEMS in a multiprocessor |
---|
| 1619 | configuration. Many of the details associated with configuring |
---|
| 1620 | a multiprocessor system are dependent on the multiprocessor |
---|
| 1621 | communications layer provided by the user. The address of the |
---|
| 1622 | Multiprocessor Configuration Table should be placed in the |
---|
[bae90e1] | 1623 | @code{User_multiprocessing_table} entry in the primary Configuration |
---|
[ae68ff0] | 1624 | Table. Further details regarding many of the entries in the |
---|
| 1625 | Multiprocessor Configuration Table will be provided in the |
---|
[bae90e1] | 1626 | Multiprocessing chapter. |
---|
| 1627 | |
---|
| 1628 | |
---|
[bfa0476] | 1629 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[adee5979] | 1630 | an RTEMS application, the macro @code{CONFIGURE_MP_APPLICATION} must |
---|
[bae90e1] | 1631 | be defined to automatically generate the Multiprocessor Configuration Table. |
---|
[adee5979] | 1632 | If @code{CONFIGURE_MP_APPLICATION}, is not defined, then a NULL pointer |
---|
[bae90e1] | 1633 | is configured as the address of this table. |
---|
| 1634 | |
---|
| 1635 | The format of the Multiprocessor Configuration Table is defined in |
---|
[ae10dbd] | 1636 | the following C structure: |
---|
[ae68ff0] | 1637 | |
---|
| 1638 | @example |
---|
| 1639 | typedef struct @{ |
---|
[ae10dbd] | 1640 | uint32_t node; |
---|
| 1641 | uint32_t maximum_nodes; |
---|
| 1642 | uint32_t maximum_global_objects; |
---|
| 1643 | uint32_t maximum_proxies; |
---|
[3e066540] | 1644 | uint32_t extra_mpci_receive_server_stack; |
---|
[ae68ff0] | 1645 | rtems_mpci_table *User_mpci_table; |
---|
| 1646 | @} rtems_multiprocessing_table; |
---|
| 1647 | @end example |
---|
| 1648 | |
---|
| 1649 | @table @b |
---|
| 1650 | @item node |
---|
| 1651 | is a unique processor identifier |
---|
| 1652 | and is used in routing messages between nodes in a |
---|
| 1653 | multiprocessor configuration. Each processor must have a unique |
---|
| 1654 | node number. RTEMS assumes that node numbers start at one and |
---|
| 1655 | increase sequentially. This assumption can be used to advantage |
---|
| 1656 | by the user-supplied MPCI layer. Typically, this requirement is |
---|
| 1657 | made when the node numbers are used to calculate the address of |
---|
| 1658 | inter-processor communication links. Zero should be avoided as |
---|
| 1659 | a node number because some MPCI layers use node zero to |
---|
| 1660 | represent broadcasted packets. Thus, it is recommended that |
---|
| 1661 | node numbers start at one and increase sequentially. |
---|
[bfa0476] | 1662 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1663 | an RTEMS application, the value for this field corresponds |
---|
| 1664 | to the setting of the macro @code{CONFIGURE_MP_NODE_NUMBER}. |
---|
| 1665 | If not defined by the application, then the @code{CONFIGURE_MP_NODE_NUMBER} |
---|
| 1666 | macro defaults to the value of the @code{NODE_NUMBER} macro which is |
---|
| 1667 | set on the compiler command line by the RTEMS Multiprocessing Test Suites. |
---|
| 1668 | |
---|
[ae68ff0] | 1669 | |
---|
| 1670 | @item maximum_nodes |
---|
| 1671 | is the number of processor nodes in the system. |
---|
[bfa0476] | 1672 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1673 | an RTEMS application, the value for this field corresponds |
---|
| 1674 | to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_NODES}. |
---|
| 1675 | If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_NODES} |
---|
| 1676 | macro defaults to the value 2. |
---|
[ae68ff0] | 1677 | |
---|
| 1678 | @item maximum_global_objects |
---|
| 1679 | is the maximum number of global objects which can exist at any |
---|
| 1680 | given moment in the entire system. If this parameter is not the |
---|
| 1681 | same on all nodes in the system, then a fatal error is generated |
---|
| 1682 | to inform the user that the system is inconsistent. |
---|
[bfa0476] | 1683 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1684 | an RTEMS application, the value for this field corresponds |
---|
| 1685 | to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS}. |
---|
| 1686 | If not defined by the application, then the |
---|
| 1687 | @code{CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS} macro defaults to the value 32. |
---|
| 1688 | |
---|
[ae68ff0] | 1689 | |
---|
| 1690 | @item maximum_proxies |
---|
| 1691 | is the maximum number of proxies which can exist at any given moment |
---|
| 1692 | on this particular node. A proxy is a substitute task control block |
---|
| 1693 | which represent a task residing on a remote node when that task blocks |
---|
| 1694 | on a remote object. Proxies are used in situations in which delayed |
---|
| 1695 | interaction is required with a remote node. |
---|
[bfa0476] | 1696 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1697 | an RTEMS application, the value for this field corresponds |
---|
| 1698 | to the setting of the macro @code{CONFIGURE_MP_MAXIMUM_PROXIES}. |
---|
| 1699 | If not defined by the application, then the @code{CONFIGURE_MP_MAXIMUM_PROXIES} |
---|
| 1700 | macro defaults to the value 32. |
---|
| 1701 | |
---|
[3e066540] | 1702 | @item extra_mpci_receive_server_stack |
---|
| 1703 | is the extra stack space allocated for the RTEMS MPCI receive server task |
---|
| 1704 | in bytes. The MPCI receive server may invoke nearly all directives and |
---|
| 1705 | may require extra stack space on some targets. |
---|
[ae68ff0] | 1706 | |
---|
| 1707 | @item User_mpci_table |
---|
| 1708 | is the address of the Multiprocessor Communications Interface |
---|
| 1709 | Table. This table contains the entry points of user-provided functions |
---|
| 1710 | which constitute the multiprocessor communications layer. This table |
---|
| 1711 | must be provided in multiprocessor configurations with all |
---|
| 1712 | entries configured. The format of this table and details |
---|
| 1713 | regarding its entries can be found in the next section. |
---|
[bfa0476] | 1714 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1715 | an RTEMS application, the value for this field corresponds |
---|
| 1716 | to the setting of the macro @code{CONFIGURE_MP_MPCI_TABLE_POINTER}. |
---|
| 1717 | If not defined by the application, then the |
---|
| 1718 | @code{CONFIGURE_MP_MPCI_TABLE_POINTER} macro defaults to the |
---|
| 1719 | address of the table named @code{MPCI_table}. |
---|
| 1720 | |
---|
[ae68ff0] | 1721 | |
---|
| 1722 | @end table |
---|
| 1723 | |
---|
| 1724 | @section Multiprocessor Communications Interface Table |
---|
| 1725 | |
---|
[169502e] | 1726 | @cindex Multiprocessor Communications Interface Table |
---|
| 1727 | |
---|
[bae90e1] | 1728 | This table defines the set of callouts that must be provided by |
---|
| 1729 | an Multiprocessor Communications Interface implementation. |
---|
| 1730 | |
---|
[bfa0476] | 1731 | When using the @code{rtems/confdefs.h} mechanism for configuring |
---|
[bae90e1] | 1732 | an RTEMS application, the name of this table is assumed |
---|
| 1733 | to be @code{MPCI_table} unless the application sets |
---|
| 1734 | the @code{CONFIGURE_MP_MPCI_TABLE_POINTER} when configuring a |
---|
| 1735 | multiprocessing system. |
---|
| 1736 | |
---|
[61389eac] | 1737 | The format of this table is defined in |
---|
[ae10dbd] | 1738 | the following C structure: |
---|
[ae68ff0] | 1739 | |
---|
| 1740 | @example |
---|
| 1741 | typedef struct @{ |
---|
[ae10dbd] | 1742 | uint32_t default_timeout; /* in ticks */ |
---|
| 1743 | uint32_t maximum_packet_size; |
---|
[ae68ff0] | 1744 | rtems_mpci_initialization_entry initialization; |
---|
| 1745 | rtems_mpci_get_packet_entry get_packet; |
---|
| 1746 | rtems_mpci_return_packet_entry return_packet; |
---|
[ae10dbd] | 1747 | rtems_mpci_send_entry send_packet; |
---|
| 1748 | rtems_mpci_receive_entry receive_packet; |
---|
[ae68ff0] | 1749 | @} rtems_mpci_table; |
---|
| 1750 | @end example |
---|
| 1751 | |
---|
| 1752 | @table @b |
---|
| 1753 | @item default_timeout |
---|
| 1754 | is the default maximum length of time a task should block waiting for |
---|
| 1755 | a response to a directive which results in communication with a remote node. |
---|
| 1756 | The maximum length of time is a function the user supplied |
---|
| 1757 | multiprocessor communications layer and the media used. This |
---|
| 1758 | timeout only applies to directives which would not block if the |
---|
| 1759 | operation were performed locally. |
---|
| 1760 | |
---|
| 1761 | @item maximum_packet_size |
---|
| 1762 | is the size in bytes of the longest packet which the MPCI layer is capable |
---|
| 1763 | of sending. This value should represent the total number of bytes available |
---|
| 1764 | for a RTEMS interprocessor messages. |
---|
| 1765 | |
---|
| 1766 | @item initialization |
---|
| 1767 | is the address of the entry point for the initialization procedure of the |
---|
| 1768 | user supplied multiprocessor communications layer. |
---|
| 1769 | |
---|
| 1770 | @item get_packet |
---|
| 1771 | is the address of the entry point for the procedure called by RTEMS to |
---|
| 1772 | obtain a packet from the user supplied multiprocessor communications layer. |
---|
| 1773 | |
---|
| 1774 | @item return_packet |
---|
| 1775 | is the address of the entry point for the procedure called by RTEMS to |
---|
| 1776 | return a packet to the user supplied multiprocessor communications layer. |
---|
| 1777 | |
---|
| 1778 | @item send |
---|
| 1779 | is the address of the entry point for the procedure called by RTEMS to |
---|
| 1780 | send an envelope to another node. This procedure is part of the user |
---|
| 1781 | supplied multiprocessor communications layer. |
---|
| 1782 | |
---|
| 1783 | @item receive |
---|
| 1784 | is the address of the entry point for the |
---|
| 1785 | procedure called by RTEMS to retrieve an envelope containing a |
---|
| 1786 | message from another node. This procedure is part of the user |
---|
| 1787 | supplied multiprocessor communications layer. |
---|
| 1788 | |
---|
| 1789 | @end table |
---|
| 1790 | |
---|
| 1791 | More information regarding the required functionality of these |
---|
| 1792 | entry points is provided in the Multiprocessor chapter. |
---|
| 1793 | |
---|
| 1794 | @section Determining Memory Requirements |
---|
| 1795 | |
---|
| 1796 | Since memory is a critical resource in many real-time |
---|
[bae90e1] | 1797 | embedded systems, the RTEMS Classic API was specifically designed to allow |
---|
| 1798 | unused managers to be forcibly excluded from the run-time environment. |
---|
[ae68ff0] | 1799 | This allows the application designer the flexibility to tailor |
---|
| 1800 | RTEMS to most efficiently meet system requirements while still |
---|
| 1801 | satisfying even the most stringent memory constraints. As |
---|
| 1802 | result, the size of the RTEMS executive is application |
---|
[17a3c69] | 1803 | dependent. A Memory Requirements worksheet is provided in the |
---|
[ae68ff0] | 1804 | Applications Supplement document for a specific target |
---|
| 1805 | processor. This worksheet can be used to calculate the memory |
---|
| 1806 | requirements of a custom RTEMS run-time environment. To insure |
---|
| 1807 | that enough memory is allocated for future versions of RTEMS, |
---|
| 1808 | the application designer should round these memory requirements |
---|
[bae90e1] | 1809 | up. The following Classic API managers may be optionally excluded: |
---|
[ae68ff0] | 1810 | |
---|
| 1811 | @itemize @bullet |
---|
| 1812 | @item signal |
---|
| 1813 | @item region |
---|
| 1814 | @item dual ported memory |
---|
| 1815 | @item event |
---|
| 1816 | @item multiprocessing |
---|
| 1817 | @item partition |
---|
| 1818 | @item timer |
---|
| 1819 | @item semaphore |
---|
| 1820 | @item message |
---|
| 1821 | @item rate monotonic |
---|
| 1822 | @end itemize |
---|
| 1823 | |
---|
[bae90e1] | 1824 | RTEMS is designed to be built and installed as a library |
---|
| 1825 | that is linked into the application. As such, much of |
---|
| 1826 | RTEMS is implemented in such a way that there is a single |
---|
| 1827 | entry point per source file. This avoids having the |
---|
| 1828 | linker being forced to pull large object files in their |
---|
| 1829 | entirety into an application when the application references |
---|
| 1830 | a single symbol. |
---|
| 1831 | |
---|
[ae68ff0] | 1832 | RTEMS based applications must somehow provide memory |
---|
| 1833 | for RTEMS' code and data space. Although RTEMS' data space must |
---|
| 1834 | be in RAM, its code space can be located in either ROM or RAM. |
---|
| 1835 | In addition, the user must allocate RAM for the RTEMS RAM |
---|
| 1836 | Workspace. The size of this area is application dependent and |
---|
| 1837 | can be calculated using the formula provided in the Memory |
---|
[17a3c69] | 1838 | Requirements chapter of the Applications Supplement document |
---|
[ae68ff0] | 1839 | for a specific target processor. |
---|
| 1840 | |
---|
[bae90e1] | 1841 | All private RTEMS data variables and routine names used by |
---|
[ae68ff0] | 1842 | RTEMS begin with the underscore ( _ ) character followed by an |
---|
| 1843 | upper-case letter. If RTEMS is linked with an application, then |
---|
| 1844 | the application code should NOT contain any symbols which begin |
---|
| 1845 | with the underscore character and followed by an upper-case |
---|
| 1846 | letter to avoid any naming conflicts. All RTEMS directive names |
---|
| 1847 | should be treated as reserved words. |
---|
| 1848 | |
---|
| 1849 | @section Sizing the RTEMS RAM Workspace |
---|
| 1850 | |
---|
| 1851 | The RTEMS RAM Workspace is a user-specified block of |
---|
| 1852 | memory reserved for use by RTEMS. The application should NOT |
---|
| 1853 | modify this memory. This area consists primarily of the RTEMS |
---|
| 1854 | data structures whose exact size depends upon the values |
---|
| 1855 | specified in the Configuration Table. In addition, task stacks |
---|
| 1856 | and floating point context areas are dynamically allocated from |
---|
| 1857 | the RTEMS RAM Workspace. |
---|
| 1858 | |
---|
[bfa0476] | 1859 | The @code{rtems/confdefs.h} mechanism calcalutes the size |
---|
[bae90e1] | 1860 | of the RTEMS RAM Workspace automatically. It assumes that |
---|
| 1861 | all tasks are floating point and that all will be allocated |
---|
| 1862 | the miminum stack space. This calculation also automatically |
---|
| 1863 | includes the memory that will be allocated for internal use |
---|
| 1864 | by RTEMS. The following macros may be set |
---|
| 1865 | by the application to make the calculation |
---|
| 1866 | of memory required more accurate: |
---|
| 1867 | |
---|
| 1868 | @itemize @bullet |
---|
| 1869 | |
---|
[e95cfafb] | 1870 | @item @code{CONFIGURE_MEMORY_OVERHEAD} |
---|
| 1871 | @item @code{CONFIGURE_EXTRA_TASK_STACKS} |
---|
[bae90e1] | 1872 | |
---|
| 1873 | @end itemize |
---|
| 1874 | |
---|
[ae68ff0] | 1875 | The starting address of the RTEMS RAM Workspace must |
---|
| 1876 | be aligned on a four-byte boundary. Failure to properly align |
---|
[75e22db] | 1877 | the workspace area will result in the |
---|
| 1878 | @code{@value{DIRPREFIX}fatal_error_occurred} |
---|
| 1879 | directive being invoked with the |
---|
| 1880 | @code{@value{RPREFIX}INVALID_ADDRESS} error code. |
---|
[ae68ff0] | 1881 | |
---|
[338502f] | 1882 | A worksheet is provided in the @b{Memory Requirements} |
---|
[17a3c69] | 1883 | chapter of the Applications Supplement document for a specific |
---|
[ae68ff0] | 1884 | target processor to assist the user in calculating the minimum |
---|
| 1885 | size of the RTEMS RAM Workspace for each application. The value |
---|
| 1886 | calculated with this worksheet is the minimum value that should |
---|
[338502f] | 1887 | be specified as the @code{work_space_size} parameter of the |
---|
| 1888 | Configuration Table. |
---|
| 1889 | |
---|
| 1890 | The allocation of objects can operate in two modes. The default mode |
---|
| 1891 | has an object number ceiling. No more than the specified number of |
---|
| 1892 | objects can be allocated from the RTEMS RAM Workspace. The number of objects |
---|
| 1893 | specified in the particular API Configuration table fields are |
---|
| 1894 | allocated at initialisation. The second mode allows the number of |
---|
| 1895 | objects to grow to use the available free memory in the RTEMS RAM Workspace. |
---|
| 1896 | |
---|
| 1897 | The auto-extending mode can be enabled individually for each object |
---|
| 1898 | type by using the macro @code{rtems_resource_unlimited}. This takes a value |
---|
| 1899 | as a parameter, and is used to set the object maximum number field in |
---|
| 1900 | an API Configuration table. The value is an allocation unit size. When |
---|
| 1901 | RTEMS is required to grow the object table it is grown by this |
---|
| 1902 | size. The kernel will return the object memory back to the RTEMS RAM Workspace |
---|
| 1903 | when an object is destroyed. The kernel will only return an allocated |
---|
| 1904 | block of objects to the RTEMS RAM Workspace if at least half the allocation |
---|
| 1905 | size of free objects remain allocated. RTEMS always keeps one |
---|
| 1906 | allocation block of objects allocated. Here is an example of using |
---|
| 1907 | @code{rtems_resource_unlimited}: |
---|
| 1908 | |
---|
| 1909 | @example |
---|
| 1910 | #define CONFIGURE_MAXIMUM_TASKS rtems_resource_unlimited(5) |
---|
| 1911 | @end example |
---|
| 1912 | |
---|
| 1913 | The user is cautioned that future versions of RTEMS may not have the |
---|
| 1914 | same memory requirements per object. Although the value calculated is |
---|
| 1915 | suficient for a particular target processor and release of RTEMS, |
---|
| 1916 | memory usage is subject to change across versions and target |
---|
| 1917 | processors. The user is advised to allocate somewhat more memory than |
---|
| 1918 | the worksheet recommends to insure compatibility with future releases |
---|
| 1919 | for a specific target processor and other target processors. To avoid |
---|
| 1920 | problems, the user should recalculate the memory requirements each |
---|
| 1921 | time one of the following events occurs: |
---|
[ae68ff0] | 1922 | |
---|
| 1923 | @itemize @bullet |
---|
| 1924 | @item a configuration parameter is modified, |
---|
| 1925 | @item task or interrupt stack requirements change, |
---|
| 1926 | @item task floating point attribute is altered, |
---|
| 1927 | @item RTEMS is upgraded, or |
---|
| 1928 | @item the target processor is changed. |
---|
| 1929 | @end itemize |
---|
| 1930 | |
---|
| 1931 | Failure to provide enough space in the RTEMS RAM |
---|
[75e22db] | 1932 | Workspace will result in the |
---|
| 1933 | @code{@value{DIRPREFIX}fatal_error_occurred} directive |
---|
[ae68ff0] | 1934 | being invoked with the appropriate error code. |
---|