[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 | */ |
---|
[28352fae] | 27 | |
---|
| 28 | /* |
---|
[7a09a7a] | 29 | * COPYRIGHT (c) 1989-2010. |
---|
[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 | |
---|
[d40da79b] | 75 | #include <rtems/libio.h> |
---|
| 76 | |
---|
| 77 | #ifdef CONFIGURE_INIT |
---|
[28352fae] | 78 | rtems_libio_init_functions_t rtems_libio_init_helper = |
---|
[d40da79b] | 79 | #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 80 | NULL; |
---|
| 81 | #else |
---|
| 82 | rtems_libio_init; |
---|
| 83 | #endif |
---|
| 84 | |
---|
[28352fae] | 85 | rtems_libio_supp_functions_t rtems_libio_supp_helper = |
---|
[d40da79b] | 86 | #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 87 | NULL; |
---|
| 88 | #else |
---|
| 89 | open_dev_console; |
---|
| 90 | #endif |
---|
| 91 | |
---|
[28352fae] | 92 | rtems_fs_init_functions_t rtems_fs_init_helper = |
---|
[d40da79b] | 93 | #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 94 | NULL; |
---|
| 95 | #else |
---|
| 96 | rtems_filesystem_initialize; |
---|
| 97 | #endif |
---|
| 98 | #endif |
---|
| 99 | |
---|
| 100 | |
---|
[717391f5] | 101 | /* |
---|
[d25f741] | 102 | * If the application disables the filesystem, they will not need |
---|
| 103 | * a mount table, so do not produce one. |
---|
[717391f5] | 104 | */ |
---|
[d25f741] | 105 | #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM |
---|
| 106 | #define CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
[d40da79b] | 107 | #endif |
---|
| 108 | |
---|
[5877cc3a] | 109 | /** |
---|
[28352fae] | 110 | * This macro defines the number of POSIX file descriptors allocated |
---|
[5877cc3a] | 111 | * and managed by libio. These are the "integer" file descriptors that |
---|
| 112 | * are used by calls like open(2) and read(2). |
---|
[df49c60] | 113 | */ |
---|
[bd9c3d1] | 114 | #ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS |
---|
[5877cc3a] | 115 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3 |
---|
[bd9c3d1] | 116 | #endif |
---|
| 117 | |
---|
[5877cc3a] | 118 | /** |
---|
| 119 | * From the number of file descriptors, we can determine how many |
---|
| 120 | * semaphores the implementation will require. |
---|
| 121 | */ |
---|
[bd9c3d1] | 122 | #define CONFIGURE_LIBIO_SEMAPHORES \ |
---|
| 123 | (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1) |
---|
| 124 | |
---|
[43908825] | 125 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 126 | /** |
---|
| 127 | * When instantiating the configuration tables, this variable is |
---|
| 128 | * initialized to specify the maximum number of file descriptors. |
---|
| 129 | */ |
---|
| 130 | uint32_t rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS; |
---|
[43908825] | 131 | #endif |
---|
| 132 | |
---|
[5877cc3a] | 133 | /** |
---|
| 134 | * This macro determines if termios is disabled by this application. |
---|
| 135 | * This only means that resources will not be reserved. If you end |
---|
| 136 | * up using termios, it will fail. |
---|
[df49c60] | 137 | */ |
---|
| 138 | #ifdef CONFIGURE_TERMIOS_DISABLED |
---|
[5877cc3a] | 139 | #define CONFIGURE_TERMIOS_SEMAPHORES 0 |
---|
[df49c60] | 140 | #else |
---|
[5877cc3a] | 141 | /** |
---|
| 142 | * This macro specifies the number of serial or PTY ports that will |
---|
| 143 | * use termios. |
---|
| 144 | */ |
---|
| 145 | #ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS |
---|
| 146 | #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1 |
---|
| 147 | #endif |
---|
[df49c60] | 148 | |
---|
[5877cc3a] | 149 | /** |
---|
| 150 | * This macro reserves the number of semaphores required by termios |
---|
| 151 | * based upon the number of communication ports that will use it. |
---|
| 152 | */ |
---|
| 153 | #define CONFIGURE_TERMIOS_SEMAPHORES \ |
---|
| 154 | ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1) |
---|
[df49c60] | 155 | #endif |
---|
| 156 | |
---|
[5877cc3a] | 157 | /** |
---|
| 158 | * This macro specifies the number of PTYs that can be concurrently |
---|
| 159 | * active. |
---|
[d3d2afdf] | 160 | */ |
---|
| 161 | #ifndef CONFIGURE_MAXIMUM_PTYS |
---|
[5877cc3a] | 162 | #define CONFIGURE_MAXIMUM_PTYS 0 |
---|
[d3d2afdf] | 163 | #endif |
---|
| 164 | |
---|
[5877cc3a] | 165 | /** |
---|
| 166 | * This variable contains the maximum number of PTYs that can be |
---|
| 167 | * concurrently active. |
---|
| 168 | */ |
---|
[d3d2afdf] | 169 | #ifdef CONFIGURE_INIT |
---|
[396e3258] | 170 | int rtems_telnetd_maximum_ptys = CONFIGURE_MAXIMUM_PTYS; |
---|
[d3d2afdf] | 171 | #else |
---|
[396e3258] | 172 | extern int rtems_telnetd_maximum_ptys; |
---|
[d3d2afdf] | 173 | #endif |
---|
| 174 | |
---|
[29e92b0] | 175 | /* |
---|
| 176 | * Filesystems and Mount Table Configuration. |
---|
| 177 | * |
---|
| 178 | * Defines to control the file system: |
---|
| 179 | * |
---|
| 180 | * CONFIGURE_APPLICATION_DISABLE_FILESYSTEM: |
---|
| 181 | * Disable the RTEMS filesystems. You get an empty DEVFS. |
---|
| 182 | * |
---|
| 183 | * CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM: |
---|
| 184 | * Use the DEVFS as the root file system. Limited functions are |
---|
| 185 | * provided when this is used. |
---|
| 186 | * |
---|
| 187 | * CONFIGURE_FILESYSTEM_ALL: |
---|
| 188 | * Add file filesystems to the default filesystem table. |
---|
| 189 | * |
---|
| 190 | * List of available file systems. You can define as many as you like: |
---|
| 191 | * CONFIGURE_FILESYSTEM_miniIMFS - MiniIMFS, use DEVFS now |
---|
| 192 | * CONFIGURE_FILESYSTEM_IMFS - In Memory File System (IMFS) |
---|
| 193 | * CONFIGURE_FILESYSTEM_DEVFS - Device File System (DSVFS) |
---|
| 194 | * CONFIGURE_FILESYSTEM_TFTPFS - TFTP File System, networking enabled |
---|
| 195 | * CONFIGURE_FILESYSTEM_FTPFS - FTP File System, networking enabled |
---|
| 196 | * CONFIGURE_FILESYSTEM_NFSFS - Network File System, networking enabled |
---|
| 197 | * CONFIGURE_FILESYSTEM_DOSFS - DOS File System, uses libblock |
---|
| 198 | * CONFIGURE_FILESYSTEM_RFS - RTEMS File System (RFS), uses libblock |
---|
| 199 | * |
---|
| 200 | * Combinations: |
---|
| 201 | * |
---|
| 202 | * - If nothing is defined the base file system is the IMFS. |
---|
| 203 | * |
---|
| 204 | * - If CONFIGURE_APPLICATION_DISABLE_FILESYSTEM is defined all filesystem |
---|
| 205 | * are disabled by force and an empty DEVFS is created. |
---|
| 206 | * |
---|
| 207 | * - If CONFIGURE_USE_DEV_AS_BASE_FILESYSTEM is defined all filesystem |
---|
| 208 | * are disabled by force and DEVFS is defined. |
---|
| 209 | */ |
---|
| 210 | |
---|
[d40da79b] | 211 | #ifdef CONFIGURE_INIT |
---|
[29e92b0] | 212 | |
---|
| 213 | /* |
---|
| 214 | * Include all file systems. Do this before checking if the filesystem has |
---|
| 215 | * been disabled. |
---|
| 216 | */ |
---|
| 217 | #ifdef CONFIGURE_FILESYSTEM_ALL |
---|
| 218 | #define CONFIGURE_FILESYSTEM_miniIMFS |
---|
| 219 | #define CONFIGURE_FILESYSTEM_IMFS |
---|
| 220 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
| 221 | #define CONFIGURE_FILESYSTEM_TFTPFS |
---|
| 222 | #define CONFIGURE_FILESYSTEM_FTPFS |
---|
| 223 | #define CONFIGURE_FILESYSTEM_NFSFS |
---|
| 224 | #define CONFIGURE_FILESYSTEM_DOSFS |
---|
| 225 | #define CONFIGURE_FILESYSTEM_RFS |
---|
| 226 | #endif |
---|
| 227 | |
---|
| 228 | /* |
---|
| 229 | * If disabling the file system undef everything. If DEVFS as the base |
---|
| 230 | * filesystem undefine all other filesystems because you cannot mount other |
---|
[dfce6724] | 231 | * filesystems. Same for miniIMFS. |
---|
[29e92b0] | 232 | */ |
---|
| 233 | #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) || \ |
---|
[dfce6724] | 234 | defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \ |
---|
| 235 | defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM) |
---|
[29e92b0] | 236 | #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
| 237 | #undef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM |
---|
[dfce6724] | 238 | #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM |
---|
| 239 | #elif defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
| 240 | #undef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM |
---|
[717391f5] | 241 | #endif |
---|
[29e92b0] | 242 | #undef CONFIGURE_FILESYSTEM_miniIMFS |
---|
| 243 | #undef CONFIGURE_FILESYSTEM_IMFS |
---|
| 244 | #undef CONFIGURE_FILESYSTEM_DEVFS |
---|
| 245 | #undef CONFIGURE_FILESYSTEM_TFTPFS |
---|
| 246 | #undef CONFIGURE_FILESYSTEM_FTPFS |
---|
| 247 | #undef CONFIGURE_FILESYSTEM_NFSFS |
---|
| 248 | #undef CONFIGURE_FILESYSTEM_DOSFS |
---|
| 249 | #undef CONFIGURE_FILESYSTEM_RFS |
---|
| 250 | #endif |
---|
| 251 | |
---|
| 252 | /* |
---|
| 253 | * If the base filesystem is DEVFS define it else define IMFS. |
---|
| 254 | * We will have either DEVFS or IMFS defined after this. |
---|
| 255 | */ |
---|
[dfce6724] | 256 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
[29e92b0] | 257 | #define CONFIGURE_FILESYSTEM_DEVFS |
---|
[dfce6724] | 258 | #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM) |
---|
| 259 | #define CONFIGURE_FILESYSTEM_miniIMFS |
---|
[29e92b0] | 260 | #elif !defined(CONFIGURE_FILESYSTEM_IMFS) |
---|
| 261 | #define CONFIGURE_FILESYSTEM_IMFS |
---|
| 262 | #endif |
---|
| 263 | |
---|
| 264 | #endif |
---|
| 265 | |
---|
| 266 | /** |
---|
| 267 | * IMFS |
---|
| 268 | */ |
---|
| 269 | #include <rtems/imfs.h> |
---|
| 270 | |
---|
| 271 | /** |
---|
| 272 | * This specifies the number of bytes per block for files within the IMFS. |
---|
| 273 | * There are a maximum number of blocks per file so this dictates the maximum |
---|
| 274 | * size of a file. This has to be balanced with the unused portion of each |
---|
| 275 | * block that might be wasted. |
---|
| 276 | */ |
---|
| 277 | #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK |
---|
| 278 | #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ |
---|
| 279 | IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK |
---|
| 280 | #endif |
---|
| 281 | |
---|
| 282 | /** |
---|
| 283 | * This defines the miniIMFS file system table entry. |
---|
| 284 | */ |
---|
| 285 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS) && \ |
---|
| 286 | defined(CONFIGURE_FILESYSTEM_miniIMFS) |
---|
[3d3a18e6] | 287 | #define CONFIGURE_FILESYSTEM_ENTRY_miniIMFS \ |
---|
| 288 | { RTEMS_FILESYSTEM_TYPE_MINIIMFS, miniIMFS_initialize } |
---|
[29e92b0] | 289 | #endif |
---|
| 290 | |
---|
| 291 | /** |
---|
| 292 | * This defines the IMFS file system table entry. |
---|
| 293 | */ |
---|
| 294 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \ |
---|
| 295 | defined(CONFIGURE_FILESYSTEM_IMFS) |
---|
| 296 | #define CONFIGURE_FILESYSTEM_ENTRY_IMFS { "imfs", IMFS_initialize } |
---|
| 297 | #endif |
---|
| 298 | |
---|
| 299 | /** |
---|
| 300 | * DEVFS |
---|
| 301 | */ |
---|
| 302 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) && \ |
---|
| 303 | defined(CONFIGURE_FILESYSTEM_DEVFS) |
---|
| 304 | #include <rtems/devfs.h> |
---|
[3d3a18e6] | 305 | #define CONFIGURE_FILESYSTEM_ENTRY_DEVFS \ |
---|
| 306 | { RTEMS_FILESYSTEM_TYPE_DEVFS, devFS_initialize } |
---|
[29e92b0] | 307 | #endif |
---|
| 308 | |
---|
| 309 | #ifdef RTEMS_NETWORKING |
---|
| 310 | /** |
---|
| 311 | * FTPFS |
---|
| 312 | */ |
---|
| 313 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) && \ |
---|
| 314 | defined(CONFIGURE_FILESYSTEM_FTPFS) |
---|
| 315 | #include <rtems/ftpfs.h> |
---|
[3d3a18e6] | 316 | #define CONFIGURE_FILESYSTEM_ENTRY_FTPFS \ |
---|
| 317 | { RTEMS_FILESYSTEM_TYPE_FTPFS, rtems_ftpfs_initialize } |
---|
[29e92b0] | 318 | #endif |
---|
| 319 | |
---|
| 320 | /** |
---|
| 321 | * TFTPFS |
---|
| 322 | */ |
---|
| 323 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) && \ |
---|
| 324 | defined(CONFIGURE_FILESYSTEM_TFTPFS) |
---|
| 325 | #include <rtems/tftp.h> |
---|
[3d3a18e6] | 326 | #define CONFIGURE_FILESYSTEM_ENTRY_TFTPFS \ |
---|
| 327 | { RTEMS_FILESYSTEM_TYPE_TFTPFS, rtems_tftpfs_initialize } |
---|
[29e92b0] | 328 | #endif |
---|
| 329 | |
---|
| 330 | /** |
---|
| 331 | * NFSFS |
---|
| 332 | */ |
---|
| 333 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS) && \ |
---|
| 334 | defined(CONFIGURE_FILESYSTEM_NFSFS) |
---|
| 335 | #include <librtemsNfs.h> |
---|
[3d3a18e6] | 336 | #define CONFIGURE_FILESYSTEM_ENTRY_NFSFS \ |
---|
| 337 | { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfsfs_initialize } |
---|
[29e92b0] | 338 | #endif |
---|
| 339 | #endif |
---|
| 340 | |
---|
| 341 | /** |
---|
| 342 | * DOSFS |
---|
| 343 | */ |
---|
| 344 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) && \ |
---|
| 345 | defined(CONFIGURE_FILESYSTEM_DOSFS) |
---|
| 346 | #include <rtems/dosfs.h> |
---|
[3d3a18e6] | 347 | #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS \ |
---|
| 348 | { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize } |
---|
[29e92b0] | 349 | #endif |
---|
| 350 | |
---|
| 351 | /** |
---|
| 352 | * RFS |
---|
| 353 | */ |
---|
| 354 | #if !defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) && \ |
---|
| 355 | defined(CONFIGURE_FILESYSTEM_RFS) |
---|
| 356 | #include <rtems/rtems-rfs.h> |
---|
[3d3a18e6] | 357 | #define CONFIGURE_FILESYSTEM_ENTRY_RFS \ |
---|
| 358 | { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise } |
---|
[29e92b0] | 359 | #endif |
---|
| 360 | |
---|
| 361 | #ifdef CONFIGURE_INIT |
---|
| 362 | |
---|
| 363 | /* |
---|
| 364 | * DEVFS variables. |
---|
| 365 | */ |
---|
[d25f741] | 366 | #if defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) |
---|
[d40da79b] | 367 | #define CONFIGURE_MEMORY_FOR_DEVFS 0 |
---|
[29e92b0] | 368 | #elif defined(CONFIGURE_FILESYSTEM_DEVFS) |
---|
[d40da79b] | 369 | #ifndef CONFIGURE_MAXIMUM_DEVICES |
---|
| 370 | #define CONFIGURE_MAXIMUM_DEVICES 4 |
---|
| 371 | #endif |
---|
| 372 | #include <rtems/devfs.h> |
---|
| 373 | uint32_t rtems_device_table_size = CONFIGURE_MAXIMUM_DEVICES; |
---|
[717391f5] | 374 | #define CONFIGURE_MEMORY_FOR_DEVFS \ |
---|
| 375 | _Configure_Object_RAM(CONFIGURE_MAXIMUM_DEVICES, \ |
---|
| 376 | sizeof (rtems_device_name_t)) |
---|
[d40da79b] | 377 | #else |
---|
| 378 | #define CONFIGURE_MEMORY_FOR_DEVFS 0 |
---|
| 379 | #endif |
---|
| 380 | |
---|
[dfce6724] | 381 | #if defined(CONFIGURE_FILESYSTEM_IMFS) || \ |
---|
| 382 | defined(CONFIGURE_FILESYSTEM_miniIMFS) |
---|
| 383 | int imfs_rq_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK; |
---|
| 384 | #endif |
---|
| 385 | |
---|
[29e92b0] | 386 | /** |
---|
| 387 | * Table termination record. |
---|
| 388 | */ |
---|
| 389 | #define CONFIGURE_FILESYSTEM_NULL { NULL, NULL } |
---|
[43f7a90] | 390 | |
---|
[29e92b0] | 391 | /** |
---|
| 392 | * The default file system table. Must be terminated with the NULL entry if |
---|
| 393 | * you provide your own. |
---|
| 394 | */ |
---|
| 395 | #ifndef CONFIGURE_HAS_OWN_FILESYSTEM_TABLE |
---|
[00bf6744] | 396 | const rtems_filesystem_table_t rtems_filesystem_table[] = { |
---|
[29e92b0] | 397 | #if defined(CONFIGURE_FILESYSTEM_miniIMFS) && \ |
---|
| 398 | defined(CONFIGURE_FILESYSTEM_ENTRY_miniIMFS) |
---|
| 399 | CONFIGURE_FILESYSTEM_ENTRY_miniIMFS, |
---|
| 400 | #endif |
---|
| 401 | #if defined(CONFIGURE_FILESYSTEM_IMFS) && \ |
---|
| 402 | defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) |
---|
| 403 | CONFIGURE_FILESYSTEM_ENTRY_IMFS, |
---|
| 404 | #endif |
---|
| 405 | #if defined(CONFIGURE_FILESYSTEM_DEVFS) && \ |
---|
| 406 | defined(CONFIGURE_FILESYSTEM_ENTRY_DEVFS) |
---|
| 407 | CONFIGURE_FILESYSTEM_ENTRY_DEVFS, |
---|
| 408 | #endif |
---|
| 409 | #if defined(CONFIGURE_FILESYSTEM_TFTPFS) && \ |
---|
| 410 | defined(CONFIGURE_FILESYSTEM_ENTRY_TFTPFS) |
---|
| 411 | CONFIGURE_FILESYSTEM_ENTRY_TFTPFS, |
---|
| 412 | #endif |
---|
| 413 | #if defined(CONFIGURE_FILESYSTEM_FTPFS) && \ |
---|
| 414 | defined(CONFIGURE_FILESYSTEM_ENTRY_FTPFS) |
---|
| 415 | CONFIGURE_FILESYSTEM_ENTRY_FTPFS, |
---|
| 416 | #endif |
---|
| 417 | #if defined(CONFIGURE_FILESYSTEM_NFSFS) && \ |
---|
| 418 | defined(CONFIGURE_FILESYSTEM_ENTRY_NFSFS) |
---|
| 419 | CONFIGURE_FILESYSTEM_ENTRY_NFSFS, |
---|
| 420 | #endif |
---|
| 421 | #if defined(CONFIGURE_FILESYSTEM_DOSFS) && \ |
---|
| 422 | defined(CONFIGURE_FILESYSTEM_ENTRY_DOSFS) |
---|
| 423 | CONFIGURE_FILESYSTEM_ENTRY_DOSFS, |
---|
| 424 | #endif |
---|
| 425 | #if defined(CONFIGURE_FILESYSTEM_RFS) && \ |
---|
| 426 | defined(CONFIGURE_FILESYSTEM_ENTRY_RFS) |
---|
| 427 | CONFIGURE_FILESYSTEM_ENTRY_RFS, |
---|
| 428 | #endif |
---|
| 429 | CONFIGURE_FILESYSTEM_NULL |
---|
| 430 | }; |
---|
| 431 | #endif |
---|
[43f7a90] | 432 | |
---|
[4c0d483b] | 433 | /** |
---|
| 434 | * This disables the inclusion of pipe support in the full IMFS. |
---|
[717391f5] | 435 | * |
---|
| 436 | * NOTE: When building for coverage, we need this variable all the time. |
---|
[4c0d483b] | 437 | */ |
---|
[717391f5] | 438 | #if !defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) || \ |
---|
[dfce6724] | 439 | defined(RTEMS_COVERAGE) |
---|
[4c0d483b] | 440 | #if defined(CONFIGURE_PIPES_ENABLED) |
---|
| 441 | bool rtems_pipe_configured = true; |
---|
| 442 | #else |
---|
| 443 | bool rtems_pipe_configured = false; |
---|
| 444 | #endif |
---|
| 445 | #endif |
---|
| 446 | |
---|
[c3db01d0] | 447 | #ifndef CONFIGURE_HAS_OWN_MOUNT_TABLE |
---|
[bf95ccb5] | 448 | const rtems_filesystem_mount_table_t configuration_mount_table = { |
---|
[46969df] | 449 | #if defined(CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM) |
---|
[3d3a18e6] | 450 | RTEMS_FILESYSTEM_TYPE_DEVFS, |
---|
[46969df] | 451 | #elif defined(CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM) |
---|
[3d3a18e6] | 452 | RTEMS_FILESYSTEM_TYPE_MINIIMFS, |
---|
[46969df] | 453 | #else /* using IMFS as base filesystem */ |
---|
[3d3a18e6] | 454 | RTEMS_FILESYSTEM_TYPE_IMFS, |
---|
[c3db01d0] | 455 | #endif |
---|
| 456 | RTEMS_FILESYSTEM_READ_WRITE, |
---|
| 457 | NULL, |
---|
| 458 | NULL |
---|
| 459 | }; |
---|
| 460 | |
---|
[bf95ccb5] | 461 | const rtems_filesystem_mount_table_t |
---|
[4175abd] | 462 | *rtems_filesystem_mount_table = &configuration_mount_table; |
---|
[bf95ccb5] | 463 | const int rtems_filesystem_mount_table_size = 1; |
---|
[c3db01d0] | 464 | #endif |
---|
[29e92b0] | 465 | |
---|
[43f7a90] | 466 | #endif |
---|
| 467 | |
---|
[4afd6f4] | 468 | /* |
---|
| 469 | * STACK_CHECER_ON was still available in 4.9 so give a warning for now. |
---|
| 470 | */ |
---|
| 471 | #if defined(STACK_CHECKER_ON) |
---|
| 472 | #define CONFIGURE_STACK_CHECKER_ENABLED |
---|
| 473 | #warning "STACK_CHECKER_ON deprecated -- use CONFIGURE_STACK_CHECKER_ENABLED" |
---|
| 474 | #endif |
---|
[28352fae] | 475 | |
---|
[5877cc3a] | 476 | /** |
---|
| 477 | * This configures the stack checker user extension. |
---|
[ab97da95] | 478 | */ |
---|
[4afd6f4] | 479 | #ifdef CONFIGURE_STACK_CHECKER_ENABLED |
---|
[5877cc3a] | 480 | #define CONFIGURE_STACK_CHECKER_EXTENSION 1 |
---|
[ab97da95] | 481 | #else |
---|
[5877cc3a] | 482 | #define CONFIGURE_STACK_CHECKER_EXTENSION 0 |
---|
[ab97da95] | 483 | #endif |
---|
| 484 | |
---|
[80f9d77] | 485 | /** |
---|
| 486 | * @brief Maximum Priority configuration |
---|
| 487 | * |
---|
| 488 | * This configures the maximum priority value that |
---|
| 489 | * a task may have. |
---|
| 490 | * |
---|
| 491 | * By reducing the number of priorities in a system, |
---|
| 492 | * the amount of RAM required by RTEMS can be significantly |
---|
| 493 | * reduced. RTEMS allocates a Chain_Control structure per |
---|
| 494 | * priority and this structure contains 3 pointers. So |
---|
| 495 | * the default is (256 * 12) = 3K on 32-bit architectures. |
---|
| 496 | * |
---|
| 497 | * This must be one less than a power of 2 between |
---|
| 498 | * 4 and 256. Valid values along with the application |
---|
| 499 | * priority levels and memory saved when pointers are |
---|
| 500 | * 32-bits in size are: |
---|
| 501 | * |
---|
| 502 | * + 3, 2 application priorities, 3024 bytes saved |
---|
| 503 | * + 7, 5 application priorities, 2976 bytes saved |
---|
| 504 | * + 15, 13 application priorities, 2880 bytes saved |
---|
| 505 | * + 31, 29 application priorities, 2688 bytes saved |
---|
| 506 | * + 63, 61 application priorities, 2304 bytes saved |
---|
| 507 | * + 127, 125 application priorities, 1536 bytes saved |
---|
| 508 | * + 255, 253 application priorities, 0 bytes saved |
---|
| 509 | * |
---|
| 510 | * It is specified in terms of Classic API |
---|
| 511 | * priority values. |
---|
| 512 | */ |
---|
| 513 | #ifndef CONFIGURE_MAXIMUM_PRIORITY |
---|
[8f25cec] | 514 | #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM |
---|
[80f9d77] | 515 | #endif |
---|
| 516 | |
---|
| 517 | /* |
---|
| 518 | * If you said the IDLE task was going to do application initialization |
---|
| 519 | * and didn't override the IDLE body, then something is amiss. |
---|
| 520 | */ |
---|
| 521 | #if (defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) && \ |
---|
| 522 | !defined(CONFIGURE_IDLE_TASK_BODY)) |
---|
[805cddc] | 523 | #error "CONFIGURE_ERROR: You did not override the IDLE task body." |
---|
[80f9d77] | 524 | #endif |
---|
| 525 | |
---|
[5877cc3a] | 526 | /** |
---|
| 527 | * @brief Idle task body configuration |
---|
[976162a6] | 528 | * |
---|
| 529 | * There is a default IDLE thread body provided by RTEMS which |
---|
| 530 | * has the possibility of being CPU specific. There may be a |
---|
| 531 | * BSP specific override of the RTEMS default body and in turn, |
---|
| 532 | * the application may override and provide its own. |
---|
| 533 | */ |
---|
| 534 | #ifndef CONFIGURE_IDLE_TASK_BODY |
---|
[6c71b25] | 535 | #if defined(BSP_IDLE_TASK_BODY) |
---|
[976162a6] | 536 | #define CONFIGURE_IDLE_TASK_BODY BSP_IDLE_TASK_BODY |
---|
[6c71b25] | 537 | #elif (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) |
---|
| 538 | #define CONFIGURE_IDLE_TASK_BODY _CPU_Thread_Idle_body |
---|
[976162a6] | 539 | #else |
---|
[93f7ea15] | 540 | /* only instantiate and compile if used */ |
---|
| 541 | #ifdef CONFIGURE_INIT |
---|
| 542 | void *_Thread_Idle_body(uintptr_t ignored) |
---|
| 543 | { |
---|
| 544 | for( ; ; ) ; |
---|
| 545 | return 0; /* to avoid warning */ |
---|
| 546 | } |
---|
| 547 | #endif |
---|
[6c71b25] | 548 | #define CONFIGURE_IDLE_TASK_BODY _Thread_Idle_body |
---|
[976162a6] | 549 | #endif |
---|
| 550 | #endif |
---|
| 551 | |
---|
[ecf0f4c] | 552 | /** |
---|
| 553 | * By default, use the minimum stack size requested by this port. |
---|
| 554 | */ |
---|
| 555 | #ifndef CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
| 556 | #define CONFIGURE_MINIMUM_TASK_STACK_SIZE CPU_STACK_MINIMUM_SIZE |
---|
| 557 | #endif |
---|
| 558 | |
---|
[5877cc3a] | 559 | /** |
---|
| 560 | * @brief Idle task stack size configuration |
---|
[976162a6] | 561 | * |
---|
| 562 | * By default, the IDLE task will have a stack of minimum size. |
---|
| 563 | * The BSP or application may override this value. |
---|
| 564 | */ |
---|
| 565 | #ifndef CONFIGURE_IDLE_TASK_STACK_SIZE |
---|
| 566 | #ifdef BSP_IDLE_TASK_STACK_SIZE |
---|
| 567 | #define CONFIGURE_IDLE_TASK_STACK_SIZE BSP_IDLE_TASK_STACK_SIZE |
---|
| 568 | #else |
---|
[ecf0f4c] | 569 | #define CONFIGURE_IDLE_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[976162a6] | 570 | #endif |
---|
| 571 | #endif |
---|
| 572 | |
---|
[5877cc3a] | 573 | /** |
---|
| 574 | * @brief Interrupt stack size configuration |
---|
[6aa25da] | 575 | * |
---|
| 576 | * By default, the interrupt stack will be of minimum size. |
---|
| 577 | * The BSP or application may override this value. |
---|
| 578 | */ |
---|
| 579 | #ifndef CONFIGURE_INTERRUPT_STACK_SIZE |
---|
| 580 | #ifdef BSP_INTERRUPT_STACK_SIZE |
---|
| 581 | #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE |
---|
| 582 | #else |
---|
[ecf0f4c] | 583 | #define CONFIGURE_INTERRUPT_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[6aa25da] | 584 | #endif |
---|
| 585 | #endif |
---|
| 586 | |
---|
[5877cc3a] | 587 | /** |
---|
| 588 | * This reserves memory for the interrupt stack if it is to be allocated |
---|
| 589 | * by RTEMS rather than the BSP. |
---|
| 590 | * |
---|
| 591 | * @todo Try to get to the point where all BSPs support allocating the |
---|
| 592 | * memory from the Workspace. |
---|
[6aa25da] | 593 | */ |
---|
| 594 | #if (CPU_ALLOCATE_INTERRUPT_STACK == 0) |
---|
[d875597c] | 595 | #define CONFIGURE_INTERRUPT_STACK_MEMORY 0 |
---|
| 596 | #else |
---|
[94a88c1c] | 597 | #define CONFIGURE_INTERRUPT_STACK_MEMORY \ |
---|
| 598 | _Configure_From_workspace( CONFIGURE_INTERRUPT_STACK_SIZE ) |
---|
[6aa25da] | 599 | #endif |
---|
| 600 | |
---|
[5877cc3a] | 601 | /** |
---|
| 602 | * Configure the very much optional task stack allocator |
---|
[976162a6] | 603 | */ |
---|
| 604 | #ifndef CONFIGURE_TASK_STACK_ALLOCATOR |
---|
| 605 | #define CONFIGURE_TASK_STACK_ALLOCATOR NULL |
---|
| 606 | #endif |
---|
| 607 | |
---|
[5877cc3a] | 608 | /** |
---|
| 609 | * Configure the very much optional task stack deallocator |
---|
| 610 | */ |
---|
[976162a6] | 611 | #ifndef CONFIGURE_TASK_STACK_DEALLOCATOR |
---|
| 612 | #define CONFIGURE_TASK_STACK_DEALLOCATOR NULL |
---|
| 613 | #endif |
---|
| 614 | |
---|
[5877cc3a] | 615 | /** |
---|
[976162a6] | 616 | * Should the RTEMS Workspace and C Program Heap be cleared automatically |
---|
| 617 | * at system start up? |
---|
| 618 | */ |
---|
| 619 | #ifndef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 620 | #ifdef BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 621 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY \ |
---|
| 622 | BSP_ZERO_WORKSPACE_AUTOMATICALLY |
---|
| 623 | #else |
---|
| 624 | #define CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY FALSE |
---|
| 625 | #endif |
---|
| 626 | #endif |
---|
| 627 | |
---|
[cfcc4e20] | 628 | /* |
---|
| 629 | * RTEMS Malloc configuration |
---|
| 630 | */ |
---|
| 631 | |
---|
| 632 | #include <rtems/malloc.h> |
---|
| 633 | |
---|
[bd5984de] | 634 | #ifdef CONFIGURE_INIT |
---|
| 635 | /** |
---|
| 636 | * By default, RTEMS uses separate heaps for the RTEMS Workspace and |
---|
| 637 | * the C Program Heap. On many BSPs, these can be optionally |
---|
| 638 | * combined provided one larger memory pool. This is particularly |
---|
| 639 | * useful in combination with the unlimited objects configuration. |
---|
| 640 | */ |
---|
| 641 | #ifdef CONFIGURE_UNIFIED_WORK_AREAS |
---|
| 642 | #include <rtems/score/wkspace.h> |
---|
| 643 | Heap_Control *RTEMS_Malloc_Heap = &_Workspace_Area; |
---|
| 644 | bool rtems_unified_work_area = true; |
---|
| 645 | #else |
---|
| 646 | Heap_Control RTEMS_Malloc_Area; |
---|
| 647 | Heap_Control *RTEMS_Malloc_Heap = &RTEMS_Malloc_Area; |
---|
| 648 | bool rtems_unified_work_area = false; |
---|
| 649 | #endif |
---|
| 650 | #endif |
---|
| 651 | |
---|
[cfcc4e20] | 652 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 653 | /** |
---|
| 654 | * This configures the malloc family statistics to be available. |
---|
| 655 | * By default only function call counts are kept. |
---|
| 656 | */ |
---|
[cfcc4e20] | 657 | rtems_malloc_statistics_functions_t *rtems_malloc_statistics_helpers = |
---|
| 658 | #ifndef CONFIGURE_MALLOC_STATISTICS |
---|
| 659 | NULL; |
---|
| 660 | #else |
---|
| 661 | &rtems_malloc_statistics_helpers_table; |
---|
| 662 | #endif |
---|
| 663 | #endif |
---|
| 664 | |
---|
| 665 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 666 | /** |
---|
| 667 | * This configures the sbrk() support for the malloc family. |
---|
| 668 | * By default it is assumed that the BSP provides all available |
---|
| 669 | * RAM to the malloc family implementation so sbrk()'ing to get |
---|
| 670 | * more memory would always fail anyway. |
---|
| 671 | */ |
---|
[cfcc4e20] | 672 | rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers = |
---|
| 673 | #ifndef CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK |
---|
| 674 | NULL; |
---|
| 675 | #else |
---|
| 676 | &rtems_malloc_sbrk_helpers_table; |
---|
| 677 | #endif |
---|
| 678 | #endif |
---|
| 679 | |
---|
[bfc54b0] | 680 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 681 | /** |
---|
| 682 | * This configures the malloc family plugin which dirties memory |
---|
| 683 | * allocated. This is helpful for finding unitialized data structure |
---|
[28352fae] | 684 | * problems. |
---|
[5877cc3a] | 685 | */ |
---|
[654169d] | 686 | rtems_malloc_dirtier_t rtems_malloc_dirty_helper = |
---|
[bfc54b0] | 687 | #if defined(CONFIGURE_MALLOC_DIRTY) |
---|
| 688 | rtems_malloc_dirty_memory; |
---|
| 689 | #else |
---|
| 690 | NULL; |
---|
| 691 | #endif |
---|
| 692 | #endif |
---|
| 693 | |
---|
[5877cc3a] | 694 | /** |
---|
| 695 | * This is a helper macro used in calculations in this file. It is used |
---|
| 696 | * to noted when an element is allocated from the RTEMS Workspace and adds |
---|
| 697 | * a factor to account for heap overhead plus an alignment factor that |
---|
| 698 | * may be applied. |
---|
| 699 | */ |
---|
| 700 | #define _Configure_From_workspace(_size) \ |
---|
[4c09f4b] | 701 | (ssize_t)((_size) + (2 * sizeof(uint32_t)) + CPU_ALIGNMENT) |
---|
[5877cc3a] | 702 | |
---|
[dee98ce] | 703 | /** |
---|
| 704 | * Do not use the unlimited bit as part of the multiplication |
---|
| 705 | * for memory usage. |
---|
| 706 | */ |
---|
| 707 | #define _Configure_Max_Objects(_max) \ |
---|
| 708 | ((_max) & ~RTEMS_UNLIMITED_OBJECTS) |
---|
| 709 | |
---|
[5877cc3a] | 710 | /** |
---|
[28352fae] | 711 | * This macro accounts for how memory for a set of configured objects is |
---|
| 712 | * allocated from the Executive Workspace. |
---|
[5877cc3a] | 713 | * |
---|
| 714 | * NOTE: It does NOT attempt to address the more complex case of unlimited |
---|
| 715 | * objects. |
---|
| 716 | */ |
---|
| 717 | #define _Configure_Object_RAM(_number, _size) \ |
---|
[dee98ce] | 718 | ( _Configure_From_workspace(_Configure_Max_Objects(_number) * (_size)) + \ |
---|
[5877cc3a] | 719 | _Configure_From_workspace( \ |
---|
[dee98ce] | 720 | ((_Configure_Max_Objects(_number) + 1) * sizeof(Objects_Control *)) + \ |
---|
[5877cc3a] | 721 | (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) \ |
---|
| 722 | ) \ |
---|
| 723 | ) |
---|
| 724 | |
---|
[08bae5e6] | 725 | /* |
---|
| 726 | * Default User Initialization Task Table. This table guarantees that |
---|
| 727 | * one user initialization table is defined. |
---|
| 728 | */ |
---|
| 729 | |
---|
[be1c11ed] | 730 | #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
| 731 | |
---|
| 732 | #ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE |
---|
| 733 | |
---|
| 734 | /* |
---|
[8486081] | 735 | * The user is defining their own table information and setting the |
---|
[be1c11ed] | 736 | * appropriate variables. |
---|
| 737 | */ |
---|
| 738 | |
---|
| 739 | #else |
---|
[08bae5e6] | 740 | |
---|
| 741 | #ifndef CONFIGURE_INIT_TASK_NAME |
---|
[5877cc3a] | 742 | #define CONFIGURE_INIT_TASK_NAME rtems_build_name('U', 'I', '1', ' ') |
---|
[08bae5e6] | 743 | #endif |
---|
| 744 | |
---|
| 745 | #ifndef CONFIGURE_INIT_TASK_STACK_SIZE |
---|
[ecf0f4c] | 746 | #define CONFIGURE_INIT_TASK_STACK_SIZE CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[08bae5e6] | 747 | #endif |
---|
| 748 | |
---|
| 749 | #ifndef CONFIGURE_INIT_TASK_PRIORITY |
---|
[5877cc3a] | 750 | #define CONFIGURE_INIT_TASK_PRIORITY 1 |
---|
[08bae5e6] | 751 | #endif |
---|
| 752 | |
---|
| 753 | #ifndef CONFIGURE_INIT_TASK_ATTRIBUTES |
---|
[5877cc3a] | 754 | #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES |
---|
[08bae5e6] | 755 | #endif |
---|
| 756 | |
---|
| 757 | #ifndef CONFIGURE_INIT_TASK_ENTRY_POINT |
---|
[d8b74dbe] | 758 | #ifdef __cplusplus |
---|
| 759 | extern "C" { |
---|
| 760 | #endif |
---|
| 761 | rtems_task Init (rtems_task_argument ); |
---|
| 762 | #ifdef __cplusplus |
---|
| 763 | } |
---|
| 764 | #endif |
---|
[5877cc3a] | 765 | #define CONFIGURE_INIT_TASK_ENTRY_POINT Init |
---|
[d8b74dbe] | 766 | extern const char* bsp_boot_cmdline; |
---|
| 767 | #define CONFIGURE_INIT_TASK_ARGUMENTS ((rtems_task_argument) &bsp_boot_cmdline) |
---|
[08bae5e6] | 768 | #endif |
---|
| 769 | |
---|
| 770 | #ifndef CONFIGURE_INIT_TASK_INITIAL_MODES |
---|
[5877cc3a] | 771 | #define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT |
---|
[08bae5e6] | 772 | #endif |
---|
| 773 | |
---|
| 774 | #ifndef CONFIGURE_INIT_TASK_ARGUMENTS |
---|
[5877cc3a] | 775 | #define CONFIGURE_INIT_TASK_ARGUMENTS 0 |
---|
[08bae5e6] | 776 | #endif |
---|
| 777 | |
---|
| 778 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 779 | rtems_initialization_tasks_table Initialization_tasks[] = { |
---|
| 780 | { CONFIGURE_INIT_TASK_NAME, |
---|
| 781 | CONFIGURE_INIT_TASK_STACK_SIZE, |
---|
| 782 | CONFIGURE_INIT_TASK_PRIORITY, |
---|
| 783 | CONFIGURE_INIT_TASK_ATTRIBUTES, |
---|
| 784 | CONFIGURE_INIT_TASK_ENTRY_POINT, |
---|
| 785 | CONFIGURE_INIT_TASK_INITIAL_MODES, |
---|
| 786 | CONFIGURE_INIT_TASK_ARGUMENTS |
---|
| 787 | } |
---|
| 788 | }; |
---|
[08bae5e6] | 789 | #endif |
---|
| 790 | |
---|
[d9a0689e] | 791 | #define CONFIGURE_INIT_TASK_TABLE Initialization_tasks |
---|
| 792 | |
---|
| 793 | #define CONFIGURE_INIT_TASK_TABLE_SIZE \ |
---|
| 794 | sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table) |
---|
| 795 | |
---|
[be1c11ed] | 796 | #endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */ |
---|
| 797 | |
---|
| 798 | #else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */ |
---|
| 799 | |
---|
| 800 | #define CONFIGURE_INIT_TASK_TABLE NULL |
---|
| 801 | #define CONFIGURE_INIT_TASK_TABLE_SIZE 0 |
---|
[45c3da3] | 802 | #define CONFIGURE_INIT_TASK_STACK_SIZE 0 |
---|
[be1c11ed] | 803 | |
---|
[08bae5e6] | 804 | #endif |
---|
| 805 | |
---|
| 806 | /* |
---|
| 807 | * Default Device Driver Table. Each driver needed by the test is explicitly |
---|
| 808 | * choosen by that test. There is always a null driver entry. |
---|
| 809 | */ |
---|
| 810 | |
---|
| 811 | #define NULL_DRIVER_TABLE_ENTRY \ |
---|
| 812 | { NULL, NULL, NULL, NULL, NULL, NULL } |
---|
| 813 | |
---|
[df49c60] | 814 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
[5877cc3a] | 815 | #include <rtems/console.h> |
---|
[df49c60] | 816 | #endif |
---|
| 817 | |
---|
| 818 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
[5877cc3a] | 819 | #include <rtems/clockdrv.h> |
---|
[df49c60] | 820 | #endif |
---|
| 821 | |
---|
| 822 | #ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER |
---|
[5877cc3a] | 823 | #include <rtems/timerdrv.h> |
---|
[08bae5e6] | 824 | #endif |
---|
| 825 | |
---|
[1d4bac9] | 826 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
[5877cc3a] | 827 | #include <rtems/rtc.h> |
---|
[1d4bac9] | 828 | #endif |
---|
| 829 | |
---|
[d2018f71] | 830 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
[5877cc3a] | 831 | #include <rtems/watchdogdrv.h> |
---|
[d2018f71] | 832 | #endif |
---|
| 833 | |
---|
[ad4759ab] | 834 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 835 | #include <rtems/framebuffer.h> |
---|
| 836 | #endif |
---|
| 837 | |
---|
[df49c60] | 838 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
[5877cc3a] | 839 | #include <rtems/devnull.h> |
---|
[08bae5e6] | 840 | #endif |
---|
| 841 | |
---|
[c9b005a9] | 842 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 843 | /* the ide driver needs the ATA driver */ |
---|
[5877cc3a] | 844 | #ifndef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 845 | #define CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 846 | #endif |
---|
| 847 | #include <libchip/ide_ctrl.h> |
---|
[c9b005a9] | 848 | #endif |
---|
| 849 | |
---|
| 850 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
[5877cc3a] | 851 | #include <libchip/ata.h> |
---|
[c9b005a9] | 852 | #endif |
---|
| 853 | |
---|
[08bae5e6] | 854 | #ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE |
---|
| 855 | |
---|
| 856 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 857 | rtems_driver_address_table Device_drivers[] = { |
---|
[09daf222] | 858 | #ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS |
---|
| 859 | CONFIGURE_BSP_PREREQUISITE_DRIVERS, |
---|
| 860 | #endif |
---|
| 861 | #ifdef CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS |
---|
| 862 | CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS, |
---|
| 863 | #endif |
---|
[5877cc3a] | 864 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
| 865 | CONSOLE_DRIVER_TABLE_ENTRY, |
---|
| 866 | #endif |
---|
| 867 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
| 868 | CLOCK_DRIVER_TABLE_ENTRY, |
---|
| 869 | #endif |
---|
| 870 | #ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER |
---|
| 871 | RTC_DRIVER_TABLE_ENTRY, |
---|
| 872 | #endif |
---|
| 873 | #ifdef CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER |
---|
| 874 | WATCHDOG_DRIVER_TABLE_ENTRY, |
---|
| 875 | #endif |
---|
| 876 | #ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER |
---|
| 877 | DEVNULL_DRIVER_TABLE_ENTRY, |
---|
| 878 | #endif |
---|
| 879 | #ifdef CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER |
---|
| 880 | IDE_CONTROLLER_DRIVER_TABLE_ENTRY, |
---|
| 881 | #endif |
---|
| 882 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 883 | ATA_DRIVER_TABLE_ENTRY, |
---|
| 884 | #endif |
---|
[ad4759ab] | 885 | #ifdef CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER |
---|
| 886 | FRAME_BUFFER_DRIVER_TABLE_ENTRY, |
---|
| 887 | #endif |
---|
[5877cc3a] | 888 | #ifdef CONFIGURE_APPLICATION_EXTRA_DRIVERS |
---|
| 889 | CONFIGURE_APPLICATION_EXTRA_DRIVERS, |
---|
| 890 | #endif |
---|
| 891 | #ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER |
---|
| 892 | NULL_DRIVER_TABLE_ENTRY |
---|
| 893 | #elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ |
---|
[4175abd] | 894 | !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 895 | !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ |
---|
| 896 | !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) && \ |
---|
| 897 | !defined(CONFIGURE_APPLICATION_NEEDS_IDE_DRIVER) && \ |
---|
| 898 | !defined(CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER) && \ |
---|
[ad4759ab] | 899 | !defined(CONFIGURE_APPLICATION_NEEDS_FRAME_BUFFER_DRIVER) && \ |
---|
[4175abd] | 900 | !defined(CONFIGURE_APPLICATION_EXTRA_DRIVERS) |
---|
[5877cc3a] | 901 | NULL_DRIVER_TABLE_ENTRY |
---|
| 902 | #endif |
---|
| 903 | }; |
---|
[08bae5e6] | 904 | #endif |
---|
| 905 | |
---|
| 906 | #endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE */ |
---|
| 907 | |
---|
[059a3714] | 908 | /* |
---|
| 909 | * Default the number of drivers per node. This value may be |
---|
| 910 | * overridden by the user. |
---|
| 911 | */ |
---|
| 912 | |
---|
[96e6a86c] | 913 | #define CONFIGURE_NUMBER_OF_DRIVERS \ |
---|
| 914 | ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table))) |
---|
| 915 | |
---|
[5877cc3a] | 916 | /** |
---|
| 917 | * This specifies the maximum number of device drivers that |
---|
| 918 | * can be installed in the system at one time. It must account |
---|
| 919 | * for both the statically and dynamically installed drivers. |
---|
| 920 | */ |
---|
[059a3714] | 921 | #ifndef CONFIGURE_MAXIMUM_DRIVERS |
---|
[5877cc3a] | 922 | #define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS |
---|
[059a3714] | 923 | #endif |
---|
| 924 | |
---|
[08bae5e6] | 925 | |
---|
[c9b005a9] | 926 | #ifdef CONFIGURE_APPLICATION_NEEDS_ATA_DRIVER |
---|
| 927 | /* |
---|
| 928 | * configure the priority of the ATA driver task |
---|
| 929 | */ |
---|
[5877cc3a] | 930 | #ifndef CONFIGURE_ATA_DRIVER_TASK_PRIORITY |
---|
| 931 | #define CONFIGURE_ATA_DRIVER_TASK_PRIORITY ATA_DRIVER_TASK_DEFAULT_PRIORITY |
---|
| 932 | #endif |
---|
| 933 | #ifdef CONFIGURE_INIT |
---|
[3899a537] | 934 | rtems_task_priority rtems_ata_driver_task_priority |
---|
[5877cc3a] | 935 | = CONFIGURE_ATA_DRIVER_TASK_PRIORITY; |
---|
| 936 | #endif /* CONFIGURE_INIT */ |
---|
[c9b005a9] | 937 | #endif |
---|
| 938 | |
---|
| 939 | /* |
---|
| 940 | * add bdbuf configuration and values for swapout task priority |
---|
| 941 | */ |
---|
| 942 | #ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
[5877cc3a] | 943 | #include <rtems/bdbuf.h> |
---|
| 944 | /* |
---|
[3899a537] | 945 | * configure the bdbuf cache parameters |
---|
[5877cc3a] | 946 | */ |
---|
[3899a537] | 947 | #ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS |
---|
| 948 | #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \ |
---|
| 949 | RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT |
---|
| 950 | #endif |
---|
| 951 | #ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS |
---|
| 952 | #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \ |
---|
| 953 | RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT |
---|
| 954 | #endif |
---|
[5877cc3a] | 955 | #ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY |
---|
[3899a537] | 956 | #define CONFIGURE_SWAPOUT_TASK_PRIORITY \ |
---|
| 957 | RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT |
---|
| 958 | #endif |
---|
| 959 | #ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD |
---|
| 960 | #define CONFIGURE_SWAPOUT_SWAP_PERIOD \ |
---|
| 961 | RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT |
---|
| 962 | #endif |
---|
| 963 | #ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD |
---|
| 964 | #define CONFIGURE_SWAPOUT_BLOCK_HOLD \ |
---|
| 965 | RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT |
---|
[5877cc3a] | 966 | #endif |
---|
[0d15414e] | 967 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS |
---|
| 968 | #define CONFIGURE_SWAPOUT_WORKER_TASKS \ |
---|
| 969 | RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT |
---|
| 970 | #endif |
---|
| 971 | #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY |
---|
| 972 | #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \ |
---|
| 973 | RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT |
---|
| 974 | #endif |
---|
| 975 | #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE |
---|
| 976 | #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \ |
---|
| 977 | RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT |
---|
| 978 | #endif |
---|
| 979 | #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE |
---|
| 980 | #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \ |
---|
| 981 | RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT |
---|
| 982 | #endif |
---|
| 983 | #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE |
---|
| 984 | #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \ |
---|
| 985 | RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT |
---|
| 986 | #endif |
---|
[5877cc3a] | 987 | #ifdef CONFIGURE_INIT |
---|
[28352fae] | 988 | const rtems_bdbuf_config rtems_bdbuf_configuration = { |
---|
[3899a537] | 989 | CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS, |
---|
| 990 | CONFIGURE_BDBUF_MAX_WRITE_BLOCKS, |
---|
| 991 | CONFIGURE_SWAPOUT_TASK_PRIORITY, |
---|
| 992 | CONFIGURE_SWAPOUT_SWAP_PERIOD, |
---|
[0d15414e] | 993 | CONFIGURE_SWAPOUT_BLOCK_HOLD, |
---|
| 994 | CONFIGURE_SWAPOUT_WORKER_TASKS, |
---|
| 995 | CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY, |
---|
| 996 | CONFIGURE_BDBUF_CACHE_MEMORY_SIZE, |
---|
| 997 | CONFIGURE_BDBUF_BUFFER_MIN_SIZE, |
---|
| 998 | CONFIGURE_BDBUF_BUFFER_MAX_SIZE |
---|
[3899a537] | 999 | }; |
---|
[5877cc3a] | 1000 | #endif |
---|
[b2f216e1] | 1001 | |
---|
| 1002 | /* |
---|
| 1003 | * Semaphores: |
---|
| 1004 | * o disk lock |
---|
| 1005 | * o bdbuf lock |
---|
| 1006 | * o bdbuf sync lock |
---|
| 1007 | * o bdbuf access condition |
---|
| 1008 | * o bdbuf transfer condition |
---|
| 1009 | * o bdbuf buffer condition |
---|
| 1010 | */ |
---|
| 1011 | #define CONFIGURE_LIBBLOCK_SEMAPHORES 6 |
---|
| 1012 | |
---|
[0d15414e] | 1013 | #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \ |
---|
| 1014 | defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \ |
---|
| 1015 | defined(CONFIGURE_BDBUF_BUFFER_COUNT) |
---|
| 1016 | #error BDBUF Cache does not use a buffer configuration table. Please remove. |
---|
| 1017 | #endif |
---|
[b2f216e1] | 1018 | #else |
---|
| 1019 | #define CONFIGURE_LIBBLOCK_SEMAPHORES 0 |
---|
[c9b005a9] | 1020 | #endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */ |
---|
[976162a6] | 1021 | |
---|
| 1022 | #if defined(RTEMS_MULTIPROCESSING) |
---|
[5877cc3a] | 1023 | /* |
---|
| 1024 | * Default Multiprocessing Configuration Table. The defaults are |
---|
| 1025 | * appropriate for most of the RTEMS Multiprocessor Test Suite. Each |
---|
| 1026 | * value may be overridden within each test to customize the environment. |
---|
| 1027 | */ |
---|
[08bae5e6] | 1028 | |
---|
[5877cc3a] | 1029 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[f0f450a] | 1030 | #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 1 |
---|
| 1031 | |
---|
[5877cc3a] | 1032 | #ifndef CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE |
---|
[08bae5e6] | 1033 | |
---|
[5877cc3a] | 1034 | #ifndef CONFIGURE_MP_NODE_NUMBER |
---|
| 1035 | #define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER |
---|
| 1036 | #endif |
---|
[08bae5e6] | 1037 | |
---|
[5877cc3a] | 1038 | #ifndef CONFIGURE_MP_MAXIMUM_NODES |
---|
[4175abd] | 1039 | #define CONFIGURE_MP_MAXIMUM_NODES 2 |
---|
[5877cc3a] | 1040 | #endif |
---|
[08bae5e6] | 1041 | |
---|
[5877cc3a] | 1042 | #ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS |
---|
[4175abd] | 1043 | #define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32 |
---|
[5877cc3a] | 1044 | #endif |
---|
[f2a776ac] | 1045 | #define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \ |
---|
[4175abd] | 1046 | _Configure_Object_RAM((_global_objects), sizeof(Objects_MP_Control)) |
---|
[08bae5e6] | 1047 | |
---|
[5877cc3a] | 1048 | #ifndef CONFIGURE_MP_MAXIMUM_PROXIES |
---|
[4175abd] | 1049 | #define CONFIGURE_MP_MAXIMUM_PROXIES 32 |
---|
[5877cc3a] | 1050 | #endif |
---|
[f2a776ac] | 1051 | #define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \ |
---|
[4175abd] | 1052 | _Configure_Object_RAM((_proxies) + 1, sizeof(Thread_Proxy_control) ) |
---|
[08bae5e6] | 1053 | |
---|
[5877cc3a] | 1054 | #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK |
---|
[4175abd] | 1055 | #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0 |
---|
[5877cc3a] | 1056 | #endif |
---|
[def9eef] | 1057 | |
---|
[5877cc3a] | 1058 | #ifndef CONFIGURE_MP_MPCI_TABLE_POINTER |
---|
[4175abd] | 1059 | #include <mpci.h> |
---|
| 1060 | #define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table |
---|
[5877cc3a] | 1061 | #endif |
---|
[08bae5e6] | 1062 | |
---|
[5877cc3a] | 1063 | #ifdef CONFIGURE_INIT |
---|
[4175abd] | 1064 | rtems_multiprocessing_table Multiprocessing_configuration = { |
---|
| 1065 | CONFIGURE_MP_NODE_NUMBER, /* local node number */ |
---|
| 1066 | CONFIGURE_MP_MAXIMUM_NODES, /* maximum # nodes */ |
---|
| 1067 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS, /* maximum # global objects */ |
---|
| 1068 | CONFIGURE_MP_MAXIMUM_PROXIES, /* maximum # proxies */ |
---|
| 1069 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK, /* MPCI stack > minimum */ |
---|
| 1070 | CONFIGURE_MP_MPCI_TABLE_POINTER /* ptr to MPCI config table */ |
---|
| 1071 | }; |
---|
[5877cc3a] | 1072 | #endif |
---|
[08bae5e6] | 1073 | |
---|
[5877cc3a] | 1074 | #define CONFIGURE_MULTIPROCESSING_TABLE &Multiprocessing_configuration |
---|
[08bae5e6] | 1075 | |
---|
[5877cc3a] | 1076 | #endif /* CONFIGURE_HAS_OWN_MULTIPROCESSING_TABLE */ |
---|
[08bae5e6] | 1077 | |
---|
[5877cc3a] | 1078 | #else |
---|
[08bae5e6] | 1079 | |
---|
[5877cc3a] | 1080 | #define CONFIGURE_MULTIPROCESSING_TABLE NULL |
---|
[08bae5e6] | 1081 | |
---|
[5877cc3a] | 1082 | #endif /* CONFIGURE_MP_APPLICATION */ |
---|
[976162a6] | 1083 | #endif /* RTEMS_MULTIPROCESSING */ |
---|
[8486081] | 1084 | |
---|
[913ede4f] | 1085 | #ifndef CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER |
---|
| 1086 | #define CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER 0 |
---|
| 1087 | #endif |
---|
| 1088 | |
---|
| 1089 | |
---|
[08bae5e6] | 1090 | /* |
---|
[8486081] | 1091 | * Default Configuration Table. |
---|
[08bae5e6] | 1092 | */ |
---|
| 1093 | |
---|
| 1094 | #ifndef CONFIGURE_HAS_OWN_CONFIGURATION_TABLE |
---|
[8486081] | 1095 | |
---|
[5877cc3a] | 1096 | #ifndef CONFIGURE_MAXIMUM_TASKS |
---|
| 1097 | #define CONFIGURE_MAXIMUM_TASKS 0 |
---|
| 1098 | #endif |
---|
[08bae5e6] | 1099 | |
---|
[4cb19041] | 1100 | #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS |
---|
[f2a776ac] | 1101 | #define CONFIGURE_NOTEPADS_ENABLED TRUE |
---|
| 1102 | #else |
---|
[4cb19041] | 1103 | #define CONFIGURE_NOTEPADS_ENABLED FALSE |
---|
[f2a776ac] | 1104 | #endif |
---|
| 1105 | |
---|
[7a09a7a] | 1106 | #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS |
---|
[f2a776ac] | 1107 | #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \ |
---|
[94a88c1c] | 1108 | _Configure_From_workspace( sizeof(RTEMS_API_Control) ) |
---|
[4cb19041] | 1109 | #else |
---|
[f2a776ac] | 1110 | #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \ |
---|
[94a88c1c] | 1111 | _Configure_From_workspace( sizeof(RTEMS_API_Control) - \ |
---|
| 1112 | (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t))) |
---|
[4cb19041] | 1113 | #endif |
---|
| 1114 | |
---|
[f2a776ac] | 1115 | /** |
---|
| 1116 | * This macro calculates the memory required for task variables. |
---|
| 1117 | * |
---|
| 1118 | * @note Each task variable is individually allocated from the Workspace. |
---|
| 1119 | * Hence, we do the multiplication on the configured size. |
---|
| 1120 | */ |
---|
[5877cc3a] | 1121 | #ifndef CONFIGURE_MAXIMUM_TASK_VARIABLES |
---|
[f2a776ac] | 1122 | #define CONFIGURE_MAXIMUM_TASK_VARIABLES 0 |
---|
| 1123 | #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) 0 |
---|
| 1124 | #else |
---|
| 1125 | #define CONFIGURE_MEMORY_FOR_TASK_VARIABLES(_task_variables) \ |
---|
| 1126 | (_task_variables) * \ |
---|
| 1127 | _Configure_From_workspace(sizeof(rtems_task_variable_t)) |
---|
[5877cc3a] | 1128 | #endif |
---|
[08bae5e6] | 1129 | |
---|
[5877cc3a] | 1130 | #ifndef CONFIGURE_MAXIMUM_TIMERS |
---|
[f2a776ac] | 1131 | #define CONFIGURE_MAXIMUM_TIMERS 0 |
---|
| 1132 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) 0 |
---|
| 1133 | #else |
---|
| 1134 | #define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \ |
---|
| 1135 | _Configure_Object_RAM(_timers, sizeof(Timer_Control) ) |
---|
[5877cc3a] | 1136 | #endif |
---|
[08bae5e6] | 1137 | |
---|
[5877cc3a] | 1138 | #ifndef CONFIGURE_MAXIMUM_SEMAPHORES |
---|
[f2a776ac] | 1139 | #define CONFIGURE_MAXIMUM_SEMAPHORES 0 |
---|
| 1140 | #endif |
---|
| 1141 | |
---|
[b2f216e1] | 1142 | #define CONFIGURE_SEMAPHORES \ |
---|
| 1143 | (CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \ |
---|
| 1144 | CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES) |
---|
| 1145 | |
---|
[f2a776ac] | 1146 | /* |
---|
| 1147 | * If there are no user or support semaphores defined, then we can assume |
---|
| 1148 | * that no memory need be allocated at all for semaphores. |
---|
| 1149 | */ |
---|
[b2f216e1] | 1150 | #if CONFIGURE_SEMAPHORES == 0 |
---|
[f2a776ac] | 1151 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) 0 |
---|
| 1152 | #else |
---|
| 1153 | #define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \ |
---|
| 1154 | _Configure_Object_RAM(_semaphores, sizeof(Semaphore_Control) ) |
---|
[5877cc3a] | 1155 | #endif |
---|
[08bae5e6] | 1156 | |
---|
[5877cc3a] | 1157 | #ifndef CONFIGURE_MAXIMUM_MESSAGE_QUEUES |
---|
[f2a776ac] | 1158 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 0 |
---|
| 1159 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) 0 |
---|
| 1160 | #else |
---|
| 1161 | #define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \ |
---|
| 1162 | _Configure_Object_RAM(_queues, sizeof(Message_queue_Control) ) |
---|
[5877cc3a] | 1163 | #endif |
---|
[08bae5e6] | 1164 | |
---|
[5877cc3a] | 1165 | #ifndef CONFIGURE_MAXIMUM_PARTITIONS |
---|
[f2a776ac] | 1166 | #define CONFIGURE_MAXIMUM_PARTITIONS 0 |
---|
| 1167 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) 0 |
---|
| 1168 | #else |
---|
| 1169 | #define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \ |
---|
| 1170 | _Configure_Object_RAM(_partitions, sizeof(Partition_Control) ) |
---|
[5877cc3a] | 1171 | #endif |
---|
[08bae5e6] | 1172 | |
---|
[5877cc3a] | 1173 | #ifndef CONFIGURE_MAXIMUM_REGIONS |
---|
[f2a776ac] | 1174 | #define CONFIGURE_MAXIMUM_REGIONS 0 |
---|
| 1175 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) 0 |
---|
| 1176 | #else |
---|
| 1177 | #define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \ |
---|
| 1178 | _Configure_Object_RAM(_regions, sizeof(Region_Control) ) |
---|
[5877cc3a] | 1179 | #endif |
---|
[08bae5e6] | 1180 | |
---|
[5877cc3a] | 1181 | #ifndef CONFIGURE_MAXIMUM_PORTS |
---|
[f2a776ac] | 1182 | #define CONFIGURE_MAXIMUM_PORTS 0 |
---|
| 1183 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) 0 |
---|
| 1184 | #else |
---|
| 1185 | #define CONFIGURE_MEMORY_FOR_PORTS(_ports) \ |
---|
| 1186 | _Configure_Object_RAM(_ports, sizeof(Dual_ported_memory_Control) ) |
---|
[5877cc3a] | 1187 | #endif |
---|
[08bae5e6] | 1188 | |
---|
[5877cc3a] | 1189 | #ifndef CONFIGURE_MAXIMUM_PERIODS |
---|
[f2a776ac] | 1190 | #define CONFIGURE_MAXIMUM_PERIODS 0 |
---|
| 1191 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) 0 |
---|
| 1192 | #else |
---|
| 1193 | #define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \ |
---|
| 1194 | _Configure_Object_RAM(_periods, sizeof(Rate_monotonic_Control) ) |
---|
[5877cc3a] | 1195 | #endif |
---|
[7fa1ce86] | 1196 | |
---|
[5877cc3a] | 1197 | #ifndef CONFIGURE_MAXIMUM_BARRIERS |
---|
[f2a776ac] | 1198 | #define CONFIGURE_MAXIMUM_BARRIERS 0 |
---|
| 1199 | #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) 0 |
---|
| 1200 | #else |
---|
| 1201 | #define CONFIGURE_MEMORY_FOR_BARRIERS(_barriers) \ |
---|
| 1202 | _Configure_Object_RAM(_barriers, sizeof(Barrier_Control) ) |
---|
[5877cc3a] | 1203 | #endif |
---|
[08bae5e6] | 1204 | |
---|
[5877cc3a] | 1205 | #ifndef CONFIGURE_MAXIMUM_USER_EXTENSIONS |
---|
[f2a776ac] | 1206 | #define CONFIGURE_MAXIMUM_USER_EXTENSIONS 0 |
---|
| 1207 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) 0 |
---|
| 1208 | #else |
---|
| 1209 | #define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \ |
---|
| 1210 | _Configure_Object_RAM(_extensions, sizeof(Extension_Control) ) |
---|
[5877cc3a] | 1211 | #endif |
---|
[08bae5e6] | 1212 | |
---|
[5877cc3a] | 1213 | #ifndef CONFIGURE_MICROSECONDS_PER_TICK |
---|
| 1214 | #define CONFIGURE_MICROSECONDS_PER_TICK \ |
---|
| 1215 | RTEMS_MILLISECONDS_TO_MICROSECONDS(10) |
---|
| 1216 | #endif |
---|
| 1217 | |
---|
| 1218 | #ifndef CONFIGURE_TICKS_PER_TIMESLICE |
---|
| 1219 | #define CONFIGURE_TICKS_PER_TIMESLICE 50 |
---|
| 1220 | #endif |
---|
[08bae5e6] | 1221 | |
---|
[0451b44] | 1222 | /* |
---|
| 1223 | * Initial Extension Set |
---|
| 1224 | */ |
---|
| 1225 | |
---|
| 1226 | #ifdef CONFIGURE_INIT |
---|
[4afd6f4] | 1227 | #ifdef CONFIGURE_STACK_CHECKER_ENABLED |
---|
[31bce9b] | 1228 | #include <rtems/stackchk.h> |
---|
[0451b44] | 1229 | #endif |
---|
[c3db01d0] | 1230 | #include <rtems/libcsupport.h> |
---|
[0451b44] | 1231 | |
---|
[96e6a86c] | 1232 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) || \ |
---|
[4afd6f4] | 1233 | defined(CONFIGURE_STACK_CHECKER_ENABLED) || \ |
---|
[c3db01d0] | 1234 | (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
| 1235 | rtems_extensions_table Configuration_Initial_Extensions[] = { |
---|
| 1236 | #if !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) |
---|
| 1237 | RTEMS_NEWLIB_EXTENSION, |
---|
| 1238 | #endif |
---|
[4afd6f4] | 1239 | #if defined(CONFIGURE_STACK_CHECKER_ENABLED) |
---|
[c3db01d0] | 1240 | RTEMS_STACK_CHECKER_EXTENSION, |
---|
| 1241 | #endif |
---|
| 1242 | #if defined(CONFIGURE_INITIAL_EXTENSIONS) |
---|
| 1243 | CONFIGURE_INITIAL_EXTENSIONS, |
---|
| 1244 | #endif |
---|
| 1245 | }; |
---|
| 1246 | |
---|
| 1247 | #define CONFIGURE_INITIAL_EXTENSION_TABLE Configuration_Initial_Extensions |
---|
| 1248 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS \ |
---|
| 1249 | ((sizeof(Configuration_Initial_Extensions) / \ |
---|
| 1250 | sizeof(rtems_extensions_table))) |
---|
[96e6a86c] | 1251 | #else |
---|
[c3db01d0] | 1252 | #define CONFIGURE_INITIAL_EXTENSION_TABLE NULL |
---|
| 1253 | #define CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS 0 |
---|
[96e6a86c] | 1254 | #endif |
---|
| 1255 | |
---|
[0451b44] | 1256 | |
---|
[08bae5e6] | 1257 | #endif |
---|
| 1258 | |
---|
[2eba45d] | 1259 | /* |
---|
| 1260 | * POSIX API Configuration Parameters |
---|
| 1261 | */ |
---|
| 1262 | |
---|
| 1263 | #ifdef RTEMS_POSIX_API |
---|
| 1264 | |
---|
[5877cc3a] | 1265 | #include <sys/types.h> |
---|
| 1266 | #include <signal.h> |
---|
| 1267 | #include <limits.h> |
---|
| 1268 | #include <mqueue.h> |
---|
| 1269 | #include <rtems/posix/barrier.h> |
---|
| 1270 | #include <rtems/posix/cond.h> |
---|
| 1271 | #include <rtems/posix/mqueue.h> |
---|
| 1272 | #include <rtems/posix/mutex.h> |
---|
| 1273 | #include <rtems/posix/key.h> |
---|
| 1274 | #include <rtems/posix/psignal.h> |
---|
| 1275 | #include <rtems/posix/rwlock.h> |
---|
| 1276 | #include <rtems/posix/semaphore.h> |
---|
| 1277 | #include <rtems/posix/spinlock.h> |
---|
| 1278 | #include <rtems/posix/threadsup.h> |
---|
| 1279 | #include <rtems/posix/timer.h> |
---|
| 1280 | |
---|
[f2a776ac] | 1281 | /** |
---|
| 1282 | * Account for the object control structures plus the name |
---|
| 1283 | * of the object to be duplicated. |
---|
| 1284 | */ |
---|
| 1285 | #define _Configure_POSIX_Named_Object_RAM(_number, _size) \ |
---|
| 1286 | _Configure_Object_RAM( (_number), _size ) + \ |
---|
| 1287 | ((_number) + _Configure_From_workspace(NAME_MAX) ) |
---|
| 1288 | |
---|
[5877cc3a] | 1289 | #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS |
---|
| 1290 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 1291 | #endif |
---|
[2eba45d] | 1292 | |
---|
[f2a776ac] | 1293 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ |
---|
[4175abd] | 1294 | _Configure_From_workspace( \ |
---|
[f2a776ac] | 1295 | sizeof (POSIX_API_Control) + \ |
---|
| 1296 | (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \ |
---|
| 1297 | ) |
---|
| 1298 | |
---|
[5877cc3a] | 1299 | #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES |
---|
[f2a776ac] | 1300 | #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 |
---|
| 1301 | #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) 0 |
---|
| 1302 | #else |
---|
| 1303 | #define CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \ |
---|
| 1304 | _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) ) |
---|
[5877cc3a] | 1305 | #endif |
---|
[2eba45d] | 1306 | |
---|
[5877cc3a] | 1307 | #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES |
---|
[f2a776ac] | 1308 | #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0 |
---|
| 1309 | #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) 0 |
---|
| 1310 | #else |
---|
| 1311 | #define CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \ |
---|
| 1312 | _Configure_Object_RAM(_condvars, \ |
---|
[4175abd] | 1313 | sizeof(POSIX_Condition_variables_Control) ) |
---|
[5877cc3a] | 1314 | #endif |
---|
[2eba45d] | 1315 | |
---|
[5877cc3a] | 1316 | #ifndef CONFIGURE_MAXIMUM_POSIX_KEYS |
---|
[f2a776ac] | 1317 | #define CONFIGURE_MAXIMUM_POSIX_KEYS 0 |
---|
| 1318 | #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) 0 |
---|
| 1319 | #else |
---|
| 1320 | #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \ |
---|
| 1321 | _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) |
---|
[5877cc3a] | 1322 | #endif |
---|
[da33d26] | 1323 | |
---|
[5877cc3a] | 1324 | #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS |
---|
[f2a776ac] | 1325 | #define CONFIGURE_MAXIMUM_POSIX_TIMERS 0 |
---|
| 1326 | #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) 0 |
---|
| 1327 | #else |
---|
| 1328 | #define CONFIGURE_MEMORY_FOR_POSIX_TIMERS(_timers) \ |
---|
| 1329 | _Configure_Object_RAM(_timers, sizeof(POSIX_Timer_Control) ) |
---|
[5877cc3a] | 1330 | #endif |
---|
[0747e2d] | 1331 | |
---|
[5877cc3a] | 1332 | #ifndef CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS |
---|
[f2a776ac] | 1333 | #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 0 |
---|
| 1334 | #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) 0 |
---|
| 1335 | #else |
---|
| 1336 | #define CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(_queued_signals) \ |
---|
| 1337 | _Configure_From_workspace( \ |
---|
[4175abd] | 1338 | (_queued_signals) * (sizeof(POSIX_signals_Siginfo_node)) ) |
---|
[5877cc3a] | 1339 | #endif |
---|
[eb0551f] | 1340 | |
---|
[5877cc3a] | 1341 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
[f2a776ac] | 1342 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 0 |
---|
| 1343 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) 0 |
---|
[ade17392] | 1344 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS 0 |
---|
[2b558ffd] | 1345 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_fds) 0 |
---|
[f2a776ac] | 1346 | #else |
---|
| 1347 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES(_message_queues) \ |
---|
| 1348 | _Configure_POSIX_Named_Object_RAM( \ |
---|
[4175abd] | 1349 | _message_queues, sizeof(POSIX_Message_queue_Control) ) |
---|
[ade17392] | 1350 | |
---|
| 1351 | /* default to same number */ |
---|
| 1352 | #ifndef CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS |
---|
| 1353 | #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \ |
---|
| 1354 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES |
---|
| 1355 | #endif |
---|
| 1356 | |
---|
[61ae99b] | 1357 | #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_mqueue_fds) \ |
---|
[ade17392] | 1358 | _Configure_POSIX_Named_Object_RAM( \ |
---|
| 1359 | _mqueue_fds, sizeof(POSIX_Message_queue_Control_fd) ) |
---|
[5877cc3a] | 1360 | #endif |
---|
[be0fc099] | 1361 | |
---|
[5877cc3a] | 1362 | #ifndef CONFIGURE_MAXIMUM_POSIX_SEMAPHORES |
---|
[f2a776ac] | 1363 | #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 0 |
---|
| 1364 | #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) 0 |
---|
| 1365 | #else |
---|
| 1366 | #define CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES(_semaphores) \ |
---|
| 1367 | _Configure_POSIX_Named_Object_RAM( \ |
---|
[4175abd] | 1368 | _semaphores, sizeof(POSIX_Semaphore_Control) ) |
---|
[5877cc3a] | 1369 | #endif |
---|
[be0fc099] | 1370 | |
---|
[5877cc3a] | 1371 | #ifndef CONFIGURE_MAXIMUM_POSIX_BARRIERS |
---|
[f2a776ac] | 1372 | #define CONFIGURE_MAXIMUM_POSIX_BARRIERS 0 |
---|
| 1373 | #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) 0 |
---|
| 1374 | #else |
---|
| 1375 | #define CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(_barriers) \ |
---|
| 1376 | _Configure_Object_RAM(_barriers, sizeof(POSIX_Barrier_Control) ) |
---|
[5877cc3a] | 1377 | #endif |
---|
[7fa1ce86] | 1378 | |
---|
[5877cc3a] | 1379 | #ifndef CONFIGURE_MAXIMUM_POSIX_SPINLOCKS |
---|
[f2a776ac] | 1380 | #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS 0 |
---|
| 1381 | #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) 0 |
---|
| 1382 | #else |
---|
| 1383 | #define CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS(_spinlocks) \ |
---|
| 1384 | _Configure_Object_RAM(_spinlocks, sizeof(POSIX_Spinlock_Control) ) |
---|
[5877cc3a] | 1385 | #endif |
---|
[7fa1ce86] | 1386 | |
---|
[5877cc3a] | 1387 | #ifndef CONFIGURE_MAXIMUM_POSIX_RWLOCKS |
---|
[f2a776ac] | 1388 | #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 0 |
---|
| 1389 | #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) 0 |
---|
| 1390 | #else |
---|
| 1391 | #define CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS(_rwlocks) \ |
---|
| 1392 | _Configure_Object_RAM(_rwlocks, sizeof(POSIX_RWLock_Control) ) |
---|
[5877cc3a] | 1393 | #endif |
---|
[7fa1ce86] | 1394 | |
---|
[5877cc3a] | 1395 | #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE |
---|
[be1c11ed] | 1396 | |
---|
[5877cc3a] | 1397 | #ifdef CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE |
---|
[5240c71c] | 1398 | |
---|
[5877cc3a] | 1399 | /* |
---|
| 1400 | * The user is defining their own table information and setting the |
---|
| 1401 | * appropriate variables for the POSIX Initialization Thread Table. |
---|
| 1402 | */ |
---|
[8486081] | 1403 | |
---|
[5877cc3a] | 1404 | #else |
---|
[be1c11ed] | 1405 | |
---|
[5877cc3a] | 1406 | #ifndef CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT |
---|
[4175abd] | 1407 | #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT POSIX_Init |
---|
[5877cc3a] | 1408 | #endif |
---|
[5240c71c] | 1409 | |
---|
[5877cc3a] | 1410 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
[4175abd] | 1411 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \ |
---|
[ecf0f4c] | 1412 | (CONFIGURE_MINIMUM_TASK_STACK_SIZE * 2) |
---|
[5877cc3a] | 1413 | #endif |
---|
[adbb578] | 1414 | |
---|
[5877cc3a] | 1415 | #ifdef CONFIGURE_INIT |
---|
[4175abd] | 1416 | posix_initialization_threads_table POSIX_Initialization_threads[] = { |
---|
| 1417 | { CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT, \ |
---|
| 1418 | CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE } |
---|
| 1419 | }; |
---|
[5877cc3a] | 1420 | #endif |
---|
[2eba45d] | 1421 | |
---|
[5877cc3a] | 1422 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME \ |
---|
| 1423 | POSIX_Initialization_threads |
---|
[8486081] | 1424 | |
---|
[5877cc3a] | 1425 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE \ |
---|
[4175abd] | 1426 | sizeof(CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME) / \ |
---|
| 1427 | sizeof(posix_initialization_threads_table) |
---|
[5240c71c] | 1428 | |
---|
[5877cc3a] | 1429 | #endif /* CONFIGURE_POSIX_HAS_OWN_INIT_TASK_TABLE */ |
---|
[5240c71c] | 1430 | |
---|
[5877cc3a] | 1431 | #else /* CONFIGURE_POSIX_INIT_THREAD_TABLE */ |
---|
[be1c11ed] | 1432 | |
---|
[5877cc3a] | 1433 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME NULL |
---|
| 1434 | #define CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE 0 |
---|
[be1c11ed] | 1435 | |
---|
[5877cc3a] | 1436 | #endif |
---|
[be1c11ed] | 1437 | |
---|
[5877cc3a] | 1438 | #define CONFIGURE_MEMORY_FOR_POSIX \ |
---|
[4175abd] | 1439 | ( CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ) + \ |
---|
[5877cc3a] | 1440 | CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \ |
---|
[4175abd] | 1441 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ) + \ |
---|
[5877cc3a] | 1442 | CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ) + \ |
---|
| 1443 | CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \ |
---|
[4175abd] | 1444 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ) + \ |
---|
[5877cc3a] | 1445 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( \ |
---|
[4175abd] | 1446 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ) + \ |
---|
[61ae99b] | 1447 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS( \ |
---|
| 1448 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS ) + \ |
---|
[5877cc3a] | 1449 | CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( \ |
---|
[4175abd] | 1450 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ) + \ |
---|
[5877cc3a] | 1451 | CONFIGURE_MEMORY_FOR_POSIX_BARRIERS(CONFIGURE_MAXIMUM_POSIX_BARRIERS) + \ |
---|
| 1452 | CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( \ |
---|
[4175abd] | 1453 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ) + \ |
---|
[5877cc3a] | 1454 | CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( \ |
---|
[4175abd] | 1455 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS ) + \ |
---|
[5877cc3a] | 1456 | CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ) + \ |
---|
| 1457 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE) \ |
---|
| 1458 | ) |
---|
| 1459 | #else |
---|
[352c9b2] | 1460 | |
---|
[5877cc3a] | 1461 | #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 |
---|
| 1462 | #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 0 |
---|
| 1463 | #define CONFIGURE_MEMORY_FOR_POSIX 0 |
---|
[352c9b2] | 1464 | |
---|
[5877cc3a] | 1465 | #endif /* RTEMS_POSIX_API */ |
---|
[352c9b2] | 1466 | |
---|
[5877cc3a] | 1467 | #ifndef CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE |
---|
| 1468 | #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE 0 |
---|
[352c9b2] | 1469 | #endif |
---|
| 1470 | |
---|
[5877cc3a] | 1471 | /* |
---|
| 1472 | * This block of defines are for applications which use GNAT/RTEMS. |
---|
| 1473 | * GNAT implements each Ada task as a POSIX thread. |
---|
| 1474 | */ |
---|
| 1475 | #ifdef CONFIGURE_GNAT_RTEMS |
---|
[352c9b2] | 1476 | |
---|
[5877cc3a] | 1477 | /** |
---|
| 1478 | * The GNAT run-time needs something less than (10) POSIX mutexes. |
---|
| 1479 | * We may be able to get by with less but why bother. |
---|
| 1480 | */ |
---|
| 1481 | #define CONFIGURE_GNAT_MUTEXES 10 |
---|
[352c9b2] | 1482 | |
---|
[5877cc3a] | 1483 | /** |
---|
| 1484 | * This is the maximum number of Ada tasks which can be concurrently |
---|
[28352fae] | 1485 | * in existence. Twenty (20) are required to run all tests in the |
---|
[5877cc3a] | 1486 | * ACATS (formerly ACVC). |
---|
| 1487 | */ |
---|
| 1488 | #ifndef CONFIGURE_MAXIMUM_ADA_TASKS |
---|
| 1489 | #define CONFIGURE_MAXIMUM_ADA_TASKS 20 |
---|
| 1490 | #endif |
---|
[352c9b2] | 1491 | |
---|
[5877cc3a] | 1492 | /** |
---|
| 1493 | * This is the number of non-Ada tasks which invoked Ada code. |
---|
| 1494 | */ |
---|
| 1495 | #ifndef CONFIGURE_MAXIMUM_FAKE_ADA_TASKS |
---|
| 1496 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
| 1497 | #endif |
---|
[352c9b2] | 1498 | |
---|
[5877cc3a] | 1499 | /** |
---|
| 1500 | * Ada tasks are allocated twice the minimum stack space. |
---|
| 1501 | */ |
---|
| 1502 | #define CONFIGURE_ADA_TASKS_STACK \ |
---|
[ecf0f4c] | 1503 | (CONFIGURE_MAXIMUM_ADA_TASKS * \ |
---|
| 1504 | (CONFIGURE_MINIMUM_TASK_STACK_SIZE + (6 * 1024))) |
---|
[352c9b2] | 1505 | |
---|
[5877cc3a] | 1506 | #else |
---|
| 1507 | #define CONFIGURE_GNAT_MUTEXES 0 |
---|
| 1508 | #define CONFIGURE_MAXIMUM_ADA_TASKS 0 |
---|
| 1509 | #define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0 |
---|
| 1510 | #define CONFIGURE_ADA_TASKS_STACK 0 |
---|
[352c9b2] | 1511 | #endif |
---|
| 1512 | |
---|
| 1513 | /* |
---|
[5877cc3a] | 1514 | * ITRON API Configuration Parameters |
---|
[352c9b2] | 1515 | */ |
---|
| 1516 | |
---|
[5877cc3a] | 1517 | #ifdef RTEMS_ITRON_API |
---|
[352c9b2] | 1518 | |
---|
[5877cc3a] | 1519 | #include <rtems/itron.h> |
---|
| 1520 | #include <rtems/itron/config.h> |
---|
| 1521 | #include <rtems/itron/eventflags.h> |
---|
| 1522 | #include <rtems/itron/fmempool.h> |
---|
| 1523 | #include <rtems/itron/mbox.h> |
---|
| 1524 | #include <rtems/itron/msgbuffer.h> |
---|
| 1525 | #include <rtems/itron/port.h> |
---|
| 1526 | #include <rtems/itron/semaphore.h> |
---|
| 1527 | #include <rtems/itron/task.h> |
---|
| 1528 | #include <rtems/itron/vmempool.h> |
---|
| 1529 | |
---|
| 1530 | #ifndef CONFIGURE_MAXIMUM_ITRON_TASKS |
---|
| 1531 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
| 1532 | #endif |
---|
[f2a776ac] | 1533 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
[352c9b2] | 1534 | |
---|
[5877cc3a] | 1535 | #ifndef CONFIGURE_MAXIMUM_ITRON_SEMAPHORES |
---|
[f2a776ac] | 1536 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
| 1537 | #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) 0 |
---|
| 1538 | #else |
---|
| 1539 | #define CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES(_semaphores) \ |
---|
| 1540 | _Configure_Object_RAM(_semaphores, sizeof(ITRON_Semaphore_Control)) |
---|
[5877cc3a] | 1541 | #endif |
---|
[352c9b2] | 1542 | |
---|
[5877cc3a] | 1543 | #ifndef CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS |
---|
[f2a776ac] | 1544 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
| 1545 | #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) 0 |
---|
| 1546 | #else |
---|
| 1547 | #define CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS(_eventflags) \ |
---|
| 1548 | _Configure_Object_RAM(_eventflags, sizeof(ITRON_Eventflags_Control)) |
---|
[5877cc3a] | 1549 | #endif |
---|
[352c9b2] | 1550 | |
---|
[5877cc3a] | 1551 | #ifndef CONFIGURE_MAXIMUM_ITRON_MAILBOXES |
---|
[f2a776ac] | 1552 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
| 1553 | #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) 0 |
---|
| 1554 | #else |
---|
| 1555 | #define CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES(_mailboxes) \ |
---|
| 1556 | _Configure_Object_RAM(_mailboxes, sizeof(ITRON_Mailbox_Control)) |
---|
[5877cc3a] | 1557 | #endif |
---|
[352c9b2] | 1558 | |
---|
[5877cc3a] | 1559 | #ifndef CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS |
---|
[f2a776ac] | 1560 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
| 1561 | #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) 0 |
---|
| 1562 | #else |
---|
| 1563 | #define CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS(_message_buffers) \ |
---|
| 1564 | _Configure_Object_RAM(_message_buffers, \ |
---|
[4175abd] | 1565 | sizeof(ITRON_Message_buffer_Control)) |
---|
[5877cc3a] | 1566 | #endif |
---|
[352c9b2] | 1567 | |
---|
[5877cc3a] | 1568 | #ifndef CONFIGURE_MAXIMUM_ITRON_PORTS |
---|
[f2a776ac] | 1569 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
| 1570 | #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) 0 |
---|
| 1571 | #else |
---|
| 1572 | #define CONFIGURE_MEMORY_FOR_ITRON_PORTS(_ports) \ |
---|
| 1573 | _Configure_Object_RAM(_ports, sizeof(ITRON_Port_Control)) |
---|
[5877cc3a] | 1574 | #endif |
---|
| 1575 | |
---|
| 1576 | #ifndef CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS |
---|
[f2a776ac] | 1577 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
| 1578 | #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) 0 |
---|
| 1579 | #else |
---|
| 1580 | #define CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS(_pools) \ |
---|
| 1581 | _Configure_Object_RAM( _pools, sizeof(ITRON_Variable_memory_pool_Control)) |
---|
[5877cc3a] | 1582 | #endif |
---|
[352c9b2] | 1583 | |
---|
[5877cc3a] | 1584 | #ifndef CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS |
---|
[f2a776ac] | 1585 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
| 1586 | #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) 0 |
---|
| 1587 | #else |
---|
| 1588 | #define CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS(_pools) \ |
---|
| 1589 | _Configure_Object_RAM(_pools, sizeof(ITRON_Fixed_memory_pool_Control)) |
---|
[5877cc3a] | 1590 | #endif |
---|
[352c9b2] | 1591 | |
---|
[5877cc3a] | 1592 | #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE |
---|
[352c9b2] | 1593 | |
---|
[5877cc3a] | 1594 | #ifdef CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE |
---|
[352c9b2] | 1595 | |
---|
[5877cc3a] | 1596 | /* |
---|
| 1597 | * The user is defining their own table information and setting the |
---|
| 1598 | * appropriate variables for the ITRON Initialization Task Table. |
---|
| 1599 | */ |
---|
[352c9b2] | 1600 | |
---|
[5877cc3a] | 1601 | #else |
---|
[352c9b2] | 1602 | |
---|
[5877cc3a] | 1603 | #ifndef CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT |
---|
[4175abd] | 1604 | #define CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT ITRON_Init |
---|
[5877cc3a] | 1605 | #endif |
---|
[352c9b2] | 1606 | |
---|
[5877cc3a] | 1607 | #ifndef CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES |
---|
[4175abd] | 1608 | #define CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES TA_HLNG |
---|
[5877cc3a] | 1609 | #endif |
---|
[352c9b2] | 1610 | |
---|
[5877cc3a] | 1611 | #ifndef CONFIGURE_ITRON_INIT_TASK_PRIORITY |
---|
[4175abd] | 1612 | #define CONFIGURE_ITRON_INIT_TASK_PRIORITY 1 |
---|
[5877cc3a] | 1613 | #endif |
---|
[352c9b2] | 1614 | |
---|
[5877cc3a] | 1615 | #ifndef CONFIGURE_ITRON_INIT_TASK_STACK_SIZE |
---|
[4175abd] | 1616 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \ |
---|
[ecf0f4c] | 1617 | CONFIGURE_MINIMUM_TASK_STACK_SIZE |
---|
[5877cc3a] | 1618 | #endif |
---|
[352c9b2] | 1619 | |
---|
[5877cc3a] | 1620 | #ifdef CONFIGURE_INIT |
---|
[4175abd] | 1621 | itron_initialization_tasks_table ITRON_Initialization_tasks[] = { |
---|
| 1622 | { 1, /* ID */ |
---|
| 1623 | { (VP) 0, /* exinfo */ |
---|
| 1624 | CONFIGURE_ITRON_INIT_TASK_ATTRIBUTES, /* task attributes */ |
---|
| 1625 | CONFIGURE_ITRON_INIT_TASK_ENTRY_POINT, /* task start address */ |
---|
| 1626 | CONFIGURE_ITRON_INIT_TASK_PRIORITY, /* initial task priority */ |
---|
| 1627 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE /* stack size */ |
---|
| 1628 | } |
---|
| 1629 | } |
---|
| 1630 | }; |
---|
[5877cc3a] | 1631 | #endif |
---|
[352c9b2] | 1632 | |
---|
[5877cc3a] | 1633 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME ITRON_Initialization_tasks |
---|
[352c9b2] | 1634 | |
---|
[5877cc3a] | 1635 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE \ |
---|
[4175abd] | 1636 | sizeof(CONFIGURE_ITRON_INIT_TASK_TABLE_NAME) / \ |
---|
| 1637 | sizeof(itron_initialization_tasks_table) |
---|
[352c9b2] | 1638 | |
---|
[5877cc3a] | 1639 | #endif /* CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE */ |
---|
[352c9b2] | 1640 | |
---|
[5877cc3a] | 1641 | #else /* CONFIGURE_ITRON_INIT_TASK_TABLE */ |
---|
[352c9b2] | 1642 | |
---|
[5877cc3a] | 1643 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_NAME NULL |
---|
| 1644 | #define CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE 0 |
---|
| 1645 | #define CONFIGURE_ITRON_INIT_TASK_STACK_SIZE 0 |
---|
[352c9b2] | 1646 | |
---|
[5877cc3a] | 1647 | #endif |
---|
| 1648 | |
---|
| 1649 | #define CONFIGURE_MEMORY_FOR_ITRON \ |
---|
[4175abd] | 1650 | ( CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( \ |
---|
| 1651 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ) + \ |
---|
[5877cc3a] | 1652 | CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( \ |
---|
[4175abd] | 1653 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ) + \ |
---|
[5877cc3a] | 1654 | CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( \ |
---|
[4175abd] | 1655 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES ) + \ |
---|
[5877cc3a] | 1656 | CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( \ |
---|
[4175abd] | 1657 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ) + \ |
---|
[5877cc3a] | 1658 | CONFIGURE_MEMORY_FOR_ITRON_PORTS( \ |
---|
[4175abd] | 1659 | CONFIGURE_MAXIMUM_ITRON_PORTS ) + \ |
---|
[5877cc3a] | 1660 | CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( \ |
---|
[4175abd] | 1661 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ) + \ |
---|
[5877cc3a] | 1662 | CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( \ |
---|
[4175abd] | 1663 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ) + \ |
---|
[5877cc3a] | 1664 | CONFIGURE_ITRON_INIT_TASK_STACK_SIZE \ |
---|
| 1665 | ) |
---|
[352c9b2] | 1666 | |
---|
| 1667 | #else |
---|
| 1668 | |
---|
[5877cc3a] | 1669 | #define CONFIGURE_MAXIMUM_ITRON_TASKS 0 |
---|
| 1670 | #define CONFIGURE_MAXIMUM_ITRON_SEMAPHORES 0 |
---|
| 1671 | #define CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS 0 |
---|
| 1672 | #define CONFIGURE_MAXIMUM_ITRON_MAILBOXES 0 |
---|
| 1673 | #define CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS 0 |
---|
| 1674 | #define CONFIGURE_MAXIMUM_ITRON_PORTS 0 |
---|
| 1675 | #define CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS 0 |
---|
| 1676 | #define CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS 0 |
---|
| 1677 | #define CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API 0 |
---|
| 1678 | #define CONFIGURE_MEMORY_FOR_ITRON 0 |
---|
[352c9b2] | 1679 | |
---|
| 1680 | #endif /* RTEMS_ITRON_API */ |
---|
| 1681 | |
---|
[4175abd] | 1682 | /** |
---|
| 1683 | * This macro specifies the amount of memory to be reserved for the |
---|
| 1684 | * Newlib C Library reentrancy structure -- if we are using newlib. |
---|
| 1685 | */ |
---|
| 1686 | |
---|
| 1687 | #if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY)) |
---|
[5877cc3a] | 1688 | #include <reent.h> |
---|
| 1689 | |
---|
[4175abd] | 1690 | #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB \ |
---|
| 1691 | _Configure_From_workspace(sizeof(struct _reent)) |
---|
[5877cc3a] | 1692 | #else |
---|
[4175abd] | 1693 | #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB 0 |
---|
[5877cc3a] | 1694 | #endif |
---|
[352c9b2] | 1695 | |
---|
[8486081] | 1696 | /* |
---|
[3652ad35] | 1697 | * Calculate the RAM size based on the maximum number of objects configured. |
---|
| 1698 | */ |
---|
[08bae5e6] | 1699 | |
---|
| 1700 | #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE |
---|
[3652ad35] | 1701 | |
---|
[5877cc3a] | 1702 | /** |
---|
| 1703 | * Account for allocating the following per object |
---|
| 1704 | * + array of object control structures |
---|
| 1705 | * + local pointer table -- pointer per object plus a zero'th |
---|
| 1706 | * entry in the local pointer table. |
---|
| 1707 | */ |
---|
[b2b143f4] | 1708 | |
---|
[5877cc3a] | 1709 | #define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \ |
---|
| 1710 | ( \ |
---|
| 1711 | _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) + \ |
---|
[dee98ce] | 1712 | (_Configure_Max_Objects(_tasks) * \ |
---|
[ecf0f4c] | 1713 | (_Configure_From_workspace(CONFIGURE_MINIMUM_TASK_STACK_SIZE) + \ |
---|
[8fed642] | 1714 | CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API + \ |
---|
[4175abd] | 1715 | CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB + \ |
---|
| 1716 | CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API + \ |
---|
| 1717 | CONFIGURE_MEMORY_PER_TASK_FOR_ITRON_API)) + \ |
---|
[dee98ce] | 1718 | _Configure_From_workspace( \ |
---|
[8fed642] | 1719 | _Configure_Max_Objects(_number_FP_tasks) * CONTEXT_FP_SIZE) + \ |
---|
| 1720 | _Configure_From_workspace( \ |
---|
| 1721 | (CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1) * sizeof(void *)) \ |
---|
[5877cc3a] | 1722 | ) |
---|
[b2b143f4] | 1723 | |
---|
[5877cc3a] | 1724 | /** |
---|
[f2a776ac] | 1725 | * This defines the amount of memory configured for the multiprocessing |
---|
| 1726 | * support required by this application. |
---|
[5877cc3a] | 1727 | */ |
---|
[df49c60] | 1728 | #ifdef CONFIGURE_MP_APPLICATION |
---|
[f2a776ac] | 1729 | #define CONFIGURE_MEMORY_FOR_MP \ |
---|
| 1730 | (CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \ |
---|
| 1731 | CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS( \ |
---|
| 1732 | CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) + \ |
---|
| 1733 | CONFIGURE_MEMORY_FOR_TASKS(1, 1) + \ |
---|
| 1734 | CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK \ |
---|
[3652ad35] | 1735 | ) |
---|
| 1736 | #else |
---|
[f2a776ac] | 1737 | #define CONFIGURE_MEMORY_FOR_MP 0 |
---|
[3652ad35] | 1738 | #endif |
---|
[3b89891] | 1739 | |
---|
[5877cc3a] | 1740 | /** |
---|
[7042065] | 1741 | * This is so we can account for tasks with stacks greater than minimum |
---|
| 1742 | * size. This is in bytes. |
---|
| 1743 | */ |
---|
[308aed9b] | 1744 | #ifndef CONFIGURE_EXTRA_TASK_STACKS |
---|
[5877cc3a] | 1745 | #define CONFIGURE_EXTRA_TASK_STACKS 0 |
---|
[308aed9b] | 1746 | #endif |
---|
| 1747 | |
---|
[5877cc3a] | 1748 | /** |
---|
| 1749 | * The following macro is used to calculate the memory allocated by RTEMS |
---|
| 1750 | * for the message buffers associated with a particular message queue. |
---|
| 1751 | * There is a fixed amount of overhead per message. |
---|
| 1752 | */ |
---|
| 1753 | #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(_messages, _size) \ |
---|
| 1754 | _Configure_From_workspace( \ |
---|
| 1755 | (_messages) * ((_size) + sizeof(CORE_message_queue_Buffer_control))) |
---|
| 1756 | |
---|
| 1757 | /** |
---|
| 1758 | * This macros is set to the amount of memory required for pending message |
---|
| 1759 | * buffers in bytes. It should be constructed by adding together a |
---|
| 1760 | * set of values determined by CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE. |
---|
[7042065] | 1761 | */ |
---|
| 1762 | #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY |
---|
[5877cc3a] | 1763 | #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 |
---|
[7042065] | 1764 | #endif |
---|
| 1765 | |
---|
[5877cc3a] | 1766 | /** |
---|
| 1767 | * This macro is available just in case the confdefs.h file underallocates |
---|
| 1768 | * memory for a particular application. This lets the user add some extra |
---|
| 1769 | * memory in case something broken and underestimates. |
---|
| 1770 | * |
---|
| 1771 | * It is also possible for cases where confdefs.h overallocates memory, |
---|
| 1772 | * you could substract memory from the allocated. The estimate is just |
---|
| 1773 | * that, an estimate, and assumes worst case alignment and padding on |
---|
| 1774 | * each allocated element. So in some cases it could be too conservative. |
---|
| 1775 | * |
---|
| 1776 | * @note Historically this was used for message buffers. |
---|
[7042065] | 1777 | */ |
---|
| 1778 | #ifndef CONFIGURE_MEMORY_OVERHEAD |
---|
[5877cc3a] | 1779 | #define CONFIGURE_MEMORY_OVERHEAD 0 |
---|
| 1780 | #endif |
---|
| 1781 | |
---|
| 1782 | /** |
---|
| 1783 | * On architectures that use Simple Vectored Interrupts, it is RTEMS |
---|
| 1784 | * responsibility to allocate the vector table. This avoids reserving |
---|
| 1785 | * the memory on architectures that use the Programmable Interrupt |
---|
| 1786 | * Controller Vectored Interrupts. |
---|
| 1787 | */ |
---|
| 1788 | #if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE) |
---|
| 1789 | /* |
---|
| 1790 | * This is a (hopefully) temporary hack. On the mips, the number of |
---|
| 1791 | * vectors is NOT statically defined. But it has to be statically |
---|
| 1792 | * defined for this to work. This is an issue looking for a nice |
---|
| 1793 | * solution. |
---|
| 1794 | */ |
---|
| 1795 | #if defined(__mips__) |
---|
[94a88c1c] | 1796 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE \ |
---|
| 1797 | _Configure_From_workspace( (sizeof(ISR_Handler_entry) * 256)) |
---|
[5877cc3a] | 1798 | #else |
---|
| 1799 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE \ |
---|
[94a88c1c] | 1800 | _Configure_From_workspace( \ |
---|
| 1801 | (sizeof(ISR_Handler_entry) * ISR_NUMBER_OF_VECTORS)) |
---|
[5877cc3a] | 1802 | #endif |
---|
| 1803 | #else |
---|
| 1804 | #define CONFIGURE_INTERRUPT_VECTOR_TABLE 0 |
---|
[7042065] | 1805 | #endif |
---|
| 1806 | |
---|
[5877cc3a] | 1807 | /** |
---|
| 1808 | * RTEMS uses one instance of an internal mutex class. This accounts |
---|
| 1809 | * for that mutex |
---|
| 1810 | */ |
---|
[b2b143f4] | 1811 | #define CONFIGURE_API_MUTEX_MEMORY \ |
---|
[5877cc3a] | 1812 | _Configure_Object_RAM(1, sizeof(API_Mutex_Control)) |
---|
[b2b143f4] | 1813 | |
---|
[4175abd] | 1814 | /** |
---|
| 1815 | * This defines the memory used by the thread ready chains. There is |
---|
| 1816 | * one chain per priority. |
---|
| 1817 | */ |
---|
| 1818 | #define CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS \ |
---|
| 1819 | _Configure_From_workspace( \ |
---|
| 1820 | ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) ) |
---|
| 1821 | /** |
---|
| 1822 | * This defines the amount of memory reserved for the IDLE task |
---|
| 1823 | * control structures and stack. |
---|
| 1824 | */ |
---|
| 1825 | #define CONFIGURE_MEMORY_FOR_IDLE_TASK \ |
---|
| 1826 | (CONFIGURE_MEMORY_FOR_TASKS(1, 0) + \ |
---|
| 1827 | (CONFIGURE_IDLE_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE)) |
---|
| 1828 | |
---|
[5877cc3a] | 1829 | /** |
---|
| 1830 | * This macro accounts for general RTEMS system overhead. |
---|
| 1831 | */ |
---|
[df49c60] | 1832 | #define CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD \ |
---|
[4175abd] | 1833 | ( CONFIGURE_MEMORY_FOR_IDLE_TASK + /* IDLE and stack */ \ |
---|
| 1834 | CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS + /* Ready chains */ \ |
---|
| 1835 | CONFIGURE_INTERRUPT_VECTOR_TABLE + /* interrupt vectors */ \ |
---|
[5877cc3a] | 1836 | CONFIGURE_INTERRUPT_STACK_MEMORY + /* interrupt stack */ \ |
---|
[4175abd] | 1837 | CONFIGURE_API_MUTEX_MEMORY /* allocation mutex */ \ |
---|
[b3dcd9a2] | 1838 | ) |
---|
| 1839 | |
---|
[399c2e5d] | 1840 | /* |
---|
| 1841 | * Now account for any extra memory that initialization tasks or threads |
---|
| 1842 | * may have requested. |
---|
| 1843 | */ |
---|
| 1844 | |
---|
[5877cc3a] | 1845 | /** |
---|
| 1846 | * This accounts for any extra memory required by the Classic API |
---|
| 1847 | * Initialization Task. |
---|
| 1848 | */ |
---|
[ecf0f4c] | 1849 | #if (CONFIGURE_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1850 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART \ |
---|
[ecf0f4c] | 1851 | (CONFIGURE_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[399c2e5d] | 1852 | #else |
---|
[5877cc3a] | 1853 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART 0 |
---|
[399c2e5d] | 1854 | #endif |
---|
[5877cc3a] | 1855 | |
---|
| 1856 | /** |
---|
| 1857 | * This accounts for any extra memory required by the POSIX API |
---|
| 1858 | * Initialization Thread. |
---|
| 1859 | */ |
---|
| 1860 | #if defined(RTEMS_POSIX_API) && \ |
---|
[ecf0f4c] | 1861 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1862 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART \ |
---|
[ecf0f4c] | 1863 | (CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1864 | #else |
---|
| 1865 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART 0 |
---|
| 1866 | #endif |
---|
| 1867 | |
---|
| 1868 | /** |
---|
| 1869 | * This accounts for any extra memory required by the ITRON API |
---|
| 1870 | * Initialization Task. |
---|
| 1871 | */ |
---|
| 1872 | #if defined(RTEMS_ITRON_API) && \ |
---|
[ecf0f4c] | 1873 | (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE > CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[5877cc3a] | 1874 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART \ |
---|
[ecf0f4c] | 1875 | (CONFIGURE_ITRON_INIT_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE) |
---|
[399c2e5d] | 1876 | #else |
---|
[5877cc3a] | 1877 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART 0 |
---|
[399c2e5d] | 1878 | #endif |
---|
| 1879 | |
---|
[5877cc3a] | 1880 | /** |
---|
| 1881 | * This macro provides a summation of the various initialization task |
---|
| 1882 | * and thread stack requirements. |
---|
| 1883 | */ |
---|
[563ed95] | 1884 | #define CONFIGURE_INITIALIZATION_THREADS_STACKS \ |
---|
[5877cc3a] | 1885 | (CONFIGURE_INITIALIZATION_THREADS_STACKS_CLASSIC_PART + \ |
---|
[399c2e5d] | 1886 | CONFIGURE_INITIALIZATION_THREADS_STACKS_POSIX_PART + \ |
---|
| 1887 | CONFIGURE_INITIALIZATION_THREADS_STACKS_ITRON_PART) |
---|
[563ed95] | 1888 | |
---|
[5877cc3a] | 1889 | /** |
---|
| 1890 | * This macro provides a summation of the various task and thread |
---|
| 1891 | * requirements. |
---|
[7c5e3b3] | 1892 | */ |
---|
[5877cc3a] | 1893 | #define CONFIGURE_TOTAL_TASKS_AND_THREADS \ |
---|
| 1894 | (CONFIGURE_MAXIMUM_TASKS + \ |
---|
| 1895 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS + \ |
---|
| 1896 | CONFIGURE_MAXIMUM_ITRON_TASKS \ |
---|
[28352fae] | 1897 | ) |
---|
[5877cc3a] | 1898 | |
---|
| 1899 | /** |
---|
| 1900 | * This macro reserves the memory required by the statically configured |
---|
| 1901 | * user extensions. |
---|
| 1902 | */ |
---|
| 1903 | #define CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS \ |
---|
[94a88c1c] | 1904 | ((CONFIGURE_NEWLIB_EXTENSION * \ |
---|
| 1905 | _Configure_From_workspace( sizeof(User_extensions_Control))) + \ |
---|
| 1906 | (CONFIGURE_STACK_CHECKER_EXTENSION * \ |
---|
| 1907 | _Configure_From_workspace( sizeof(User_extensions_Control))) \ |
---|
| 1908 | ) |
---|
[5877cc3a] | 1909 | |
---|
| 1910 | /** |
---|
| 1911 | * This macro provides a summation of the memory required by the |
---|
| 1912 | * Classic API as configured. |
---|
| 1913 | */ |
---|
| 1914 | #define CONFIGURE_MEMORY_FOR_CLASSIC \ |
---|
| 1915 | (CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES) + \ |
---|
[f0f450a] | 1916 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS + \ |
---|
| 1917 | CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER ) + \ |
---|
[b2f216e1] | 1918 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES) + \ |
---|
[3652ad35] | 1919 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \ |
---|
| 1920 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \ |
---|
[e746a88] | 1921 | CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ) + \ |
---|
[3652ad35] | 1922 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \ |
---|
| 1923 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \ |
---|
[7fa1ce86] | 1924 | CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS) + \ |
---|
[5877cc3a] | 1925 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) \ |
---|
| 1926 | ) |
---|
| 1927 | |
---|
[4175abd] | 1928 | #if defined(CONFIGURE_CONFDEFS_DEBUG) && defined(CONFIGURE_INIT) |
---|
[5877cc3a] | 1929 | /** |
---|
| 1930 | * This is a debug mechanism, so if you need to, the executable will |
---|
| 1931 | * have a structure with various partial values. Add to this as you |
---|
| 1932 | * need to. Viewing this structure in gdb combined with dumping |
---|
| 1933 | * the Configuration structures generated should help a lot in tracing |
---|
| 1934 | * down errors and analyzing where over and under allocations are. |
---|
| 1935 | */ |
---|
| 1936 | typedef struct { |
---|
[4175abd] | 1937 | uint32_t SYSTEM_OVERHEAD; |
---|
| 1938 | uint32_t STATIC_EXTENSIONS; |
---|
| 1939 | uint32_t INITIALIZATION_THREADS_STACKS; |
---|
| 1940 | |
---|
[dad723f4] | 1941 | uint32_t PER_INTEGER_TASK; |
---|
| 1942 | uint32_t FP_OVERHEAD; |
---|
[4175abd] | 1943 | uint32_t CLASSIC; |
---|
[5877cc3a] | 1944 | uint32_t POSIX; |
---|
[4175abd] | 1945 | uint32_t ITRON; |
---|
| 1946 | |
---|
| 1947 | /* System overhead pieces */ |
---|
| 1948 | uint32_t INTERRUPT_VECTOR_TABLE; |
---|
| 1949 | uint32_t INTERRUPT_STACK_MEMORY; |
---|
| 1950 | uint32_t THREAD_READY_CHAINS; |
---|
| 1951 | uint32_t MEMORY_FOR_IDLE_TASK; |
---|
| 1952 | |
---|
| 1953 | /* Classic API Pieces */ |
---|
[dee98ce] | 1954 | uint32_t CLASSIC_TASKS; |
---|
[4175abd] | 1955 | uint32_t TASK_VARIABLES; |
---|
| 1956 | uint32_t TIMERS; |
---|
| 1957 | uint32_t SEMAPHORES; |
---|
| 1958 | uint32_t MESSAGE_QUEUES; |
---|
| 1959 | uint32_t PARTITIONS; |
---|
| 1960 | uint32_t REGIONS; |
---|
| 1961 | uint32_t PORTS; |
---|
| 1962 | uint32_t PERIODS; |
---|
| 1963 | uint32_t BARRIERS; |
---|
| 1964 | uint32_t USER_EXTENSIONS; |
---|
| 1965 | #ifdef RTEMS_POSIX_API |
---|
| 1966 | /* POSIX API Pieces */ |
---|
| 1967 | uint32_t POSIX_MUTEXES; |
---|
| 1968 | uint32_t POSIX_CONDITION_VARIABLES; |
---|
| 1969 | uint32_t POSIX_KEYS; |
---|
| 1970 | uint32_t POSIX_TIMERS; |
---|
| 1971 | uint32_t POSIX_QUEUED_SIGNALS; |
---|
| 1972 | uint32_t POSIX_MESSAGE_QUEUES; |
---|
| 1973 | uint32_t POSIX_SEMAPHORES; |
---|
| 1974 | uint32_t POSIX_BARRIERS; |
---|
| 1975 | uint32_t POSIX_SPINLOCKS; |
---|
| 1976 | uint32_t POSIX_RWLOCKS; |
---|
| 1977 | #endif |
---|
| 1978 | #ifdef RTEMS_ITRON_API |
---|
| 1979 | /* ITRON API Pieces */ |
---|
| 1980 | uint32_t ITRON_SEMAPHORES; |
---|
| 1981 | uint32_t ITRON_EVENTFLAGS; |
---|
| 1982 | uint32_t ITRON_MAILBOXES; |
---|
| 1983 | uint32_t ITRON_MESSAGE_BUFFERS; |
---|
| 1984 | uint32_t ITRON_PORTS; |
---|
| 1985 | uint32_t ITRON_MEMORY_POOLS; |
---|
| 1986 | uint32_t ITRON_FIXED_MEMORY_POOLS; |
---|
| 1987 | #endif |
---|
[5877cc3a] | 1988 | } Configuration_Debug_t; |
---|
| 1989 | |
---|
| 1990 | Configuration_Debug_t Configuration_Memory_Debug = { |
---|
[4175abd] | 1991 | /* General Information */ |
---|
| 1992 | CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD, |
---|
| 1993 | CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS, |
---|
| 1994 | CONFIGURE_INITIALIZATION_THREADS_STACKS, |
---|
[dad723f4] | 1995 | CONFIGURE_MEMORY_FOR_TASKS(1, 0), |
---|
| 1996 | CONFIGURE_MEMORY_FOR_TASKS(0, 1), |
---|
[4175abd] | 1997 | CONFIGURE_MEMORY_FOR_CLASSIC, |
---|
| 1998 | CONFIGURE_MEMORY_FOR_POSIX, |
---|
| 1999 | CONFIGURE_MEMORY_FOR_ITRON, |
---|
| 2000 | |
---|
| 2001 | /* System overhead pieces */ |
---|
| 2002 | CONFIGURE_INTERRUPT_VECTOR_TABLE, |
---|
| 2003 | CONFIGURE_INTERRUPT_STACK_MEMORY, |
---|
| 2004 | CONFIGURE_MEMORY_FOR_THREAD_READY_CHAINS, |
---|
| 2005 | CONFIGURE_MEMORY_FOR_IDLE_TASK, |
---|
| 2006 | |
---|
| 2007 | /* Classic API Pieces */ |
---|
[dee98ce] | 2008 | CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS, 0), |
---|
[4175abd] | 2009 | CONFIGURE_MEMORY_FOR_TASK_VARIABLES(CONFIGURE_MAXIMUM_TASK_VARIABLES), |
---|
| 2010 | CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS), |
---|
[b2f216e1] | 2011 | CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_SEMAPHORES), |
---|
[4175abd] | 2012 | CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES), |
---|
| 2013 | CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS), |
---|
| 2014 | CONFIGURE_MEMORY_FOR_REGIONS( CONFIGURE_MAXIMUM_REGIONS ), |
---|
| 2015 | CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS), |
---|
| 2016 | CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS), |
---|
| 2017 | CONFIGURE_MEMORY_FOR_BARRIERS(CONFIGURE_MAXIMUM_BARRIERS), |
---|
| 2018 | CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS), |
---|
| 2019 | |
---|
| 2020 | #ifdef RTEMS_POSIX_API |
---|
| 2021 | /* POSIX API Pieces */ |
---|
| 2022 | CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( CONFIGURE_MAXIMUM_POSIX_MUTEXES ), |
---|
| 2023 | CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( |
---|
| 2024 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES ), |
---|
| 2025 | CONFIGURE_MEMORY_FOR_POSIX_KEYS( CONFIGURE_MAXIMUM_POSIX_KEYS ), |
---|
| 2026 | CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( |
---|
| 2027 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ), |
---|
| 2028 | CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUES( |
---|
| 2029 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES ), |
---|
| 2030 | CONFIGURE_MEMORY_FOR_POSIX_SEMAPHORES( CONFIGURE_MAXIMUM_POSIX_SEMAPHORES ), |
---|
| 2031 | CONFIGURE_MEMORY_FOR_POSIX_BARRIERS( CONFIGURE_MAXIMUM_POSIX_BARRIERS ), |
---|
| 2032 | CONFIGURE_MEMORY_FOR_POSIX_SPINLOCKS( CONFIGURE_MAXIMUM_POSIX_SPINLOCKS ), |
---|
| 2033 | CONFIGURE_MEMORY_FOR_POSIX_RWLOCKS( CONFIGURE_MAXIMUM_POSIX_RWLOCKS ), |
---|
| 2034 | CONFIGURE_MEMORY_FOR_POSIX_TIMERS( CONFIGURE_MAXIMUM_POSIX_TIMERS ), |
---|
| 2035 | #endif |
---|
| 2036 | |
---|
| 2037 | #ifdef RTEMS_ITRON_API |
---|
| 2038 | /* ITRON API Pieces */ |
---|
| 2039 | CONFIGURE_MEMORY_FOR_ITRON_SEMAPHORES( CONFIGURE_MAXIMUM_ITRON_SEMAPHORES ), |
---|
| 2040 | CONFIGURE_MEMORY_FOR_ITRON_EVENTFLAGS( CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS ), |
---|
| 2041 | CONFIGURE_MEMORY_FOR_ITRON_MAILBOXES( CONFIGURE_MAXIMUM_ITRON_MAILBOXES ), |
---|
| 2042 | CONFIGURE_MEMORY_FOR_ITRON_MESSAGE_BUFFERS( |
---|
| 2043 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS ), |
---|
| 2044 | CONFIGURE_MEMORY_FOR_ITRON_PORTS( CONFIGURE_MAXIMUM_ITRON_PORTS ), |
---|
[28352fae] | 2045 | CONFIGURE_MEMORY_FOR_ITRON_MEMORY_POOLS( |
---|
[4175abd] | 2046 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS ), |
---|
| 2047 | CONFIGURE_MEMORY_FOR_ITRON_FIXED_MEMORY_POOLS( |
---|
| 2048 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS ), |
---|
| 2049 | #endif |
---|
[5877cc3a] | 2050 | }; |
---|
| 2051 | #endif |
---|
| 2052 | |
---|
| 2053 | /** |
---|
| 2054 | * This calculates the memory required for the executive workspace. |
---|
| 2055 | */ |
---|
| 2056 | #define CONFIGURE_EXECUTIVE_RAM_SIZE \ |
---|
| 2057 | (( \ |
---|
[df49c60] | 2058 | CONFIGURE_MEMORY_FOR_SYSTEM_OVERHEAD + \ |
---|
[d40da79b] | 2059 | CONFIGURE_MEMORY_FOR_DEVFS + \ |
---|
[5877cc3a] | 2060 | CONFIGURE_MEMORY_FOR_TASKS( \ |
---|
| 2061 | CONFIGURE_TOTAL_TASKS_AND_THREADS, CONFIGURE_TOTAL_TASKS_AND_THREADS) + \ |
---|
| 2062 | CONFIGURE_MEMORY_FOR_CLASSIC + \ |
---|
| 2063 | CONFIGURE_MEMORY_FOR_POSIX + \ |
---|
[ecf0f4c] | 2064 | (CONFIGURE_MAXIMUM_POSIX_THREADS * CONFIGURE_MINIMUM_TASK_STACK_SIZE ) + \ |
---|
[5877cc3a] | 2065 | CONFIGURE_MEMORY_FOR_ITRON + \ |
---|
| 2066 | CONFIGURE_INITIALIZATION_THREADS_STACKS + \ |
---|
| 2067 | CONFIGURE_MEMORY_FOR_STATIC_EXTENSIONS + \ |
---|
| 2068 | CONFIGURE_MEMORY_FOR_MP + \ |
---|
[7042065] | 2069 | CONFIGURE_MESSAGE_BUFFER_MEMORY + \ |
---|
| 2070 | (CONFIGURE_MEMORY_OVERHEAD * 1024) + \ |
---|
[bac7b61] | 2071 | (CONFIGURE_EXTRA_TASK_STACKS) + (CONFIGURE_ADA_TASKS_STACK) \ |
---|
[7042065] | 2072 | ) & ~0x7) |
---|
[08bae5e6] | 2073 | #endif |
---|
| 2074 | |
---|
| 2075 | #ifdef CONFIGURE_INIT |
---|
[5877cc3a] | 2076 | /** |
---|
| 2077 | * This is the Classic API Configuration Table. |
---|
| 2078 | */ |
---|
| 2079 | rtems_api_configuration_table Configuration_RTEMS_API = { |
---|
| 2080 | CONFIGURE_MAXIMUM_TASKS, |
---|
[4cb19041] | 2081 | CONFIGURE_NOTEPADS_ENABLED, |
---|
[f0f450a] | 2082 | CONFIGURE_MAXIMUM_TIMERS + CONFIGURE_TIMER_FOR_SHARED_MEMORY_DRIVER, |
---|
[b2f216e1] | 2083 | CONFIGURE_SEMAPHORES, |
---|
[5877cc3a] | 2084 | CONFIGURE_MAXIMUM_MESSAGE_QUEUES, |
---|
| 2085 | CONFIGURE_MAXIMUM_PARTITIONS, |
---|
| 2086 | CONFIGURE_MAXIMUM_REGIONS, |
---|
| 2087 | CONFIGURE_MAXIMUM_PORTS, |
---|
| 2088 | CONFIGURE_MAXIMUM_PERIODS, |
---|
| 2089 | CONFIGURE_MAXIMUM_BARRIERS, |
---|
| 2090 | CONFIGURE_INIT_TASK_TABLE_SIZE, |
---|
| 2091 | CONFIGURE_INIT_TASK_TABLE |
---|
| 2092 | }; |
---|
[e6d4b1d] | 2093 | |
---|
[5877cc3a] | 2094 | #ifdef RTEMS_POSIX_API |
---|
| 2095 | /** |
---|
| 2096 | * This is the POSIX API Configuration Table. |
---|
| 2097 | */ |
---|
| 2098 | posix_api_configuration_table Configuration_POSIX_API = { |
---|
| 2099 | CONFIGURE_MAXIMUM_POSIX_THREADS + CONFIGURE_MAXIMUM_ADA_TASKS, |
---|
| 2100 | CONFIGURE_MAXIMUM_POSIX_MUTEXES + CONFIGURE_GNAT_MUTEXES + |
---|
[4175abd] | 2101 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
[5877cc3a] | 2102 | CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + |
---|
[4175abd] | 2103 | CONFIGURE_MAXIMUM_ADA_TASKS + CONFIGURE_MAXIMUM_FAKE_ADA_TASKS, |
---|
[5877cc3a] | 2104 | CONFIGURE_MAXIMUM_POSIX_KEYS, |
---|
| 2105 | CONFIGURE_MAXIMUM_POSIX_TIMERS, |
---|
| 2106 | CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS, |
---|
| 2107 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES, |
---|
[ade17392] | 2108 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS, |
---|
[5877cc3a] | 2109 | CONFIGURE_MAXIMUM_POSIX_SEMAPHORES, |
---|
| 2110 | CONFIGURE_MAXIMUM_POSIX_BARRIERS, |
---|
| 2111 | CONFIGURE_MAXIMUM_POSIX_RWLOCKS, |
---|
| 2112 | CONFIGURE_MAXIMUM_POSIX_SPINLOCKS, |
---|
| 2113 | CONFIGURE_POSIX_INIT_THREAD_TABLE_SIZE, |
---|
| 2114 | CONFIGURE_POSIX_INIT_THREAD_TABLE_NAME |
---|
| 2115 | }; |
---|
| 2116 | #endif |
---|
[2eba45d] | 2117 | |
---|
[5877cc3a] | 2118 | #ifdef RTEMS_ITRON_API |
---|
| 2119 | /** |
---|
| 2120 | * This is the ITRON API Configuration Table. |
---|
| 2121 | */ |
---|
| 2122 | itron_api_configuration_table Configuration_ITRON_API = { |
---|
| 2123 | CONFIGURE_MAXIMUM_ITRON_TASKS, |
---|
| 2124 | CONFIGURE_MAXIMUM_ITRON_SEMAPHORES, |
---|
| 2125 | CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS, |
---|
| 2126 | CONFIGURE_MAXIMUM_ITRON_MAILBOXES, |
---|
| 2127 | CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS, |
---|
| 2128 | CONFIGURE_MAXIMUM_ITRON_PORTS, |
---|
| 2129 | CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS, |
---|
| 2130 | CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS, |
---|
| 2131 | CONFIGURE_ITRON_INIT_TASK_TABLE_SIZE, |
---|
| 2132 | CONFIGURE_ITRON_INIT_TASK_TABLE_NAME |
---|
| 2133 | }; |
---|
| 2134 | #endif |
---|
[352c9b2] | 2135 | |
---|
[ecf0f4c] | 2136 | /** This variable specifies the minimum stack size for tasks in an RTEMS |
---|
| 2137 | * application. |
---|
| 2138 | * |
---|
| 2139 | * @note This is left as a simple uint32_t so it can be externed as |
---|
| 2140 | * needed without requring being high enough logical to |
---|
| 2141 | * include the full configuration table. |
---|
| 2142 | */ |
---|
[28352fae] | 2143 | uint32_t rtems_minimum_stack_size = |
---|
[ecf0f4c] | 2144 | CONFIGURE_MINIMUM_TASK_STACK_SIZE; |
---|
| 2145 | |
---|
[80f9d77] | 2146 | /** This variable specifies the maximum priority value that |
---|
| 2147 | * a task may have. This must be a power of 2 between 4 |
---|
| 2148 | * and 256 and is specified in terms of Classic API |
---|
| 2149 | * priority values. |
---|
| 2150 | * |
---|
| 2151 | * @note This is left as a simple uint8_t so it can be externed as |
---|
| 2152 | * needed without requring being high enough logical to |
---|
| 2153 | * include the full configuration table. |
---|
| 2154 | */ |
---|
| 2155 | uint8_t rtems_maximum_priority = CONFIGURE_MAXIMUM_PRIORITY; |
---|
| 2156 | |
---|
[5877cc3a] | 2157 | /** |
---|
| 2158 | * This is the primary Configuration Table for this application. |
---|
| 2159 | */ |
---|
| 2160 | rtems_configuration_table Configuration = { |
---|
[aac75d3b] | 2161 | NULL, /* filled in by BSP */ |
---|
[5877cc3a] | 2162 | CONFIGURE_EXECUTIVE_RAM_SIZE, /* required RTEMS workspace */ |
---|
| 2163 | CONFIGURE_MAXIMUM_USER_EXTENSIONS, /* maximum dynamic extensions */ |
---|
| 2164 | CONFIGURE_MICROSECONDS_PER_TICK, /* microseconds per clock tick */ |
---|
| 2165 | CONFIGURE_TICKS_PER_TIMESLICE, /* ticks per timeslice quantum */ |
---|
| 2166 | CONFIGURE_IDLE_TASK_BODY, /* user's IDLE task */ |
---|
| 2167 | CONFIGURE_IDLE_TASK_STACK_SIZE, /* IDLE task stack size */ |
---|
| 2168 | CONFIGURE_INTERRUPT_STACK_SIZE, /* interrupt stack size */ |
---|
| 2169 | CONFIGURE_TASK_STACK_ALLOCATOR, /* stack allocator */ |
---|
| 2170 | CONFIGURE_TASK_STACK_DEALLOCATOR, /* stack deallocator */ |
---|
| 2171 | CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY, /* true to clear memory */ |
---|
| 2172 | CONFIGURE_MAXIMUM_DRIVERS, /* maximum device drivers */ |
---|
| 2173 | CONFIGURE_NUMBER_OF_DRIVERS, /* static device drivers */ |
---|
| 2174 | Device_drivers, /* pointer to driver table */ |
---|
| 2175 | CONFIGURE_NUMBER_OF_INITIAL_EXTENSIONS, /* number of static extensions */ |
---|
| 2176 | CONFIGURE_INITIAL_EXTENSION_TABLE, /* pointer to static extensions */ |
---|
| 2177 | #if defined(RTEMS_MULTIPROCESSING) |
---|
| 2178 | CONFIGURE_MULTIPROCESSING_TABLE, /* pointer to MP config table */ |
---|
| 2179 | #endif |
---|
| 2180 | }; |
---|
[08bae5e6] | 2181 | #endif |
---|
| 2182 | |
---|
| 2183 | #endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */ |
---|
| 2184 | |
---|
[0ab34c90] | 2185 | /* |
---|
| 2186 | * If the user has configured a set of Classic API Initialization Tasks, |
---|
| 2187 | * then we need to install the code that runs that loop. |
---|
| 2188 | */ |
---|
| 2189 | #ifdef CONFIGURE_INIT |
---|
[d15bae6] | 2190 | #if defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) || \ |
---|
| 2191 | defined(CONFIGURE_HAS_OWN_INIT_TASK_TABLE) |
---|
[0ab34c90] | 2192 | void (_RTEMS_tasks_Initialize_user_tasks_body)(void); |
---|
| 2193 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = |
---|
| 2194 | _RTEMS_tasks_Initialize_user_tasks_body; |
---|
| 2195 | #else |
---|
| 2196 | void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL; |
---|
| 2197 | #endif |
---|
| 2198 | #endif |
---|
| 2199 | |
---|
| 2200 | /* |
---|
| 2201 | * If the user has configured a set of POSIX Initialization Threads, |
---|
| 2202 | * then we need to install the code that runs that loop. |
---|
| 2203 | */ |
---|
[5a8bc44] | 2204 | #ifdef RTEMS_POSIX_API |
---|
| 2205 | #ifdef CONFIGURE_INIT |
---|
[d15bae6] | 2206 | #if defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) || \ |
---|
| 2207 | defined(CONFIGURE_POSIX_HAS_OWN_INIT_THREAD_TABLE) |
---|
[5a8bc44] | 2208 | void _POSIX_Threads_Initialize_user_threads_body(void); |
---|
[28352fae] | 2209 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = |
---|
[4175abd] | 2210 | _POSIX_Threads_Initialize_user_threads_body; |
---|
[5a8bc44] | 2211 | #else |
---|
| 2212 | void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL; |
---|
| 2213 | #endif |
---|
[0ab34c90] | 2214 | #endif |
---|
| 2215 | #endif |
---|
| 2216 | |
---|
| 2217 | /* |
---|
| 2218 | * If the user has configured a set of ITRON Initialization Tasks, |
---|
| 2219 | * then we need to install the code that runs that loop. |
---|
| 2220 | */ |
---|
[5a8bc44] | 2221 | #ifdef RTEMS_ITRON_API |
---|
| 2222 | #ifdef CONFIGURE_INIT |
---|
[d15bae6] | 2223 | #if defined(CONFIGURE_ITRON_INIT_TASK_TABLE) || \ |
---|
| 2224 | defined(CONFIGURE_ITRON_HAS_OWN_INIT_TASK_TABLE) |
---|
[5a8bc44] | 2225 | void _ITRON_Task_Initialize_user_tasks_body(void); |
---|
[28352fae] | 2226 | void (*_ITRON_Initialize_user_tasks_p)(void) = |
---|
[4175abd] | 2227 | _ITRON_Task_Initialize_user_tasks_body; |
---|
[5a8bc44] | 2228 | #else |
---|
| 2229 | void (*_ITRON_Initialize_user_tasks_p)(void) = NULL; |
---|
| 2230 | #endif |
---|
[0ab34c90] | 2231 | #endif |
---|
| 2232 | #endif |
---|
| 2233 | |
---|
[08bae5e6] | 2234 | #ifdef __cplusplus |
---|
| 2235 | } |
---|
| 2236 | #endif |
---|
[8486081] | 2237 | |
---|
[df0bfdf] | 2238 | /****************************************************************** |
---|
| 2239 | ****************************************************************** |
---|
| 2240 | ****************************************************************** |
---|
| 2241 | * CONFIGURATION WARNINGS AND ERROR CHECKING * |
---|
| 2242 | ****************************************************************** |
---|
| 2243 | ****************************************************************** |
---|
| 2244 | ****************************************************************** |
---|
[df49c60] | 2245 | */ |
---|
| 2246 | |
---|
| 2247 | /* |
---|
[80f9d77] | 2248 | * Make sure a task/thread of some sort is configured. |
---|
| 2249 | * |
---|
| 2250 | * When analyzing RTEMS to find the smallest possible of memory |
---|
| 2251 | * that must be allocated, you probably do want to configure 0 |
---|
| 2252 | * tasks/threads so there is a smaller set of calls to _Workspace_Allocate |
---|
| 2253 | * to analyze. |
---|
| 2254 | */ |
---|
| 2255 | #if !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
| 2256 | #if (CONFIGURE_MAXIMUM_TASKS == 0) && \ |
---|
| 2257 | (CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \ |
---|
| 2258 | (CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \ |
---|
| 2259 | (CONFIGURE_MAXIMUM_ITRON_TASKS == 0) |
---|
| 2260 | #error "CONFIGURATION ERROR: No tasks or threads configured!!" |
---|
| 2261 | #endif |
---|
[df49c60] | 2262 | #endif |
---|
| 2263 | |
---|
| 2264 | /* |
---|
| 2265 | * Make sure at least one of the initialization task/thread |
---|
| 2266 | * tables was defined. |
---|
| 2267 | */ |
---|
| 2268 | #if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \ |
---|
| 2269 | !defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \ |
---|
[80f9d77] | 2270 | !defined(CONFIGURE_ITRON_INIT_TASK_TABLE) && \ |
---|
| 2271 | !defined(CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION) |
---|
[168ba07] | 2272 | #error "CONFIGURATION ERROR: No initialization tasks or threads configured!!" |
---|
[df49c60] | 2273 | #endif |
---|
| 2274 | |
---|
[df0bfdf] | 2275 | /* |
---|
| 2276 | * If the user is trying to configure a multiprocessing application and |
---|
| 2277 | * RTEMS was not configured and built multiprocessing, then error out. |
---|
| 2278 | */ |
---|
| 2279 | #if defined(CONFIGURE_MP_APPLICATION) && \ |
---|
| 2280 | !defined(RTEMS_MULTIPROCESSING) |
---|
| 2281 | #error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!" |
---|
| 2282 | #endif |
---|
| 2283 | |
---|
| 2284 | /* |
---|
| 2285 | * If an attempt was made to configure POSIX objects and |
---|
| 2286 | * the POSIX API was not configured into RTEMS, error out. |
---|
| 2287 | */ |
---|
| 2288 | #if !defined(RTEMS_POSIX_API) |
---|
| 2289 | #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \ |
---|
| 2290 | (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \ |
---|
| 2291 | (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \ |
---|
| 2292 | (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) || \ |
---|
| 2293 | (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \ |
---|
| 2294 | (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \ |
---|
| 2295 | (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \ |
---|
[ade17392] | 2296 | (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS != 0) || \ |
---|
[df0bfdf] | 2297 | (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \ |
---|
| 2298 | (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \ |
---|
| 2299 | (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \ |
---|
| 2300 | (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \ |
---|
[98e92b0a] | 2301 | defined(CONFIGURE_POSIX_INIT_THREAD_TABLE)) |
---|
[df0bfdf] | 2302 | #error "CONFIGURATION ERROR: POSIX API support not configured!!" |
---|
| 2303 | #endif |
---|
| 2304 | #endif |
---|
| 2305 | |
---|
| 2306 | /* |
---|
| 2307 | * If an attempt was made to configure ITRON objects and |
---|
| 2308 | * the ITRON API was not configured into RTEMS, error out. |
---|
| 2309 | */ |
---|
| 2310 | #if !defined(RTEMS_ITRON_API) |
---|
| 2311 | #if ((CONFIGURE_MAXIMUM_ITRON_TASKS != 0) || \ |
---|
| 2312 | (CONFIGURE_MAXIMUM_ITRON_SEMAPHORES != 0) || \ |
---|
| 2313 | (CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS != 0) || \ |
---|
| 2314 | (CONFIGURE_MAXIMUM_ITRON_MAILBOXES != 0) || \ |
---|
| 2315 | (CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS != 0) || \ |
---|
| 2316 | (CONFIGURE_MAXIMUM_ITRON_PORTS != 0) || \ |
---|
| 2317 | (CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS != 0) || \ |
---|
[98e92b0a] | 2318 | (CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS != 0) || \ |
---|
| 2319 | defined(CONFIGURE_ITRON_INIT_TASK_TABLE)) |
---|
[df0bfdf] | 2320 | #error "CONFIGURATION ERROR: ITRON API support not configured!!" |
---|
| 2321 | #endif |
---|
| 2322 | #endif |
---|
| 2323 | |
---|
| 2324 | /* |
---|
| 2325 | * You must either explicity include or exclude the clock driver. |
---|
| 2326 | * It is such a common newbie error to leave it out. Maybe this |
---|
| 2327 | * will put an end to it. |
---|
[28352fae] | 2328 | * |
---|
| 2329 | * NOTE: If you are using the timer driver, it is considered |
---|
[76deaf0c] | 2330 | * mutually exclusive with the clock driver because the |
---|
| 2331 | * drivers are assumed to use the same "timer" hardware |
---|
| 2332 | * on many boards. |
---|
[df0bfdf] | 2333 | */ |
---|
| 2334 | #if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE) |
---|
| 2335 | #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ |
---|
| 2336 | !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \ |
---|
| 2337 | !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER) |
---|
| 2338 | #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?" |
---|
| 2339 | #endif |
---|
| 2340 | #endif |
---|
| 2341 | |
---|
[0ab34c90] | 2342 | /* |
---|
| 2343 | * These names have been obsoleted so make the user application stop compiling |
---|
| 2344 | */ |
---|
| 2345 | #if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \ |
---|
| 2346 | defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \ |
---|
| 2347 | defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \ |
---|
| 2348 | defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \ |
---|
| 2349 | defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER) |
---|
| 2350 | #error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete" |
---|
| 2351 | #endif |
---|
| 2352 | |
---|
[80f9d77] | 2353 | /* |
---|
| 2354 | * Validate the configured maximum priority |
---|
| 2355 | */ |
---|
| 2356 | #if ((CONFIGURE_MAXIMUM_PRIORITY != 3) && \ |
---|
| 2357 | (CONFIGURE_MAXIMUM_PRIORITY != 7) && \ |
---|
| 2358 | (CONFIGURE_MAXIMUM_PRIORITY != 15) && \ |
---|
| 2359 | (CONFIGURE_MAXIMUM_PRIORITY != 31) && \ |
---|
| 2360 | (CONFIGURE_MAXIMUM_PRIORITY != 63) && \ |
---|
| 2361 | (CONFIGURE_MAXIMUM_PRIORITY != 127) && \ |
---|
| 2362 | (CONFIGURE_MAXIMUM_PRIORITY != 255)) |
---|
| 2363 | #error "Maximum priority is not 1 less than a power of 2 between 4 and 256" |
---|
| 2364 | #endif |
---|
[28352fae] | 2365 | |
---|
[80f9d77] | 2366 | #if (CONFIGURE_MAXIMUM_PRIORITY > PRIORITY_DEFAULT_MAXIMUM) |
---|
| 2367 | #error "Maximum priority configured higher than supported by target." |
---|
| 2368 | #endif |
---|
| 2369 | |
---|
[ade17392] | 2370 | /* |
---|
| 2371 | * If you have fewer POSIX Message Queue Descriptors than actual |
---|
| 2372 | * POSIX Message Queues, then you will not be able to open all the |
---|
| 2373 | * queues. |
---|
| 2374 | */ |
---|
| 2375 | #if (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS < \ |
---|
| 2376 | CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES) |
---|
| 2377 | #error "Fewer POSIX Message Queue descriptors than Queues!" |
---|
| 2378 | #endif |
---|
| 2379 | |
---|
[08bae5e6] | 2380 | #endif |
---|
| 2381 | /* end of include file */ |
---|