[b96254f] | 1 | /** |
---|
| 2 | * @file rtems/confdefs.h |
---|
[08bae5e6] | 3 | * |
---|
| 4 | * This include file contains the configuration table template that will |
---|
[df49c60] | 5 | * be instantiated by an application based on the setting of a number |
---|
| 6 | * of macros. The macros are documented in the Configuring a System |
---|
| 7 | * chapter of the Classic API User's Guide |
---|
[08bae5e6] | 8 | * |
---|
[df49c60] | 9 | * The model is to estimate the memory required for each configured item |
---|
| 10 | * and sum those estimates. The estimate can be too high or too low for |
---|
| 11 | * a variety of reasons: |
---|
| 12 | * |
---|
| 13 | * Reasons estimate is too high: |
---|
| 14 | * + FP contexts (not all tasks are FP) |
---|
| 15 | * |
---|
| 16 | * Reasons estimate is too low: |
---|
| 17 | * + stacks greater than minimum size |
---|
| 18 | * + messages |
---|
| 19 | * + application must account for device driver resources |
---|
| 20 | * + application must account for add-on library resource requirements |
---|
| 21 | * |
---|
| 22 | * NOTE: Eventually this may be able to take into account some of |
---|
| 23 | * the above. This procedure has evolved from just enough to |
---|
| 24 | * support the RTEMS Test Suites into something that can be |
---|
| 25 | * used remarkably reliably by most applications. |
---|
[b96254f] | 26 | */ |
---|
| 27 | |
---|
| 28 | /* |
---|
[76deaf0c] | 29 | * COPYRIGHT (c) 1989-2008. |
---|
[08bae5e6] | 30 | * On-Line Applications Research Corporation (OAR). |
---|
| 31 | * |
---|
[98e4ebf5] | 32 | * The license and distribution terms for this file may be |
---|
| 33 | * found in the file LICENSE in this distribution or at |
---|
[2ba508b] | 34 | * http://www.rtems.com/license/LICENSE. |
---|
[08bae5e6] | 35 | * |
---|
| 36 | * $Id$ |
---|
| 37 | */ |
---|
| 38 | |
---|
| 39 | #ifndef __CONFIGURATION_TEMPLATE_h |
---|
| 40 | #define __CONFIGURATION_TEMPLATE_h |
---|
[8486081] | 41 | |
---|
[9c63d90] | 42 | /* |
---|
| 43 | * Include the executive's configuration |
---|
| 44 | */ |
---|
| 45 | #include <rtems/score/cpuopts.h> |
---|
[b2b143f4] | 46 | #include <rtems/score/apimutex.h> |
---|
[9c63d90] | 47 | |
---|
[5877cc3a] | 48 | #ifdef __cplusplus |
---|
| 49 | extern "C" { |
---|
| 50 | #endif |
---|
| 51 | |
---|
[08bae5e6] | 52 | extern rtems_initialization_tasks_table Initialization_tasks[]; |
---|
| 53 | extern rtems_driver_address_table Device_drivers[]; |
---|
| 54 | extern rtems_configuration_table Configuration; |
---|
[976162a6] | 55 | #if defined(RTEMS_MULTIPROCESSING) |
---|
| 56 | extern rtems_multiprocessing_table Multiprocessing_configuration; |
---|
| 57 | #endif |
---|
[2eba45d] | 58 | #ifdef RTEMS_POSIX_API |
---|
[5877cc3a] | 59 | extern posix_api_configuration_table Configuration_POSIX_API; |
---|
[2eba45d] | 60 | #endif |
---|
[352c9b2] | 61 | #ifdef RTEMS_ITRON_API |
---|
[5877cc3a] | 62 | extern itron_api_configuration_table Configuration_ITRON_API; |
---|
[352c9b2] | 63 | #endif |
---|
[08bae5e6] | 64 | |
---|
[5877cc3a] | 65 | /** |
---|
| 66 | * This macro determines whether the RTEMS reentrancy support for |
---|
| 67 | * the Newlib C Library is enabled. |
---|
[3b89891] | 68 | */ |
---|
[5877cc3a] | 69 | #if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
[c3db01d0] | 70 | #define CONFIGURE_NEWLIB_EXTENSION 1 |
---|
[623893c] | 71 | #else |
---|
[c3db01d0] | 72 | #define CONFIGURE_NEWLIB_EXTENSION 0 |
---|
[9c63d90] | 73 | #endif |
---|
[623893c] | 74 | |
---|
[5877cc3a] | 75 | /** |
---|
| 76 | * This macro defines the number of POSIX file descriptors allocated |
---|
| 77 | * and managed by libio. These are the "integer" file descriptors that |
---|
| 78 | * are used by calls like open(2) and read(2). |
---|
[df49c60] | 79 | */ |
---|
[bd9c3d1] | 80 | #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
[5877cc3a] | 81 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3 |
---|
[bd9c3d1] | 82 | #endif |
---|
| 83 | |
---|
[5877cc3a] | 84 | /** |
---|
| 85 | * From the number of file descriptors, we can determine how many |
---|
| 86 | * semaphores the implementation will require. |
---|
| 87 | */ |
---|
[bd9c3d1] | 88 | #define CONFIGURE_LIBIO_SEMAPHORES \ |
---|
| 89 | (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1) |
---|
| 90 | |
---|
[43908825] | 91 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 92 | /** |
---|
| 93 | * When instantiating the configuration tables, this variable is |
---|
| 94 | * initialized to specify the maximum number of file descriptors. |
---|
| 95 | */ |
---|
| 96 | uint32_t rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS; |
---|
[43908825] | 97 | #endif |
---|
| 98 | |
---|
[5877cc3a] | 99 | /** |
---|
| 100 | * This macro determines if termios is disabled by this application. |
---|
| 101 | * This only means that resources will not be reserved. If you end |
---|
| 102 | * up using termios, it will fail. |
---|
[df49c60] | 103 | */ |
---|
| 104 | #ifdef CONFIGURE_TERMIOS_DISABLED |
---|
[5877cc3a] | 105 | #define CONFIGURE_TERMIOS_SEMAPHORES 0 |
---|
[df49c60] | 106 | #else |
---|
[5877cc3a] | 107 | /** |
---|
| 108 | * This macro specifies the number of serial or PTY ports that will |
---|
| 109 | * use termios. |
---|
| 110 | */ |
---|
| 111 | #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
| 112 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1 |
---|
| 113 | #endif |
---|
[df49c60] | 114 | |
---|
[5877cc3a] | 115 | /** |
---|
| 116 | * This macro reserves the number of semaphores required by termios |
---|
| 117 | * based upon the number of communication ports that will use it. |
---|
| 118 | */ |
---|
| 119 | #define CONFIGURE_TERMIOS_SEMAPHORES \ |
---|
| 120 | ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1) |
---|
[df49c60] | 121 | #endif |
---|
| 122 | |
---|
[5877cc3a] | 123 | /** |
---|
| 124 | * This macro specifies the number of PTYs that can be concurrently |
---|
| 125 | * active. |
---|
[d3d2afdf] | 126 | */ |
---|
| 127 | #ifndef CONFIGURE_MAXIMUM_PTYS |
---|
[5877cc3a] | 128 | #define CONFIGURE_MAXIMUM_PTYS 0 |
---|
[d3d2afdf] | 129 | #endif |
---|
| 130 | |
---|
[5877cc3a] | 131 | /** |
---|
| 132 | * This variable contains the maximum number of PTYs that can be |
---|
| 133 | * concurrently active. |
---|
| 134 | */ |
---|
[d3d2afdf] | 135 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 136 | int rtems_telnetd_maximum_ptys = CONFIGURE_MAXIMUM_PTYS; |
---|
[d3d2afdf] | 137 | #else |
---|
[5877cc3a] | 138 | extern int rtems_telnetd_maximum_ptys; |
---|
[d3d2afdf] | 139 | #endif |
---|
| 140 | |
---|
[43f7a90] | 141 | /* |
---|
| 142 | * Mount Table Configuration |
---|
| 143 | */ |
---|
[ebbe119e] | 144 | #include <rtems/imfs.h> |
---|
[43f7a90] | 145 | |
---|
[5877cc3a] | 146 | /** |
---|
| 147 | * This specifies the number of bytes per block for files within |
---|
| 148 | * the IMFS. There are a maximum number of blocks per file so |
---|
| 149 | * this dictates the maximum size of a file. This has to be balanced |
---|
| 150 | * with the unused portion of each block that might be wasted. |
---|
| 151 | */ |
---|
[c9b005a9] | 152 | #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK |
---|
[5877cc3a] | 153 | #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ |
---|
| 154 | IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK |
---|
[c9b005a9] | 155 | #endif |
---|
[43f7a90] | 156 | #ifdef CONFIGURE_INIT |
---|
[c9b005a9] | 157 | int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK; |
---|
| 158 | #endif /* CONFIGURE_INIT */ |
---|
[43f7a90] | 159 | |
---|
[c9b005a9] | 160 | #ifdef CONFIGURE_INIT |
---|
[c3db01d0] | 161 | #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
[bf95ccb5] | 162 | const rtems_filesystem_mount_table_t configuration_mount_table = { |
---|
[c3db01d0] | 163 | #ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM |
---|
| 164 | &IMFS_ops, |
---|
| 165 | #else /* using miniIMFS as base filesystem */ |
---|
| 166 | &miniIMFS_ops, |
---|
| 167 | #endif |
---|
| 168 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
| 169 | NULL, |
---|
| 170 | NULL |
---|
| 171 | }; |
---|
| 172 | |
---|
[bf95ccb5] | 173 | const rtems_filesystem_mount_table_t |
---|
[c3db01d0] | 174 | *rtems_filesystem_mount_table = &configuration_mount_table; |
---|
[bf95ccb5] | 175 | const int rtems_filesystem_mount_table_size = 1; |
---|
[c3db01d0] | 176 | #endif |
---|
[43f7a90] | 177 | #endif |
---|
| 178 | |
---|
[5877cc3a] | 179 | /** |
---|
| 180 | * This configures the stack checker user extension. |
---|
[ab97da95] | 181 | */ |
---|
| 182 | #ifdef STACK_CHECKER_ON |
---|
[5877cc3a] | 183 | #define CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
[ab97da95] | 184 | #else |
---|
[5877cc3a] | 185 | #define CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
[ab97da95] | 186 | #endif |
---|
| 187 | |
---|
[80f9d77] | 188 | /** |
---|
| 189 | * @brief Maximum Priority configuration |
---|
| 190 | * |
---|
| 191 | * This configures the maximum priority value that |
---|
| 192 | * a task may have. |
---|
| 193 | * |
---|
| 194 | * By reducing the number of priorities in a system, |
---|
| 195 | * the amount of RAM required by RTEMS can be significantly |
---|
| 196 | * reduced. RTEMS allocates a Chain_Control structure per |
---|
| 197 | * priority and this structure contains 3 pointers. So |
---|
| 198 | * the default is (256 * 12) = 3K on 32-bit architectures. |
---|
| 199 | * |
---|
| 200 | * This must be one less than a power of 2 between |
---|
| 201 | * 4 and 256. Valid values along with the application |
---|
| 202 | * priority levels and memory saved when pointers are |
---|
| 203 | * 32-bits in size are: |
---|
| 204 | * |
---|
| 205 | * + 3, 2 application priorities, 3024 bytes saved |
---|
| 206 | * + 7, 5 application priorities, 2976 bytes saved |
---|
| 207 | * + 15, 13 application priorities, 2880 bytes saved |
---|
| 208 | * + 31, 29 application priorities, 2688 bytes saved |
---|
| 209 | * + 63, 61 application priorities, 2304 bytes saved |
---|
| 210 | * + 127, 125 application priorities, 1536 bytes saved |
---|
| 211 | * + 255, 253 application priorities, 0 bytes saved |
---|
| 212 | * |
---|
| 213 | * It is specified in terms of Classic API |
---|
| 214 | * priority values. |
---|
| 215 | */ |
---|
| 216 | #ifndef CONFIGURE_MAXIMUM_PRIORITY |
---|
| 217 | #define CONFIGURE_MAXIMUM_PRIORITY 255 |
---|
| 218 | #endif |
---|
| 219 | |
---|
| 220 | /* |
---|
| 221 | * If you said the IDLE task was going to do application initialization |
---|
| 222 | * and didn't override the IDLE body, then something is amiss. |
---|
| 223 | */ |
---|
| 224 | #if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \ |
---|
| 225 | !defined(CONFIGURE_IDLE_TASK_BODY)) |
---|
[805cddc] | 226 | #error "CONFIGURE_ERROR: You did not override the IDLE task body." |
---|
[80f9d77] | 227 | #endif |
---|
| 228 | |
---|
[5877cc3a] | 229 | /** |
---|
| 230 | * @brief Idle task body configuration |
---|
[976162a6] | 231 | * |
---|
| 232 | * There is a default IDLE thread body provided by RTEMS which |
---|
| 233 | * has the possibility of being CPU specific. There may be a |
---|
| 234 | * BSP specific override of the RTEMS default body and in turn, |
---|
| 235 | * the application may override and provide its own. |
---|
| 236 | */ |
---|
| 237 | #ifndef CONFIGURE_IDLE_TASK_BODY |
---|
| 238 | #ifdef BSP_IDLE_TASK_BODY |
---|
| 239 | #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY |
---|
| 240 | #else |
---|
| 241 | #define CONFIGURE_IDLE_TASK_BODY NULL |
---|
| 242 | #endif |
---|
| 243 | #endif |
---|
| 244 | |
---|
[ecf0f4c] | 245 | /** |
---|
| 246 | * By default, use the minimum stack size requested by this port. |
---|
| 247 | */ |
---|
| 248 | #ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 249 | #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
| 250 | #endif |
---|
| 251 | |
---|
[5877cc3a] | 252 | /** |
---|
| 253 | * @brief Idle task stack size configuration |
---|
[976162a6] | 254 | * |
---|
| 255 | * By default, the IDLE task will have a stack of minimum size. |
---|
| 256 | * The BSP or application may override this value. |
---|
| 257 | */ |
---|
| 258 | #ifndef CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 259 | #ifdef BSP_IDLE_TASK_STACK_SIZE |
---|
| 260 | #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE |
---|
| 261 | #else |
---|
[ecf0f4c] | 262 | #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[976162a6] | 263 | #endif |
---|
| 264 | #endif |
---|
| 265 | |
---|
[5877cc3a] | 266 | /** |
---|
| 267 | * @brief Interrupt stack size configuration |
---|
[6aa25da] | 268 | * |
---|
| 269 | * By default, the interrupt stack will be of minimum size. |
---|
| 270 | * The BSP or application may override this value. |
---|
| 271 | */ |
---|
| 272 | #ifndef CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 273 | #ifdef BSP_INTERRUPT_STACK_SIZE |
---|
| 274 | #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE |
---|
| 275 | #else |
---|
[ecf0f4c] | 276 | #define CONFIGURE_INTERRUPT_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[6aa25da] | 277 | #endif |
---|
| 278 | #endif |
---|
| 279 | |
---|
[5877cc3a] | 280 | /** |
---|
| 281 | * This reserves memory for the interrupt stack if it is to be allocated |
---|
| 282 | * by RTEMS rather than the BSP. |
---|
| 283 | * |
---|
| 284 | * @todo Try to get to the point where all BSPs support allocating the |
---|
| 285 | * memory from the Workspace. |
---|
[6aa25da] | 286 | */ |
---|
| 287 | #if (CPU_ALLOCATE_INTERRUPT_STACK == 0) |
---|
[d875597c] | 288 | #define CONFIGURE_INTERRUPT_STACK_MEMORY 0 |
---|
| 289 | #else |
---|
| 290 | #define CONFIGURE_INTERRUPT_STACK_MEMORY CONFIGURE_INTERRUPT_STACK_SIZE |
---|
[6aa25da] | 291 | #endif |
---|
| 292 | |
---|
[5877cc3a] | 293 | /** |
---|
| 294 | * Configure the very much optional task stack allocator |
---|
[976162a6] | 295 | */ |
---|
| 296 | #ifndef CONFIGURE_TASK_STACK_ALLOCATOR |
---|
| 297 | #define CONFIGURE_TASK_STACK_ALLOCATOR NULL |
---|
| 298 | #endif |
---|
| 299 | |
---|
[5877cc3a] | 300 | /** |
---|
| 301 | * Configure the very much optional task stack deallocator |
---|
| 302 | */ |
---|
[976162a6] | 303 | #ifndef CONFIGURE_TASK_STACK_DEALLOCATOR |
---|
| 304 | #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL |
---|
| 305 | #endif |
---|
| 306 | |
---|
[5877cc3a] | 307 | /** |
---|
[976162a6] | 308 | * Should the RTEMS Workspace and C Program Heap be cleared automatically |
---|
| 309 | * at system start up? |
---|
| 310 | */ |
---|
| 311 | #ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 312 | #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 313 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \ |
---|
| 314 | BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 315 | #else |
---|
| 316 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE |
---|
| 317 | #endif |
---|
| 318 | #endif |
---|
| 319 | |
---|
[cfcc4e20] | 320 | /* |
---|
| 321 | * RTEMS Malloc configuration |
---|
| 322 | */ |
---|
| 323 | |
---|
| 324 | #include <rtems/malloc.h> |
---|
| 325 | |
---|
| 326 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 327 | /** |
---|
| 328 | * This configures the malloc family statistics to be available. |
---|
| 329 | * By default only function call counts are kept. |
---|
| 330 | */ |
---|
[cfcc4e20] | 331 | rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers = |
---|
| 332 | #ifndef CONFIGURE_MALLOC_STATISTICS |
---|
| 333 | NULL; |
---|
| 334 | #else |
---|
| 335 | &rtems_malloc_statistics_helpers_table; |
---|
| 336 | #endif |
---|
| 337 | #endif |
---|
| 338 | |
---|
| 339 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 340 | /** |
---|
| 341 | * This configures the sbrk() support for the malloc family. |
---|
| 342 | * By default it is assumed that the BSP provides all available |
---|
| 343 | * RAM to the malloc family implementation so sbrk()'ing to get |
---|
| 344 | * more memory would always fail anyway. |
---|
| 345 | */ |
---|
[cfcc4e20] | 346 | rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers = |
---|
| 347 | #ifndef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 348 | NULL; |
---|
| 349 | #else |
---|
| 350 | &rtems_malloc_sbrk_helpers_table; |
---|
| 351 | #endif |
---|
| 352 | #endif |
---|
| 353 | |
---|
[bfc54b0] | 354 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 355 | /** |
---|
| 356 | * This configures the malloc family plugin which dirties memory |
---|
| 357 | * allocated. This is helpful for finding unitialized data structure |
---|
| 358 | * problems. |
---|
| 359 | */ |
---|
[bfc54b0] | 360 | rtems_malloc_dirtier_t *rtems_malloc_dirty_helper = |
---|
| 361 | #if defined(CONFIGURE_MALLOC_DIRTY) |
---|
| 362 | rtems_malloc_dirty_memory; |
---|
| 363 | #else |
---|
| 364 | NULL; |
---|
| 365 | #endif |
---|
| 366 | #endif |
---|
| 367 | |
---|
[5877cc3a] | 368 | /** |
---|
| 369 | * This is a helper macro used in calculations in this file. It is used |
---|
| 370 | * to noted when an element is allocated from the RTEMS Workspace and adds |
---|
| 371 | * a factor to account for heap overhead plus an alignment factor that |
---|
| 372 | * may be applied. |
---|
| 373 | */ |
---|
| 374 | #define _Configure_From_workspace(_size) \ |
---|
| 375 | ((_size) + (2 * sizeof(uint32_t)) + CPU_ALIGNMENT) |
---|
| 376 | |
---|
| 377 | /** |
---|
| 378 | * This macro accounts for how memory for a set of configured objects is |
---|
| 379 | * allocated from the Executive Workspace. |
---|
| 380 | * |
---|
| 381 | * NOTE: It does NOT attempt to address the more complex case of unlimited |
---|
| 382 | * objects. |
---|
| 383 | */ |
---|
| 384 | #define _Configure_Object_RAM(_number, _size) \ |
---|
| 385 | ( _Configure_From_workspace((_number) * (_size)) + \ |
---|
| 386 | _Configure_From_workspace( \ |
---|
| 387 | (((_number) + 1) * sizeof(Objects_Control *)) + \ |
---|
| 388 | (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \ |
---|
| 389 | ) \ |
---|
| 390 | ) |
---|
| 391 | |
---|
[08bae5e6] | 392 | /* |
---|
| 393 | * Default User Initialization Task Table. This table guarantees that |
---|
| 394 | * one user initialization table is defined. |
---|
| 395 | */ |
---|
| 396 | |
---|
[be1c11ed] | 397 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 398 | |
---|
| 399 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 400 | |
---|
| 401 | /* |
---|
[8486081] | 402 | * The user is defining their own table information and setting the |
---|
[be1c11ed] | 403 | * appropriate variables. |
---|
| 404 | */ |
---|
| 405 | |
---|
| 406 | #else |
---|
[08bae5e6] | 407 | |
---|
| 408 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
[5877cc3a] | 409 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name('U', 'I', '1', ' ') |
---|
[08bae5e6] | 410 | #endif |
---|
| 411 | |
---|
| 412 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
[ecf0f4c] | 413 | #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[08bae5e6] | 414 | #endif |
---|
| 415 | |
---|
| 416 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
[5877cc3a] | 417 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
[08bae5e6] | 418 | #endif |
---|
| 419 | |
---|
| 420 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
[5877cc3a] | 421 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
[08bae5e6] | 422 | #endif |
---|
| 423 | |
---|
| 424 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
[5877cc3a] | 425 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
[08bae5e6] | 426 | #endif |
---|
| 427 | |
---|
| 428 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
[5877cc3a] | 429 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
[08bae5e6] | 430 | #endif |
---|
| 431 | |
---|
| 432 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
[5877cc3a] | 433 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
[08bae5e6] | 434 | #endif |
---|
| 435 | |
---|
| 436 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 437 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 438 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 439 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 440 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 441 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 442 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 443 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 444 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 445 | } |
---|
| 446 | }; |
---|
[08bae5e6] | 447 | #endif |
---|
| 448 | |
---|
[d9a0689e] | 449 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
| 450 | |
---|
| 451 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
| 452 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
| 453 | |
---|
[be1c11ed] | 454 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 455 | |
---|
| 456 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
| 457 | |
---|
| 458 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
| 459 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
[45c3da3] | 460 | #define CONFIGURE_INIT_TASK_STACK_SIZE 0 |
---|
[be1c11ed] | 461 | |
---|
[08bae5e6] | 462 | #endif |
---|
| 463 | |
---|
| 464 | /* |
---|
| 465 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
| 466 | * choosen by that test. There is always a null driver entry. |
---|
| 467 | */ |
---|
| 468 | |
---|
| 469 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 470 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 471 | |
---|
[df49c60] | 472 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
[5877cc3a] | 473 | #include <rtems/console.h> |
---|
[df49c60] | 474 | #endif |
---|
| 475 | |
---|
| 476 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[5877cc3a] | 477 | #include <rtems/clockdrv.h> |
---|
[df49c60] | 478 | #endif |
---|
| 479 | |
---|
| 480 | #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
[5877cc3a] | 481 | #include <rtems/timerdrv.h> |
---|
[08bae5e6] | 482 | #endif |
---|
| 483 | |
---|
[1d4bac9] | 484 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
[5877cc3a] | 485 | #include <rtems/rtc.h> |
---|
[1d4bac9] | 486 | #endif |
---|
| 487 | |
---|
[d2018f71] | 488 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
[5877cc3a] | 489 | #include <rtems/watchdogdrv.h> |
---|
[d2018f71] | 490 | #endif |
---|
| 491 | |
---|
[df49c60] | 492 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
[5877cc3a] | 493 | #include <rtems/devnull.h> |
---|
[08bae5e6] | 494 | #endif |
---|
| 495 | |
---|
[c9b005a9] | 496 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 497 | /* the ide driver needs the ATA driver */ |
---|
[5877cc3a] | 498 | #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 499 | #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 500 | #endif |
---|
| 501 | #include <libchip/ide_ctrl.h> |
---|
[c9b005a9] | 502 | #endif |
---|
| 503 | |
---|
| 504 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
[5877cc3a] | 505 | #include <libchip/ata.h> |
---|
[c9b005a9] | 506 | #endif |
---|
| 507 | |
---|
[08bae5e6] | 508 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 509 | |
---|
| 510 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 511 | rtems_driver_address_table Device_drivers[] = { |
---|
| 512 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
| 513 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 514 | #endif |
---|
| 515 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
| 516 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 517 | #endif |
---|
| 518 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
| 519 | RTC_DRIVER_TABLE_ENTRY, |
---|
| 520 | #endif |
---|
| 521 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
| 522 | WATCHDOG_DRIVER_TABLE_ENTRY, |
---|
| 523 | #endif |
---|
| 524 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
| 525 | DEVNULL_DRIVER_TABLE_ENTRY, |
---|
| 526 | #endif |
---|
| 527 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 528 | IDE_CONTROLLER_DRIVER_TABLE_ENTRY, |
---|
| 529 | #endif |
---|
| 530 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 531 | ATA_DRIVER_TABLE_ENTRY, |
---|
| 532 | #endif |
---|
| 533 | #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS |
---|
| 534 | CONFIGURE_APPLICATION_EXTRA_DRIVERS, |
---|
| 535 | #endif |
---|
| 536 | #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER |
---|
| 537 | NULL_DRIVER_TABLE_ENTRY |
---|
| 538 | #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
| 539 | !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 540 | !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ |
---|
| 541 | !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \ |
---|
| 542 | !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \ |
---|
| 543 | !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \ |
---|
| 544 | !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) |
---|
| 545 | NULL_DRIVER_TABLE_ENTRY |
---|
| 546 | #endif |
---|
| 547 | }; |
---|
[08bae5e6] | 548 | #endif |
---|
| 549 | |
---|
| 550 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
| 551 | |
---|
[059a3714] | 552 | /* |
---|
| 553 | * Default the number of drivers per node. This value may be |
---|
| 554 | * overridden by the user. |
---|
| 555 | */ |
---|
| 556 | |
---|
[96e6a86c] | 557 | #define CONFIGURE_NUMBER_OF_DRIVERS \ |
---|
| 558 | ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table))) |
---|
| 559 | |
---|
[5877cc3a] | 560 | /** |
---|
| 561 | * This specifies the maximum number of device drivers that |
---|
| 562 | * can be installed in the system at one time. It must account |
---|
| 563 | * for both the statically and dynamically installed drivers. |
---|
| 564 | */ |
---|
[059a3714] | 565 | #ifndef CONFIGURE_MAXIMUM_DRIVERS |
---|
[5877cc3a] | 566 | #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS |
---|
[059a3714] | 567 | #endif |
---|
| 568 | |
---|
[5877cc3a] | 569 | /** |
---|
[08bae5e6] | 570 | * Default the number of devices per device driver. This value may be |
---|
| 571 | * overridden by the user. |
---|
[ff3f8c85] | 572 | * |
---|
[5877cc3a] | 573 | * @note This configuration parameter is obsolete. Thus we will warn the |
---|
[ff3f8c85] | 574 | * user that it is obsolete. |
---|
[08bae5e6] | 575 | */ |
---|
[ff3f8c85] | 576 | #ifdef CONFIGURE_MAXIMUM_DEVICES |
---|
[5877cc3a] | 577 | #warning "CONFIGURE_MAXIMUM_DEVICES is obsolete. Do not use any longer." |
---|
[08bae5e6] | 578 | #endif |
---|
| 579 | |
---|
[c9b005a9] | 580 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 581 | /* |
---|
| 582 | * configure the priority of the ATA driver task |
---|
| 583 | */ |
---|
[5877cc3a] | 584 | #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY |
---|
| 585 | #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY |
---|
| 586 | #endif |
---|
| 587 | #ifdef CONFIGURE_INIT |
---|
| 588 | rtems_task_priority ata_driver_task_priority |
---|
| 589 | = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; |
---|
| 590 | #endif /* CONFIGURE_INIT */ |
---|
[c9b005a9] | 591 | #endif |
---|
| 592 | |
---|
| 593 | /* |
---|
| 594 | * add bdbuf configuration and values for swapout task priority |
---|
| 595 | */ |
---|
| 596 | #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
[5877cc3a] | 597 | #include <rtems/bdbuf.h> |
---|
| 598 | /* |
---|
| 599 | * configure the priority of the bdbuf swapout task |
---|
| 600 | */ |
---|
| 601 | #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY |
---|
| 602 | #define CONFIGURE_SWAPOUT_TASK_PRIORITY SWAPOUT_TASK_DEFAULT_PRIORITY |
---|
| 603 | #endif |
---|
| 604 | #ifdef CONFIGURE_INIT |
---|
| 605 | rtems_task_priority swapout_task_priority = CONFIGURE_SWAPOUT_TASK_PRIORITY; |
---|
| 606 | #endif |
---|
| 607 | #ifndef CONFIGURE_HAS_OWN_BDBUF_TABLE |
---|
| 608 | #ifndef CONFIGURE_BDBUF_BUFFER_COUNT |
---|
| 609 | #define CONFIGURE_BDBUF_BUFFER_COUNT 64 |
---|
| 610 | #endif |
---|
| 611 | |
---|
| 612 | #ifndef CONFIGURE_BDBUF_BUFFER_SIZE |
---|
| 613 | #define CONFIGURE_BDBUF_BUFFER_SIZE 512 |
---|
| 614 | #endif |
---|
| 615 | #ifdef CONFIGURE_INIT |
---|
| 616 | rtems_bdbuf_config rtems_bdbuf_configuration[] = { |
---|
| 617 | {CONFIGURE_BDBUF_BUFFER_SIZE, CONFIGURE_BDBUF_BUFFER_COUNT, NULL} |
---|
| 618 | }; |
---|
| 619 | int rtems_bdbuf_configuration_size =( sizeof(rtems_bdbuf_configuration) |
---|
| 620 | /sizeof(rtems_bdbuf_configuration[0])); |
---|
| 621 | #endif /* CONFIGURE_INIT */ |
---|
| 622 | #endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE */ |
---|
[c9b005a9] | 623 | #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */ |
---|
[976162a6] | 624 | |
---|
| 625 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[5877cc3a] | 626 | /* |
---|
| 627 | * Default Multiprocessing Configuration Table. The defaults are |
---|
| 628 | * appropriate for most of the RTEMS Multiprocessor Test Suite. Each |
---|
| 629 | * value may be overridden within each test to customize the environment. |
---|
| 630 | */ |
---|
[08bae5e6] | 631 | |
---|
[5877cc3a] | 632 | #ifdef CONFIGURE_MP_APPLICATION |
---|
| 633 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
[08bae5e6] | 634 | |
---|
[5877cc3a] | 635 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 636 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 637 | #endif |
---|
[08bae5e6] | 638 | |
---|
[5877cc3a] | 639 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
| 640 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
| 641 | #endif |
---|
[08bae5e6] | 642 | |
---|
[5877cc3a] | 643 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
| 644 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
| 645 | #endif |
---|
[08bae5e6] | 646 | |
---|
[5877cc3a] | 647 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
| 648 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
| 649 | #endif |
---|
[08bae5e6] | 650 | |
---|
[5877cc3a] | 651 | #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK |
---|
| 652 | #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0 |
---|
| 653 | #endif |
---|
[def9eef] | 654 | |
---|
[5877cc3a] | 655 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
| 656 | #include <mpci.h> |
---|
| 657 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
| 658 | #endif |
---|
[08bae5e6] | 659 | |
---|
[5877cc3a] | 660 | #ifdef CONFIGURE_INIT |
---|
| 661 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
| 662 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 663 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */ |
---|
| 664 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 665 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 666 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */ |
---|
| 667 | CONFIGURE_MP_MPCI_TABLE_POINTER /* ptr to MPCI config table */ |
---|
| 668 | }; |
---|
| 669 | #endif |
---|
[08bae5e6] | 670 | |
---|
[5877cc3a] | 671 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
[08bae5e6] | 672 | |
---|
[5877cc3a] | 673 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */ |
---|
[08bae5e6] | 674 | |
---|
[5877cc3a] | 675 | #else |
---|
[08bae5e6] | 676 | |
---|
[5877cc3a] | 677 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
[08bae5e6] | 678 | |
---|
[5877cc3a] | 679 | #endif /* CONFIGURE_MP_APPLICATION */ |
---|
[976162a6] | 680 | #endif /* RTEMS_MULTIPROCESSING */ |
---|
[8486081] | 681 | |
---|
[08bae5e6] | 682 | /* |
---|
[8486081] | 683 | * Default Configuration Table. |
---|
[08bae5e6] | 684 | */ |
---|
| 685 | |
---|
| 686 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
[8486081] | 687 | |
---|
[5877cc3a] | 688 | #ifndef CONFIGURE_EXECUTIVE_RAM_WORK_AREA |
---|
| 689 | #define CONFIGURE_EXECUTIVE_RAM_WORK_AREA NULL |
---|
| 690 | #endif |
---|
[08bae5e6] | 691 | |
---|
[5877cc3a] | 692 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 693 | #define CONFIGURE_MAXIMUM_TASKS 0 |
---|
| 694 | #endif |
---|
[08bae5e6] | 695 | |
---|
[4cb19041] | 696 | #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS |
---|
| 697 | #define CONFIGURE_NOTEPADS_ENABLED FALSE |
---|
| 698 | #else |
---|
| 699 | #define CONFIGURE_NOTEPADS_ENABLED TRUE |
---|
| 700 | #endif |
---|
| 701 | |
---|
[5877cc3a] | 702 | #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES |
---|
| 703 | #define CONFIGURE_MAXIMUM_TASK_VARIABLES 0 |
---|
| 704 | #endif |
---|
[08bae5e6] | 705 | |
---|
[5877cc3a] | 706 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
| 707 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
| 708 | #endif |
---|
[08bae5e6] | 709 | |
---|
[5877cc3a] | 710 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
| 711 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 712 | #endif |
---|
[08bae5e6] | 713 | |
---|
[5877cc3a] | 714 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
| 715 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 716 | #endif |
---|
[08bae5e6] | 717 | |
---|
[5877cc3a] | 718 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
| 719 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
| 720 | #endif |
---|
[08bae5e6] | 721 | |
---|
[5877cc3a] | 722 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
| 723 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
| 724 | #endif |
---|
[08bae5e6] | 725 | |
---|
[5877cc3a] | 726 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
| 727 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 728 | #endif |
---|
[08bae5e6] | 729 | |
---|
[5877cc3a] | 730 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
| 731 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 732 | #endif |
---|
[7fa1ce86] | 733 | |
---|
[5877cc3a] | 734 | #ifndef CONFIGURE_MAXIMUM_BARRIERS |
---|
| 735 | #define CONFIGURE_MAXIMUM_BARRIERS 0 |
---|
| 736 | #endif |
---|
[08bae5e6] | 737 | |
---|
[5877cc3a] | 738 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
| 739 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
| 740 | #endif |
---|
[08bae5e6] | 741 | |
---|
[5877cc3a] | 742 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 743 | #define CONFIGURE_MICROSECONDS_PER_TICK \ |
---|
| 744 | RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 745 | #endif |
---|
| 746 | |
---|
| 747 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 748 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 749 | #endif |
---|
[08bae5e6] | 750 | |
---|
[4cb19041] | 751 | #ifndef CONFIGURE_DISABLE_CLASSIC_NOTEPADS |
---|
| 752 | #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \ |
---|
| 753 | sizeof(RTEMS_API_Control) |
---|
| 754 | #else |
---|
| 755 | #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \ |
---|
| 756 | (sizeof(RTEMS_API_Control) - (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t))) |
---|
| 757 | #endif |
---|
| 758 | |
---|
[0451b44] | 759 | /* |
---|
| 760 | * Initial Extension Set |
---|
| 761 | */ |
---|
| 762 | |
---|
| 763 | #ifdef CONFIGURE_INIT |
---|
| 764 | #ifdef STACK_CHECKER_ON |
---|
[31bce9b] | 765 | #include <rtems/stackchk.h> |
---|
[0451b44] | 766 | #endif |
---|
[c3db01d0] | 767 | #include <rtems/libcsupport.h> |
---|
[0451b44] | 768 | |
---|
[96e6a86c] | 769 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) || \ |
---|
[c3db01d0] | 770 | defined(STACK_CHECKER_ON) || \ |
---|
| 771 | (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
| 772 | rtems_extensions_table Configuration_Initial_Extensions[] = { |
---|
| 773 | #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 774 | RTEMS_NEWLIB_EXTENSION, |
---|
| 775 | #endif |
---|
| 776 | #if defined(STACK_CHECKER_ON) |
---|
| 777 | RTEMS_STACK_CHECKER_EXTENSION, |
---|
| 778 | #endif |
---|
| 779 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) |
---|
| 780 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
| 781 | #endif |
---|
| 782 | }; |
---|
| 783 | |
---|
| 784 | #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions |
---|
| 785 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
| 786 | ((sizeof(Configuration_Initial_Extensions) / \ |
---|
| 787 | sizeof(rtems_extensions_table))) |
---|
[96e6a86c] | 788 | #else |
---|
[c3db01d0] | 789 | #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL |
---|
| 790 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0 |
---|
[96e6a86c] | 791 | #endif |
---|
| 792 | |
---|
[0451b44] | 793 | |
---|
[08bae5e6] | 794 | #endif |
---|
| 795 | |
---|
[2eba45d] | 796 | /* |
---|
| 797 | * POSIX API Configuration Parameters |
---|
| 798 | */ |
---|
| 799 | |
---|
| 800 | #ifdef RTEMS_POSIX_API |
---|
| 801 | |
---|
[5877cc3a] | 802 | #include <sys/types.h> |
---|
| 803 | #include <signal.h> |
---|
| 804 | #include <limits.h> |
---|
| 805 | #include <mqueue.h> |
---|
| 806 | #include <rtems/posix/barrier.h> |
---|
| 807 | #include <rtems/posix/cond.h> |
---|
| 808 | #include <rtems/posix/mqueue.h> |
---|
| 809 | #include <rtems/posix/mutex.h> |
---|
| 810 | #include <rtems/posix/key.h> |
---|
| 811 | #include <rtems/posix/psignal.h> |
---|
| 812 | #include <rtems/posix/rwlock.h> |
---|
| 813 | #include <rtems/posix/semaphore.h> |
---|
| 814 | #include <rtems/posix/spinlock.h> |
---|
| 815 | #include <rtems/posix/threadsup.h> |
---|
| 816 | #include <rtems/posix/timer.h> |
---|
| 817 | |
---|
| 818 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 819 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 820 | #endif |
---|
[2eba45d] | 821 | |
---|
[5877cc3a] | 822 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
| 823 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
| 824 | #endif |
---|
[2eba45d] | 825 | |
---|
[5877cc3a] | 826 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
| 827 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
| 828 | #endif |
---|
[2eba45d] | 829 | |
---|
[5877cc3a] | 830 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
| 831 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
| 832 | #endif |
---|
[da33d26] | 833 | |
---|
[5877cc3a] | 834 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
| 835 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
| 836 | #endif |
---|
[0747e2d] | 837 | |
---|
[5877cc3a] | 838 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
| 839 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
| 840 | #endif |
---|
[eb0551f] | 841 | |
---|
[5877cc3a] | 842 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
| 843 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
| 844 | #endif |
---|
[be0fc099] | 845 | |
---|
[5877cc3a] | 846 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
| 847 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
| 848 | #endif |
---|
[be0fc099] | 849 | |
---|
[5877cc3a] | 850 | #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS |
---|
| 851 | #define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0 |
---|
| 852 | #endif |
---|
[7fa1ce86] | 853 | |
---|
[5877cc3a] | 854 | #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS |
---|
| 855 | #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0 |
---|
| 856 | #endif |
---|
[7fa1ce86] | 857 | |
---|
[5877cc3a] | 858 | #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS |
---|
| 859 | #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0 |
---|
| 860 | #endif |
---|
[7fa1ce86] | 861 | |
---|
[5877cc3a] | 862 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
[be1c11ed] | 863 | |
---|
[5877cc3a] | 864 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
[5240c71c] | 865 | |
---|
[5877cc3a] | 866 | /* |
---|
| 867 | * The user is defining their own table information and setting the |
---|
| 868 | * appropriate variables for the POSIX Initialization Thread Table. |
---|
| 869 | */ |
---|
[8486081] | 870 | |
---|
[5877cc3a] | 871 | #else |
---|
[be1c11ed] | 872 | |
---|
[5877cc3a] | 873 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
| 874 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
| 875 | #endif |
---|
[5240c71c] | 876 | |
---|
[5877cc3a] | 877 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 878 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ |
---|
[ecf0f4c] | 879 | (CONFIGURE_MINIMUM_TASK_STACK_SIZE * 2) |
---|
[5877cc3a] | 880 | #endif |
---|
[adbb578] | 881 | |
---|
[5877cc3a] | 882 | #ifdef CONFIGURE_INIT |
---|
| 883 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
| 884 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ |
---|
| 885 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
| 886 | }; |
---|
| 887 | #endif |
---|
[2eba45d] | 888 | |
---|
[5877cc3a] | 889 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \ |
---|
| 890 | POSIX_Initialization_threads |
---|
[8486081] | 891 | |
---|
[5877cc3a] | 892 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
| 893 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
| 894 | sizeof(posix_initialization_threads_table) |
---|
[5240c71c] | 895 | |
---|
[5877cc3a] | 896 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
[5240c71c] | 897 | |
---|
[5877cc3a] | 898 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
[be1c11ed] | 899 | |
---|
[5877cc3a] | 900 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
| 901 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
[be1c11ed] | 902 | |
---|
[5877cc3a] | 903 | #endif |
---|
[be1c11ed] | 904 | |
---|
[5877cc3a] | 905 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ |
---|
| 906 | ( \ |
---|
| 907 | sizeof (POSIX_API_Control) + \ |
---|
| 908 | (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \ |
---|
| 909 | ) |
---|
[308aed9b] | 910 | |
---|
[5877cc3a] | 911 | #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \ |
---|
| 912 | _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) ) |
---|
[308aed9b] | 913 | |
---|
[5877cc3a] | 914 | #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condition_variables) \ |
---|
| 915 | _Configure_Object_RAM(_condition_variables, \ |
---|
| 916 | sizeof(POSIX_Condition_variables_Control) ) |
---|
[308aed9b] | 917 | |
---|
[5877cc3a] | 918 | #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \ |
---|
| 919 | _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) |
---|
[cc17eba] | 920 | |
---|
[5877cc3a] | 921 | #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \ |
---|
| 922 | _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) ) |
---|
[5240c71c] | 923 | |
---|
[5877cc3a] | 924 | #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \ |
---|
| 925 | _Configure_From_workspace( \ |
---|
| 926 | (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) ) |
---|
[cc17eba] | 927 | |
---|
[5877cc3a] | 928 | /** |
---|
| 929 | * Account for the object control structures plus the name |
---|
| 930 | * of the object to be duplicated. |
---|
| 931 | */ |
---|
| 932 | #define _Configure_POSIX_Named_Object_RAM(_number, _size) \ |
---|
| 933 | _Configure_Object_RAM( (_number), _size ) + \ |
---|
| 934 | ((_number) + _Configure_From_workspace(NAME_MAX) ) |
---|
| 935 | |
---|
| 936 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
| 937 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 938 | _message_queues, sizeof(POSIX_Message_queue_Control) ) |
---|
| 939 | |
---|
| 940 | #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
| 941 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 942 | _semaphores, sizeof(POSIX_Semaphore_Control) ) |
---|
| 943 | |
---|
| 944 | #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \ |
---|
| 945 | _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) ) |
---|
| 946 | |
---|
| 947 | #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \ |
---|
| 948 | _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) ) |
---|
| 949 | |
---|
| 950 | #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \ |
---|
| 951 | _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) ) |
---|
| 952 | |
---|
| 953 | #define CONFIGURE_MEMORY_FOR_POSIX \ |
---|
| 954 | ( \ |
---|
| 955 | CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \ |
---|
| 956 | CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \ |
---|
| 957 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ |
---|
| 958 | CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ |
---|
| 959 | CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ |
---|
| 960 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ |
---|
| 961 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
| 962 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \ |
---|
| 963 | CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
| 964 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \ |
---|
| 965 | CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \ |
---|
| 966 | CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \ |
---|
| 967 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \ |
---|
| 968 | CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \ |
---|
| 969 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \ |
---|
| 970 | CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \ |
---|
| 971 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \ |
---|
| 972 | ) |
---|
| 973 | #else |
---|
[352c9b2] | 974 | |
---|
[5877cc3a] | 975 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 976 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0 |
---|
| 977 | #define CONFIGURE_MEMORY_FOR_POSIX 0 |
---|
[352c9b2] | 978 | |
---|
[5877cc3a] | 979 | #endif /* RTEMS_POSIX_API */ |
---|
[352c9b2] | 980 | |
---|
[5877cc3a] | 981 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 982 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
[352c9b2] | 983 | #endif |
---|
| 984 | |
---|
[5877cc3a] | 985 | /* |
---|
| 986 | * This block of defines are for applications which use GNAT/RTEMS. |
---|
| 987 | * GNAT implements each Ada task as a POSIX thread. |
---|
| 988 | */ |
---|
| 989 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
[352c9b2] | 990 | |
---|
[5877cc3a] | 991 | /** |
---|
| 992 | * The GNAT run-time needs something less than (10) POSIX mutexes. |
---|
| 993 | * We may be able to get by with less but why bother. |
---|
| 994 | */ |
---|
| 995 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
[352c9b2] | 996 | |
---|
[5877cc3a] | 997 | /** |
---|
| 998 | * This is the maximum number of Ada tasks which can be concurrently |
---|
| 999 | * in existence. Twenty (20) are required to run all tests in the |
---|
| 1000 | * ACATS (formerly ACVC). |
---|
| 1001 | */ |
---|
| 1002 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
| 1003 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
| 1004 | #endif |
---|
[352c9b2] | 1005 | |
---|
[5877cc3a] | 1006 | /** |
---|
| 1007 | * This is the number of non-Ada tasks which invoked Ada code. |
---|
| 1008 | */ |
---|
| 1009 | #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
| 1010 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
| 1011 | #endif |
---|
[352c9b2] | 1012 | |
---|
[5877cc3a] | 1013 | /** |
---|
| 1014 | * Ada tasks are allocated twice the minimum stack space. |
---|
| 1015 | */ |
---|
| 1016 | #define CONFIGURE_ADA_TASKS_STACK \ |
---|
[ecf0f4c] | 1017 | (CONFIGURE_MAXIMUM_ADA_TASKS * \ |
---|
| 1018 | (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (6 * 1024))) |
---|
[352c9b2] | 1019 | |
---|
[5877cc3a] | 1020 | #else |
---|
| 1021 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
| 1022 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
| 1023 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
| 1024 | #define CONFIGURE_ADA_TASKS_STACK 0 |
---|
[352c9b2] | 1025 | #endif |
---|
| 1026 | |
---|
| 1027 | /* |
---|
[5877cc3a] | 1028 | * ITRON API Configuration Parameters |
---|
[352c9b2] | 1029 | */ |
---|
| 1030 | |
---|
[5877cc3a] | 1031 | #ifdef RTEMS_ITRON_API |
---|
[352c9b2] | 1032 | |
---|
[5877cc3a] | 1033 | #include <rtems/itron.h> |
---|
| 1034 | #include <rtems/itron/config.h> |
---|
| 1035 | #include <rtems/itron/eventflags.h> |
---|
| 1036 | #include <rtems/itron/fmempool.h> |
---|
| 1037 | #include <rtems/itron/mbox.h> |
---|
| 1038 | #include <rtems/itron/msgbuffer.h> |
---|
| 1039 | #include <rtems/itron/port.h> |
---|
| 1040 | #include <rtems/itron/semaphore.h> |
---|
| 1041 | #include <rtems/itron/task.h> |
---|
| 1042 | #include <rtems/itron/vmempool.h> |
---|
| 1043 | |
---|
| 1044 | #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS |
---|
| 1045 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
| 1046 | #endif |
---|
[352c9b2] | 1047 | |
---|
[5877cc3a] | 1048 | #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES |
---|
| 1049 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
| 1050 | #endif |
---|
[352c9b2] | 1051 | |
---|
[5877cc3a] | 1052 | #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS |
---|
| 1053 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
| 1054 | #endif |
---|
[352c9b2] | 1055 | |
---|
[5877cc3a] | 1056 | #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES |
---|
| 1057 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
| 1058 | #endif |
---|
[352c9b2] | 1059 | |
---|
[5877cc3a] | 1060 | #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS |
---|
| 1061 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
| 1062 | #endif |
---|
[352c9b2] | 1063 | |
---|
[5877cc3a] | 1064 | #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS |
---|
| 1065 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
| 1066 | #endif |
---|
| 1067 | |
---|
| 1068 | #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS |
---|
| 1069 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
| 1070 | #endif |
---|
[352c9b2] | 1071 | |
---|
[5877cc3a] | 1072 | #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS |
---|
| 1073 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
| 1074 | #endif |
---|
[352c9b2] | 1075 | |
---|
[5877cc3a] | 1076 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
[352c9b2] | 1077 | |
---|
[5877cc3a] | 1078 | #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE |
---|
[352c9b2] | 1079 | |
---|
[5877cc3a] | 1080 | /* |
---|
| 1081 | * The user is defining their own table information and setting the |
---|
| 1082 | * appropriate variables for the ITRON Initialization Task Table. |
---|
| 1083 | */ |
---|
[352c9b2] | 1084 | |
---|
[5877cc3a] | 1085 | #else |
---|
[352c9b2] | 1086 | |
---|
[5877cc3a] | 1087 | #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT |
---|
| 1088 | #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT ITRON_Init |
---|
| 1089 | #endif |
---|
[352c9b2] | 1090 | |
---|
[5877cc3a] | 1091 | #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES |
---|
| 1092 | #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES TA_HLNG |
---|
| 1093 | #endif |
---|
[352c9b2] | 1094 | |
---|
[5877cc3a] | 1095 | #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY |
---|
| 1096 | #define CONFIGURE_ITRON_INIT_TASK_PRIORITY 1 |
---|
| 1097 | #endif |
---|
[352c9b2] | 1098 | |
---|
[5877cc3a] | 1099 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
[ecf0f4c] | 1100 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \ |
---|
| 1101 | CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[5877cc3a] | 1102 | #endif |
---|
[352c9b2] | 1103 | |
---|
[5877cc3a] | 1104 | #ifdef CONFIGURE_INIT |
---|
| 1105 | itron_initialization_tasks_table ITRON_Initialization_tasks[] = { |
---|
| 1106 | { 1, /* ID */ |
---|
| 1107 | { (VP) 0, /* exinfo */ |
---|
| 1108 | CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES, /* task attributes */ |
---|
| 1109 | CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */ |
---|
| 1110 | CONFIGURE_ITRON_INIT_TASK_PRIORITY, /* initial task priority */ |
---|
| 1111 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE /* stack size */ |
---|
| 1112 | } |
---|
| 1113 | } |
---|
| 1114 | }; |
---|
| 1115 | #endif |
---|
[352c9b2] | 1116 | |
---|
[5877cc3a] | 1117 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks |
---|
[352c9b2] | 1118 | |
---|
[5877cc3a] | 1119 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \ |
---|
| 1120 | sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \ |
---|
| 1121 | sizeof(itron_initialization_tasks_table) |
---|
[352c9b2] | 1122 | |
---|
[5877cc3a] | 1123 | #endif /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */ |
---|
[352c9b2] | 1124 | |
---|
[5877cc3a] | 1125 | #else /* CONFIGURE_ITRON_INIT_TASK_TABLE */ |
---|
[352c9b2] | 1126 | |
---|
[5877cc3a] | 1127 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL |
---|
| 1128 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0 |
---|
| 1129 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE 0 |
---|
[352c9b2] | 1130 | |
---|
[5877cc3a] | 1131 | #endif |
---|
| 1132 | |
---|
| 1133 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
| 1134 | |
---|
| 1135 | #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \ |
---|
| 1136 | _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control)) |
---|
| 1137 | |
---|
| 1138 | #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \ |
---|
| 1139 | _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control)) |
---|
| 1140 | |
---|
| 1141 | #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \ |
---|
| 1142 | _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control)) |
---|
| 1143 | |
---|
| 1144 | #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \ |
---|
| 1145 | _Configure_Object_RAM(_message_buffers, \ |
---|
| 1146 | sizeof(ITRON_Message_buffer_Control)) |
---|
| 1147 | |
---|
| 1148 | #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \ |
---|
| 1149 | _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control)) |
---|
| 1150 | |
---|
| 1151 | #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_memory_pools) \ |
---|
| 1152 | _Configure_Object_RAM( \ |
---|
| 1153 | _memory_pools, sizeof(ITRON_Variable_memory_pool_Control)) |
---|
| 1154 | |
---|
| 1155 | #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_fixed_memory_pools) \ |
---|
| 1156 | _Configure_Object_RAM( \ |
---|
| 1157 | _fixed_memory_pools, sizeof(ITRON_Fixed_memory_pool_Control)) |
---|
| 1158 | |
---|
| 1159 | #define CONFIGURE_MEMORY_FOR_ITRON \ |
---|
| 1160 | ( \ |
---|
| 1161 | CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \ |
---|
| 1162 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \ |
---|
| 1163 | CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \ |
---|
| 1164 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \ |
---|
| 1165 | CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \ |
---|
| 1166 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \ |
---|
| 1167 | CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \ |
---|
| 1168 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \ |
---|
| 1169 | CONFIGURE_MEMORY_FOR_ITRON_PORTS( \ |
---|
| 1170 | CONFIGURE_MAXIMUM_ITRON_PORTS ) + \ |
---|
| 1171 | CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \ |
---|
| 1172 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \ |
---|
| 1173 | CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \ |
---|
| 1174 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \ |
---|
| 1175 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \ |
---|
| 1176 | ) |
---|
[352c9b2] | 1177 | |
---|
| 1178 | #else |
---|
| 1179 | |
---|
[5877cc3a] | 1180 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
| 1181 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
| 1182 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
| 1183 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
| 1184 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
| 1185 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
| 1186 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
| 1187 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
| 1188 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
| 1189 | #define CONFIGURE_MEMORY_FOR_ITRON 0 |
---|
[352c9b2] | 1190 | |
---|
| 1191 | #endif /* RTEMS_ITRON_API */ |
---|
| 1192 | |
---|
[5877cc3a] | 1193 | #if defined(RTEMS_NEWLIB) |
---|
| 1194 | #include <reent.h> |
---|
| 1195 | |
---|
| 1196 | #define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY sizeof(struct _reent) |
---|
| 1197 | #else |
---|
| 1198 | #define CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY 0 |
---|
| 1199 | #endif |
---|
[352c9b2] | 1200 | |
---|
[8486081] | 1201 | /* |
---|
[3652ad35] | 1202 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
| 1203 | */ |
---|
[08bae5e6] | 1204 | |
---|
| 1205 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
[3652ad35] | 1206 | |
---|
[5877cc3a] | 1207 | /** |
---|
| 1208 | * Account for allocating the following per object |
---|
| 1209 | * + array of object control structures |
---|
| 1210 | * + local pointer table -- pointer per object plus a zero'th |
---|
| 1211 | * entry in the local pointer table. |
---|
| 1212 | */ |
---|
[b2b143f4] | 1213 | |
---|
[5877cc3a] | 1214 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \ |
---|
| 1215 | ( \ |
---|
| 1216 | _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \ |
---|
| 1217 | ((_tasks) * \ |
---|
[ecf0f4c] | 1218 | (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \ |
---|
[4cb19041] | 1219 | _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API) + \ |
---|
[5877cc3a] | 1220 | _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_LIBC_REENTRANCY) + \ |
---|
| 1221 | _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API) + \ |
---|
| 1222 | _Configure_From_workspace(CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API))) + \ |
---|
| 1223 | _Configure_From_workspace((_number_FP_tasks) * CONTEXT_FP_SIZE) \ |
---|
| 1224 | ) |
---|
[b2b143f4] | 1225 | |
---|
[5877cc3a] | 1226 | /** |
---|
| 1227 | * This macro calculates the memory required for task variables. |
---|
| 1228 | * |
---|
| 1229 | * @note Each task variable is individually allocated from the Workspace. |
---|
| 1230 | * Hence, we do the multiplication on the configured size. |
---|
| 1231 | */ |
---|
| 1232 | #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \ |
---|
| 1233 | (_task_variables) * _Configure_From_workspace(sizeof(rtems_task_variable_t)) |
---|
[3652ad35] | 1234 | |
---|
| 1235 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
[5877cc3a] | 1236 | _Configure_Object_RAM(_timers, sizeof(Timer_Control) ) |
---|
[3652ad35] | 1237 | |
---|
| 1238 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
[4cb19041] | 1239 | _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) ) |
---|
[3652ad35] | 1240 | |
---|
| 1241 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
[4cb19041] | 1242 | _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) ) |
---|
[3652ad35] | 1243 | |
---|
| 1244 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
[4cb19041] | 1245 | _Configure_Object_RAM(_partitions, sizeof(Partition_Control) ) |
---|
[3652ad35] | 1246 | |
---|
| 1247 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
[4cb19041] | 1248 | _Configure_Object_RAM(_regions, sizeof(Region_Control) ) |
---|
[3652ad35] | 1249 | |
---|
| 1250 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
[4cb19041] | 1251 | _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) ) |
---|
[3652ad35] | 1252 | |
---|
| 1253 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
[4cb19041] | 1254 | _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) ) |
---|
[3652ad35] | 1255 | |
---|
[7fa1ce86] | 1256 | #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \ |
---|
[4cb19041] | 1257 | _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) ) |
---|
[7fa1ce86] | 1258 | |
---|
[3652ad35] | 1259 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
[4cb19041] | 1260 | _Configure_Object_RAM(_extensions, sizeof(Extension_Control) ) |
---|
[3652ad35] | 1261 | |
---|
[df49c60] | 1262 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[3652ad35] | 1263 | |
---|
| 1264 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE |
---|
| 1265 | |
---|
| 1266 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
[5877cc3a] | 1267 | _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) ) |
---|
[3652ad35] | 1268 | |
---|
| 1269 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
[5877cc3a] | 1270 | _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control)) |
---|
[3652ad35] | 1271 | |
---|
| 1272 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
| 1273 | ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
[b3dcd9a2] | 1274 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \ |
---|
[5877cc3a] | 1275 | CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \ |
---|
[def9eef] | 1276 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \ |
---|
[3652ad35] | 1277 | ) |
---|
| 1278 | |
---|
| 1279 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */ |
---|
| 1280 | |
---|
| 1281 | #else |
---|
| 1282 | |
---|
| 1283 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
| 1284 | |
---|
| 1285 | #endif |
---|
[3b89891] | 1286 | |
---|
[5877cc3a] | 1287 | /** |
---|
[7042065] | 1288 | * This is so we can account for tasks with stacks greater than minimum |
---|
| 1289 | * size. This is in bytes. |
---|
| 1290 | */ |
---|
[308aed9b] | 1291 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
[5877cc3a] | 1292 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
[308aed9b] | 1293 | #endif |
---|
| 1294 | |
---|
[5877cc3a] | 1295 | /** |
---|
| 1296 | * The following macro is used to calculate the memory allocated by RTEMS |
---|
| 1297 | * for the message buffers associated with a particular message queue. |
---|
| 1298 | * There is a fixed amount of overhead per message. |
---|
| 1299 | */ |
---|
| 1300 | #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \ |
---|
| 1301 | _Configure_From_workspace( \ |
---|
| 1302 | (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control))) |
---|
| 1303 | |
---|
| 1304 | /** |
---|
| 1305 | * This macros is set to the amount of memory required for pending message |
---|
| 1306 | * buffers in bytes. It should be constructed by adding together a |
---|
| 1307 | * set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE. |
---|
[7042065] | 1308 | */ |
---|
| 1309 | #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
[5877cc3a] | 1310 | #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 |
---|
[7042065] | 1311 | #endif |
---|
| 1312 | |
---|
[5877cc3a] | 1313 | /** |
---|
| 1314 | * This macro is available just in case the confdefs.h file underallocates |
---|
| 1315 | * memory for a particular application. This lets the user add some extra |
---|
| 1316 | * memory in case something broken and underestimates. |
---|
| 1317 | * |
---|
| 1318 | * It is also possible for cases where confdefs.h overallocates memory, |
---|
| 1319 | * you could substract memory from the allocated. The estimate is just |
---|
| 1320 | * that, an estimate, and assumes worst case alignment and padding on |
---|
| 1321 | * each allocated element. So in some cases it could be too conservative. |
---|
| 1322 | * |
---|
| 1323 | * @note Historically this was used for message buffers. |
---|
[7042065] | 1324 | */ |
---|
| 1325 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
[5877cc3a] | 1326 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
| 1327 | #endif |
---|
| 1328 | |
---|
| 1329 | /** |
---|
| 1330 | * On architectures that use Simple Vectored Interrupts, it is RTEMS |
---|
| 1331 | * responsibility to allocate the vector table. This avoids reserving |
---|
| 1332 | * the memory on architectures that use the Programmable Interrupt |
---|
| 1333 | * Controller Vectored Interrupts. |
---|
| 1334 | */ |
---|
| 1335 | #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) |
---|
| 1336 | /* |
---|
| 1337 | * This is a (hopefully) temporary hack. On the mips, the number of |
---|
| 1338 | * vectors is NOT statically defined. But it has to be statically |
---|
| 1339 | * defined for this to work. This is an issue looking for a nice |
---|
| 1340 | * solution. |
---|
| 1341 | */ |
---|
| 1342 | #if defined(__mips__) |
---|
| 1343 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE (sizeof(ISR_Handler_entry) * 256) |
---|
| 1344 | #else |
---|
| 1345 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE \ |
---|
| 1346 | (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS) |
---|
| 1347 | #endif |
---|
| 1348 | #else |
---|
| 1349 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE 0 |
---|
[7042065] | 1350 | #endif |
---|
| 1351 | |
---|
[5877cc3a] | 1352 | /** |
---|
| 1353 | * RTEMS uses one instance of an internal mutex class. This accounts |
---|
| 1354 | * for that mutex |
---|
| 1355 | */ |
---|
[b2b143f4] | 1356 | #define CONFIGURE_API_MUTEX_MEMORY \ |
---|
[5877cc3a] | 1357 | _Configure_Object_RAM(1, sizeof(API_Mutex_Control)) |
---|
[b2b143f4] | 1358 | |
---|
[5877cc3a] | 1359 | /** |
---|
| 1360 | * This macro accounts for general RTEMS system overhead. |
---|
| 1361 | */ |
---|
[df49c60] | 1362 | #define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \ |
---|
[5877cc3a] | 1363 | ( \ |
---|
| 1364 | CONFIGURE_MEMORY_FOR_TASKS(1, 0) + /* IDLE and stack */ \ |
---|
[ecf0f4c] | 1365 | (CONFIGURE_IDLE_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \ |
---|
[5877cc3a] | 1366 | _Configure_From_workspace( /* Ready chains */ \ |
---|
[80f9d77] | 1367 | ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) ) + \ |
---|
[5877cc3a] | 1368 | CONFIGURE_INTERRUPT_VECTOR_TABLE + /* interrupt vectors */ \ |
---|
| 1369 | CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \ |
---|
| 1370 | CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \ |
---|
[b3dcd9a2] | 1371 | ) |
---|
| 1372 | |
---|
[399c2e5d] | 1373 | /* |
---|
| 1374 | * Now account for any extra memory that initialization tasks or threads |
---|
| 1375 | * may have requested. |
---|
| 1376 | */ |
---|
| 1377 | |
---|
[5877cc3a] | 1378 | /** |
---|
| 1379 | * This accounts for any extra memory required by the Classic API |
---|
| 1380 | * Initialization Task. |
---|
| 1381 | */ |
---|
[ecf0f4c] | 1382 | #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1383 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \ |
---|
[ecf0f4c] | 1384 | (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[399c2e5d] | 1385 | #else |
---|
[5877cc3a] | 1386 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0 |
---|
[399c2e5d] | 1387 | #endif |
---|
[5877cc3a] | 1388 | |
---|
| 1389 | /** |
---|
| 1390 | * This accounts for any extra memory required by the POSIX API |
---|
| 1391 | * Initialization Thread. |
---|
| 1392 | */ |
---|
| 1393 | #if defined(RTEMS_POSIX_API) && \ |
---|
[ecf0f4c] | 1394 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1395 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \ |
---|
[ecf0f4c] | 1396 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1397 | #else |
---|
| 1398 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0 |
---|
| 1399 | #endif |
---|
| 1400 | |
---|
| 1401 | /** |
---|
| 1402 | * This accounts for any extra memory required by the ITRON API |
---|
| 1403 | * Initialization Task. |
---|
| 1404 | */ |
---|
| 1405 | #if defined(RTEMS_ITRON_API) && \ |
---|
[ecf0f4c] | 1406 | (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1407 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \ |
---|
[ecf0f4c] | 1408 | (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[399c2e5d] | 1409 | #else |
---|
[5877cc3a] | 1410 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0 |
---|
[399c2e5d] | 1411 | #endif |
---|
| 1412 | |
---|
[5877cc3a] | 1413 | /** |
---|
| 1414 | * This macro provides a summation of the various initialization task |
---|
| 1415 | * and thread stack requirements. |
---|
| 1416 | */ |
---|
[563ed95] | 1417 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS \ |
---|
[5877cc3a] | 1418 | (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \ |
---|
[399c2e5d] | 1419 | CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \ |
---|
| 1420 | CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART) |
---|
[563ed95] | 1421 | |
---|
[5877cc3a] | 1422 | /** |
---|
| 1423 | * This macro provides a summation of the various task and thread |
---|
| 1424 | * requirements. |
---|
[7c5e3b3] | 1425 | */ |
---|
[5877cc3a] | 1426 | #define CONFIGURE_TOTAL_TASKS_AND_THREADS \ |
---|
| 1427 | (CONFIGURE_MAXIMUM_TASKS + \ |
---|
| 1428 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \ |
---|
| 1429 | CONFIGURE_MAXIMUM_ITRON_TASKS \ |
---|
| 1430 | ) |
---|
| 1431 | |
---|
| 1432 | /** |
---|
| 1433 | * This macro reserves the memory required by the statically configured |
---|
| 1434 | * user extensions. |
---|
| 1435 | */ |
---|
| 1436 | #define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \ |
---|
| 1437 | _Configure_From_workspace( \ |
---|
| 1438 | (CONFIGURE_NEWLIB_EXTENSION + CONFIGURE_STACK_CHECKER_EXTENSION) * \ |
---|
| 1439 | sizeof(User_extensions_Control) \ |
---|
| 1440 | ) |
---|
| 1441 | |
---|
| 1442 | /** |
---|
| 1443 | * This macro provides a summation of the memory required by the |
---|
| 1444 | * Classic API as configured. |
---|
| 1445 | */ |
---|
| 1446 | #define CONFIGURE_MEMORY_FOR_CLASSIC \ |
---|
| 1447 | (CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES) + \ |
---|
[3652ad35] | 1448 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \ |
---|
[bd9c3d1] | 1449 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES + \ |
---|
[df49c60] | 1450 | CONFIGURE_LIBIO_SEMAPHORES + CONFIGURE_TERMIOS_SEMAPHORES) + \ |
---|
[3652ad35] | 1451 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
| 1452 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
[e746a88] | 1453 | CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \ |
---|
[3652ad35] | 1454 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
| 1455 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
[7fa1ce86] | 1456 | CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \ |
---|
[5877cc3a] | 1457 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \ |
---|
| 1458 | ) |
---|
| 1459 | |
---|
| 1460 | #if 1 && defined(CONFIGURE_INIT) |
---|
| 1461 | /** |
---|
| 1462 | * This is a debug mechanism, so if you need to, the executable will |
---|
| 1463 | * have a structure with various partial values. Add to this as you |
---|
| 1464 | * need to. Viewing this structure in gdb combined with dumping |
---|
| 1465 | * the Configuration structures generated should help a lot in tracing |
---|
| 1466 | * down errors and analyzing where over and under allocations are. |
---|
| 1467 | */ |
---|
| 1468 | typedef struct { |
---|
| 1469 | uint32_t Classic; |
---|
| 1470 | uint32_t ITRON; |
---|
| 1471 | uint32_t POSIX; |
---|
| 1472 | uint32_t TASKS; |
---|
| 1473 | uint32_t INIT_TASK_STACKS; |
---|
| 1474 | } Configuration_Debug_t; |
---|
| 1475 | |
---|
| 1476 | Configuration_Debug_t Configuration_Memory_Debug = { |
---|
| 1477 | CONFIGURE_MEMORY_FOR_CLASSIC, /* MEMORY_CLASSIC */ |
---|
| 1478 | CONFIGURE_MEMORY_FOR_ITRON, /* MEMORY_ITRON */ |
---|
| 1479 | CONFIGURE_MEMORY_FOR_POSIX, /* MEMORY_POSIX */ |
---|
| 1480 | CONFIGURE_MEMORY_FOR_TASKS( /* MEMORY_TASKS */ |
---|
| 1481 | CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS), |
---|
| 1482 | CONFIGURE_INITIALIZATION_THREADS_STACKS /* INIT_TASK_STACKS */ |
---|
| 1483 | }; |
---|
| 1484 | #endif |
---|
| 1485 | |
---|
| 1486 | /** |
---|
| 1487 | * This calculates the memory required for the executive workspace. |
---|
| 1488 | */ |
---|
| 1489 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
| 1490 | (( \ |
---|
[df49c60] | 1491 | CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ |
---|
[5877cc3a] | 1492 | CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 1493 | CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS) + \ |
---|
| 1494 | CONFIGURE_MEMORY_FOR_CLASSIC + \ |
---|
| 1495 | CONFIGURE_MEMORY_FOR_POSIX + \ |
---|
[ecf0f4c] | 1496 | (CONFIGURE_MAXIMUM_POSIX_THREADS * CONFIGURE_MINIMUM_TASK_STACK_SIZE ) + \ |
---|
[5877cc3a] | 1497 | CONFIGURE_MEMORY_FOR_ITRON + \ |
---|
| 1498 | CONFIGURE_INITIALIZATION_THREADS_STACKS + \ |
---|
| 1499 | CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \ |
---|
| 1500 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
[7042065] | 1501 | CONFIGURE_MESSAGE_BUFFER_MEMORY + \ |
---|
| 1502 | (CONFIGURE_MEMORY_OVERHEAD * 1024) + \ |
---|
[bac7b61] | 1503 | (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \ |
---|
[7042065] | 1504 | ) & ~0x7) |
---|
[08bae5e6] | 1505 | #endif |
---|
| 1506 | |
---|
| 1507 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 1508 | /** |
---|
| 1509 | * This is the Classic API Configuration Table. |
---|
| 1510 | */ |
---|
| 1511 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
| 1512 | CONFIGURE_MAXIMUM_TASKS, |
---|
[4cb19041] | 1513 | CONFIGURE_NOTEPADS_ENABLED, |
---|
[5877cc3a] | 1514 | CONFIGURE_MAXIMUM_TIMERS, |
---|
| 1515 | CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + |
---|
| 1516 | CONFIGURE_TERMIOS_SEMAPHORES, |
---|
| 1517 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
| 1518 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
| 1519 | CONFIGURE_MAXIMUM_REGIONS, |
---|
| 1520 | CONFIGURE_MAXIMUM_PORTS, |
---|
| 1521 | CONFIGURE_MAXIMUM_PERIODS, |
---|
| 1522 | CONFIGURE_MAXIMUM_BARRIERS, |
---|
| 1523 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
| 1524 | CONFIGURE_INIT_TASK_TABLE |
---|
| 1525 | }; |
---|
[e6d4b1d] | 1526 | |
---|
[5877cc3a] | 1527 | #ifdef RTEMS_POSIX_API |
---|
| 1528 | /** |
---|
| 1529 | * This is the POSIX API Configuration Table. |
---|
| 1530 | */ |
---|
| 1531 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
| 1532 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
| 1533 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
| 1534 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
| 1535 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
| 1536 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
| 1537 | CONFIGURE_MAXIMUM_POSIX_KEYS, |
---|
| 1538 | CONFIGURE_MAXIMUM_POSIX_TIMERS, |
---|
| 1539 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
| 1540 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES, |
---|
| 1541 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES, |
---|
| 1542 | CONFIGURE_MAXIMUM_POSIX_BARRIERS, |
---|
| 1543 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS, |
---|
| 1544 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS, |
---|
| 1545 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
| 1546 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
| 1547 | }; |
---|
| 1548 | #endif |
---|
[2eba45d] | 1549 | |
---|
[5877cc3a] | 1550 | #ifdef RTEMS_ITRON_API |
---|
| 1551 | /** |
---|
| 1552 | * This is the ITRON API Configuration Table. |
---|
| 1553 | */ |
---|
| 1554 | itron_api_configuration_table Configuration_ITRON_API = { |
---|
| 1555 | CONFIGURE_MAXIMUM_ITRON_TASKS, |
---|
| 1556 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES, |
---|
| 1557 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS, |
---|
| 1558 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES, |
---|
| 1559 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS, |
---|
| 1560 | CONFIGURE_MAXIMUM_ITRON_PORTS, |
---|
| 1561 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS, |
---|
| 1562 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS, |
---|
| 1563 | CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE, |
---|
| 1564 | CONFIGURE_ITRON_INIT_TASK_TABLE_NAME |
---|
| 1565 | }; |
---|
| 1566 | #endif |
---|
[352c9b2] | 1567 | |
---|
[ecf0f4c] | 1568 | /** This variable specifies the minimum stack size for tasks in an RTEMS |
---|
| 1569 | * application. |
---|
| 1570 | * |
---|
| 1571 | * @note This is left as a simple uint32_t so it can be externed as |
---|
| 1572 | * needed without requring being high enough logical to |
---|
| 1573 | * include the full configuration table. |
---|
| 1574 | */ |
---|
| 1575 | uint32_t rtems_minimum_stack_size = |
---|
| 1576 | CONFIGURE_MINIMUM_TASK_STACK_SIZE; |
---|
| 1577 | |
---|
[80f9d77] | 1578 | /** This variable specifies the maximum priority value that |
---|
| 1579 | * a task may have. This must be a power of 2 between 4 |
---|
| 1580 | * and 256 and is specified in terms of Classic API |
---|
| 1581 | * priority values. |
---|
| 1582 | * |
---|
| 1583 | * @note This is left as a simple uint8_t so it can be externed as |
---|
| 1584 | * needed without requring being high enough logical to |
---|
| 1585 | * include the full configuration table. |
---|
| 1586 | */ |
---|
| 1587 | uint8_t rtems_maximum_priority = CONFIGURE_MAXIMUM_PRIORITY; |
---|
| 1588 | |
---|
[5877cc3a] | 1589 | /** |
---|
| 1590 | * This is the primary Configuration Table for this application. |
---|
| 1591 | */ |
---|
| 1592 | rtems_configuration_table Configuration = { |
---|
| 1593 | CONFIGURE_EXECUTIVE_RAM_WORK_AREA, |
---|
| 1594 | CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */ |
---|
| 1595 | CONFIGURE_MAXIMUM_USER_EXTENSIONS, /* maximum dynamic extensions */ |
---|
| 1596 | CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */ |
---|
| 1597 | CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */ |
---|
| 1598 | CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */ |
---|
| 1599 | CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */ |
---|
| 1600 | CONFIGURE_INTERRUPT_STACK_SIZE, /* interrupt stack size */ |
---|
| 1601 | CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */ |
---|
| 1602 | CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */ |
---|
| 1603 | CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */ |
---|
| 1604 | CONFIGURE_MAXIMUM_DRIVERS, /* maximum device drivers */ |
---|
| 1605 | CONFIGURE_NUMBER_OF_DRIVERS, /* static device drivers */ |
---|
| 1606 | Device_drivers, /* pointer to driver table */ |
---|
| 1607 | CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of static extensions */ |
---|
| 1608 | CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to static extensions */ |
---|
| 1609 | #if defined(RTEMS_MULTIPROCESSING) |
---|
| 1610 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
| 1611 | #endif |
---|
| 1612 | &Configuration_RTEMS_API, /* pointer to RTEMS API config */ |
---|
| 1613 | #ifdef RTEMS_POSIX_API |
---|
| 1614 | &Configuration_POSIX_API, /* pointer to POSIX API config */ |
---|
| 1615 | #else |
---|
| 1616 | NULL, /* pointer to POSIX API config */ |
---|
| 1617 | #endif |
---|
| 1618 | #ifdef RTEMS_ITRON_API |
---|
| 1619 | &Configuration_ITRON_API /* pointer to ITRON API config */ |
---|
| 1620 | #else |
---|
| 1621 | NULL /* pointer to ITRON API config */ |
---|
| 1622 | #endif |
---|
| 1623 | }; |
---|
[08bae5e6] | 1624 | #endif |
---|
| 1625 | |
---|
| 1626 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
| 1627 | |
---|
[0ab34c90] | 1628 | /* |
---|
| 1629 | * If the user has configured a set of Classic API Initialization Tasks, |
---|
| 1630 | * then we need to install the code that runs that loop. |
---|
| 1631 | */ |
---|
| 1632 | #ifdef CONFIGURE_INIT |
---|
| 1633 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 1634 | void (_RTEMS_tasks_Initialize_user_tasks_body)(void); |
---|
| 1635 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = |
---|
| 1636 | _RTEMS_tasks_Initialize_user_tasks_body; |
---|
| 1637 | #else |
---|
| 1638 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL; |
---|
| 1639 | #endif |
---|
| 1640 | #endif |
---|
| 1641 | |
---|
| 1642 | /* |
---|
| 1643 | * If the user has configured a set of POSIX Initialization Threads, |
---|
| 1644 | * then we need to install the code that runs that loop. |
---|
| 1645 | */ |
---|
[5a8bc44] | 1646 | #ifdef RTEMS_POSIX_API |
---|
| 1647 | #ifdef CONFIGURE_INIT |
---|
| 1648 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
| 1649 | void _POSIX_Threads_Initialize_user_threads_body(void); |
---|
| 1650 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = |
---|
| 1651 | _POSIX_Threads_Initialize_user_threads_body; |
---|
| 1652 | #else |
---|
| 1653 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL; |
---|
| 1654 | #endif |
---|
[0ab34c90] | 1655 | #endif |
---|
| 1656 | #endif |
---|
| 1657 | |
---|
| 1658 | /* |
---|
| 1659 | * If the user has configured a set of ITRON Initialization Tasks, |
---|
| 1660 | * then we need to install the code that runs that loop. |
---|
| 1661 | */ |
---|
[5a8bc44] | 1662 | #ifdef RTEMS_ITRON_API |
---|
| 1663 | #ifdef CONFIGURE_INIT |
---|
| 1664 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
| 1665 | void _ITRON_Task_Initialize_user_tasks_body(void); |
---|
| 1666 | void (*_ITRON_Initialize_user_tasks_p)(void) = |
---|
| 1667 | _ITRON_Task_Initialize_user_tasks_body; |
---|
| 1668 | #else |
---|
| 1669 | void (*_ITRON_Initialize_user_tasks_p)(void) = NULL; |
---|
| 1670 | #endif |
---|
[0ab34c90] | 1671 | #endif |
---|
| 1672 | #endif |
---|
| 1673 | |
---|
[08bae5e6] | 1674 | #ifdef __cplusplus |
---|
| 1675 | } |
---|
| 1676 | #endif |
---|
[8486081] | 1677 | |
---|
[df0bfdf] | 1678 | /****************************************************************** |
---|
| 1679 | ****************************************************************** |
---|
| 1680 | ****************************************************************** |
---|
| 1681 | * CONFIGURATION WARNINGS AND ERROR CHECKING * |
---|
| 1682 | ****************************************************************** |
---|
| 1683 | ****************************************************************** |
---|
| 1684 | ****************************************************************** |
---|
[df49c60] | 1685 | */ |
---|
| 1686 | |
---|
| 1687 | /* |
---|
[80f9d77] | 1688 | * Make sure a task/thread of some sort is configured. |
---|
| 1689 | * |
---|
| 1690 | * When analyzing RTEMS to find the smallest possible of memory |
---|
| 1691 | * that must be allocated, you probably do want to configure 0 |
---|
| 1692 | * tasks/threads so there is a smaller set of calls to _Workspace_Allocate |
---|
| 1693 | * to analyze. |
---|
| 1694 | */ |
---|
| 1695 | #if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
| 1696 | #if (CONFIGURE_MAXIMUM_TASKS == 0) && \ |
---|
| 1697 | (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \ |
---|
| 1698 | (CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \ |
---|
| 1699 | (CONFIGURE_MAXIMUM_ITRON_TASKS == 0) |
---|
| 1700 | #error "CONFIGURATION ERROR: No tasks or threads configured!!" |
---|
| 1701 | #endif |
---|
[df49c60] | 1702 | #endif |
---|
| 1703 | |
---|
| 1704 | /* |
---|
| 1705 | * Make sure at least one of the initialization task/thread |
---|
| 1706 | * tables was defined. |
---|
| 1707 | */ |
---|
| 1708 | #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 1709 | !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \ |
---|
[80f9d77] | 1710 | !defined(CONFIGURE_ITRON_INIT_TASK_TABLE) && \ |
---|
| 1711 | !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
[168ba07] | 1712 | #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!" |
---|
[df49c60] | 1713 | #endif |
---|
| 1714 | |
---|
[df0bfdf] | 1715 | /* |
---|
| 1716 | * If the user is trying to configure a multiprocessing application and |
---|
| 1717 | * RTEMS was not configured and built multiprocessing, then error out. |
---|
| 1718 | */ |
---|
| 1719 | #if defined(CONFIGURE_MP_APPLICATION) && \ |
---|
| 1720 | !defined(RTEMS_MULTIPROCESSING) |
---|
| 1721 | #error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!" |
---|
| 1722 | #endif |
---|
| 1723 | |
---|
| 1724 | /* |
---|
| 1725 | * If an attempt was made to configure POSIX objects and |
---|
| 1726 | * the POSIX API was not configured into RTEMS, error out. |
---|
| 1727 | */ |
---|
| 1728 | #if !defined(RTEMS_POSIX_API) |
---|
| 1729 | #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \ |
---|
| 1730 | (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \ |
---|
| 1731 | (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \ |
---|
| 1732 | (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) || \ |
---|
| 1733 | (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \ |
---|
| 1734 | (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \ |
---|
| 1735 | (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \ |
---|
| 1736 | (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \ |
---|
| 1737 | (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \ |
---|
| 1738 | (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \ |
---|
| 1739 | (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \ |
---|
[98e92b0a] | 1740 | defined(CONFIGURE_POSIX_INIT_THREAD_TABLE)) |
---|
[df0bfdf] | 1741 | #error "CONFIGURATION ERROR: POSIX API support not configured!!" |
---|
| 1742 | #endif |
---|
| 1743 | #endif |
---|
| 1744 | |
---|
| 1745 | /* |
---|
| 1746 | * If an attempt was made to configure ITRON objects and |
---|
| 1747 | * the ITRON API was not configured into RTEMS, error out. |
---|
| 1748 | */ |
---|
| 1749 | #if !defined(RTEMS_ITRON_API) |
---|
| 1750 | #if ((CONFIGURE_MAXIMUM_ITRON_TASKS != 0) || \ |
---|
| 1751 | (CONFIGURE_MAXIMUM_ITRON_SEMAPHORES != 0) || \ |
---|
| 1752 | (CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS != 0) || \ |
---|
| 1753 | (CONFIGURE_MAXIMUM_ITRON_MAILBOXES != 0) || \ |
---|
| 1754 | (CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS != 0) || \ |
---|
| 1755 | (CONFIGURE_MAXIMUM_ITRON_PORTS != 0) || \ |
---|
| 1756 | (CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS != 0) || \ |
---|
[98e92b0a] | 1757 | (CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS != 0) || \ |
---|
| 1758 | defined(CONFIGURE_ITRON_INIT_TASK_TABLE)) |
---|
[df0bfdf] | 1759 | #error "CONFIGURATION ERROR: ITRON API support not configured!!" |
---|
| 1760 | #endif |
---|
| 1761 | #endif |
---|
| 1762 | |
---|
| 1763 | /* |
---|
| 1764 | * You must either explicity include or exclude the clock driver. |
---|
| 1765 | * It is such a common newbie error to leave it out. Maybe this |
---|
| 1766 | * will put an end to it. |
---|
| 1767 | * |
---|
| 1768 | * NOTE: If you are using the timer driver, it is considered |
---|
[76deaf0c] | 1769 | * mutually exclusive with the clock driver because the |
---|
| 1770 | * drivers are assumed to use the same "timer" hardware |
---|
| 1771 | * on many boards. |
---|
[df0bfdf] | 1772 | */ |
---|
| 1773 | #if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE) |
---|
| 1774 | #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 1775 | !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \ |
---|
| 1776 | !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) |
---|
| 1777 | #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?" |
---|
| 1778 | #endif |
---|
| 1779 | #endif |
---|
| 1780 | |
---|
[0ab34c90] | 1781 | /* |
---|
| 1782 | * These names have been obsoleted so make the user application stop compiling |
---|
| 1783 | */ |
---|
| 1784 | #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \ |
---|
| 1785 | defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \ |
---|
| 1786 | defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \ |
---|
| 1787 | defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \ |
---|
| 1788 | defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER) |
---|
| 1789 | #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete" |
---|
| 1790 | #endif |
---|
| 1791 | |
---|
[80f9d77] | 1792 | /* |
---|
| 1793 | * Validate the configured maximum priority |
---|
| 1794 | */ |
---|
| 1795 | #if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \ |
---|
| 1796 | (CONFIGURE_MAXIMUM_PRIORITY != 7) && \ |
---|
| 1797 | (CONFIGURE_MAXIMUM_PRIORITY != 15) && \ |
---|
| 1798 | (CONFIGURE_MAXIMUM_PRIORITY != 31) && \ |
---|
| 1799 | (CONFIGURE_MAXIMUM_PRIORITY != 63) && \ |
---|
| 1800 | (CONFIGURE_MAXIMUM_PRIORITY != 127) && \ |
---|
| 1801 | (CONFIGURE_MAXIMUM_PRIORITY != 255)) |
---|
| 1802 | #error "Maximum priority is not 1 less than a power of 2 between 4 and 256" |
---|
| 1803 | #endif |
---|
| 1804 | |
---|
| 1805 | #if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM) |
---|
| 1806 | #error "Maximum priority configured higher than supported by target." |
---|
| 1807 | #endif |
---|
| 1808 | |
---|
[08bae5e6] | 1809 | #endif |
---|
| 1810 | /* end of include file */ |
---|