Revision 732a4657 modules/aos_chconf.h
| modules/aos_chconf.h | ||
|---|---|---|
| 30 | 30 |
#define AOS_CHCONF_H |
| 31 | 31 |
|
| 32 | 32 |
#define _CHIBIOS_RT_CONF_ |
| 33 |
#define _CHIBIOS_RT_CONF_VER_5_1_
|
|
| 33 |
#define _CHIBIOS_RT_CONF_VER_6_0_
|
|
| 34 | 34 |
|
| 35 | 35 |
/*===========================================================================*/ |
| 36 | 36 |
/** |
| ... | ... | |
| 97 | 97 |
* @note The round robin preemption is not supported in tickless mode and |
| 98 | 98 |
* must be set to zero in that case. |
| 99 | 99 |
*/ |
| 100 |
#if !defined(CH_CFG_TIME_QUANTUM) |
|
| 100 | 101 |
#define CH_CFG_TIME_QUANTUM 0 |
| 102 |
#endif |
|
| 101 | 103 |
|
| 102 | 104 |
/** |
| 103 | 105 |
* @brief Managed RAM size. |
| ... | ... | |
| 110 | 112 |
* provide the @p __heap_base__ and @p __heap_end__ symbols. |
| 111 | 113 |
* @note Requires @p CH_CFG_USE_MEMCORE. |
| 112 | 114 |
*/ |
| 115 |
#if !defined(CH_CFG_MEMCORE_SIZE) |
|
| 113 | 116 |
#define CH_CFG_MEMCORE_SIZE 0 |
| 117 |
#endif |
|
| 114 | 118 |
|
| 115 | 119 |
/** |
| 116 | 120 |
* @brief Idle thread automatic spawn suppression. |
| ... | ... | |
| 119 | 123 |
* function becomes the idle thread and must implement an |
| 120 | 124 |
* infinite loop. |
| 121 | 125 |
*/ |
| 126 |
#if !defined(CH_CFG_NO_IDLE_THREAD) |
|
| 122 | 127 |
#define CH_CFG_NO_IDLE_THREAD FALSE |
| 128 |
#endif |
|
| 123 | 129 |
|
| 124 | 130 |
/** @} */ |
| 125 | 131 |
|
| ... | ... | |
| 138 | 144 |
* @note This is not related to the compiler optimization options. |
| 139 | 145 |
* @note The default is @p TRUE. |
| 140 | 146 |
*/ |
| 147 |
#if !defined(CH_CFG_OPTIMIZE_SPEED) |
|
| 141 | 148 |
#define CH_CFG_OPTIMIZE_SPEED TRUE |
| 149 |
#endif |
|
| 142 | 150 |
|
| 143 | 151 |
/** @} */ |
| 144 | 152 |
|
| ... | ... | |
| 156 | 164 |
* |
| 157 | 165 |
* @note The default is @p TRUE. |
| 158 | 166 |
*/ |
| 167 |
#if !defined(CH_CFG_USE_TM) |
|
| 159 | 168 |
#define CH_CFG_USE_TM TRUE |
| 169 |
#endif |
|
| 160 | 170 |
|
| 161 | 171 |
/** |
| 162 | 172 |
* @brief Threads registry APIs. |
| ... | ... | |
| 164 | 174 |
* |
| 165 | 175 |
* @note The default is @p TRUE. |
| 166 | 176 |
*/ |
| 177 |
#if !defined(CH_CFG_USE_REGISTRY) |
|
| 167 | 178 |
#define CH_CFG_USE_REGISTRY FALSE |
| 179 |
#endif |
|
| 168 | 180 |
|
| 169 | 181 |
/** |
| 170 | 182 |
* @brief Thread hierarchy APIs. |
| ... | ... | |
| 172 | 184 |
* |
| 173 | 185 |
* @note The default is @p FALSE. |
| 174 | 186 |
*/ |
| 187 |
#if !defined(CH_CFG_USE_THREADHIERARCHY) |
|
| 175 | 188 |
#define CH_CFG_USE_THREADHIERARCHY TRUE |
| 189 |
#endif |
|
| 176 | 190 |
|
| 177 | 191 |
/** |
| 178 | 192 |
* @brief Enable ordering of child lists. |
| 179 | 193 |
* @details Children will be ordered by their priority (descending). |
| 180 | 194 |
* If sibliblings have identical priority, they are ordered by age (descending). |
| 181 | 195 |
*/ |
| 196 |
#if !defined(CH_CFG_THREADHIERARCHY_ORDERED) |
|
| 182 | 197 |
#define CH_CFG_THREADHIERARCHY_ORDERED TRUE |
| 198 |
#endif |
|
| 183 | 199 |
|
| 184 | 200 |
/** |
| 185 | 201 |
* @brief Threads synchronization APIs. |
| ... | ... | |
| 188 | 204 |
* |
| 189 | 205 |
* @note The default is @p TRUE. |
| 190 | 206 |
*/ |
| 207 |
#if !defined(CH_CFG_USE_WAITEXIT) |
|
| 191 | 208 |
#define CH_CFG_USE_WAITEXIT TRUE |
| 209 |
#endif |
|
| 192 | 210 |
|
| 193 | 211 |
/** |
| 194 | 212 |
* @brief Semaphores APIs. |
| ... | ... | |
| 196 | 214 |
* |
| 197 | 215 |
* @note The default is @p TRUE. |
| 198 | 216 |
*/ |
| 217 |
#if !defined(CH_CFG_USE_SEMAPHORES) |
|
| 199 | 218 |
#define CH_CFG_USE_SEMAPHORES TRUE |
| 219 |
#endif |
|
| 200 | 220 |
|
| 201 | 221 |
/** |
| 202 | 222 |
* @brief Semaphores queuing mode. |
| ... | ... | |
| 207 | 227 |
* requirements. |
| 208 | 228 |
* @note Requires @p CH_CFG_USE_SEMAPHORES. |
| 209 | 229 |
*/ |
| 230 |
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) |
|
| 210 | 231 |
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
| 232 |
#endif |
|
| 211 | 233 |
|
| 212 | 234 |
/** |
| 213 | 235 |
* @brief Mutexes APIs. |
| ... | ... | |
| 215 | 237 |
* |
| 216 | 238 |
* @note The default is @p TRUE. |
| 217 | 239 |
*/ |
| 240 |
#if !defined(CH_CFG_USE_MUTEXES) |
|
| 218 | 241 |
#define CH_CFG_USE_MUTEXES TRUE |
| 242 |
#endif |
|
| 219 | 243 |
|
| 220 | 244 |
/** |
| 221 | 245 |
* @brief Enables recursive behavior on mutexes. |
| ... | ... | |
| 225 | 249 |
* @note The default is @p FALSE. |
| 226 | 250 |
* @note Requires @p CH_CFG_USE_MUTEXES. |
| 227 | 251 |
*/ |
| 252 |
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) |
|
| 228 | 253 |
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
| 254 |
#endif |
|
| 229 | 255 |
|
| 230 | 256 |
/** |
| 231 | 257 |
* @brief Conditional Variables APIs. |
| ... | ... | |
| 235 | 261 |
* @note The default is @p TRUE. |
| 236 | 262 |
* @note Requires @p CH_CFG_USE_MUTEXES. |
| 237 | 263 |
*/ |
| 264 |
#if !defined(CH_CFG_USE_CONDVARS) |
|
| 238 | 265 |
#define CH_CFG_USE_CONDVARS TRUE |
| 266 |
#endif |
|
| 239 | 267 |
|
| 240 | 268 |
/** |
| 241 | 269 |
* @brief Conditional Variables APIs with timeout. |
| ... | ... | |
| 245 | 273 |
* @note The default is @p TRUE. |
| 246 | 274 |
* @note Requires @p CH_CFG_USE_CONDVARS. |
| 247 | 275 |
*/ |
| 276 |
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) |
|
| 248 | 277 |
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
| 278 |
#endif |
|
| 249 | 279 |
|
| 250 | 280 |
/** |
| 251 | 281 |
* @brief Events Flags APIs. |
| ... | ... | |
| 253 | 283 |
* |
| 254 | 284 |
* @note The default is @p TRUE. |
| 255 | 285 |
*/ |
| 286 |
#if !defined(CH_CFG_USE_EVENTS) |
|
| 256 | 287 |
#define CH_CFG_USE_EVENTS TRUE |
| 288 |
#endif |
|
| 257 | 289 |
|
| 258 | 290 |
/** |
| 259 | 291 |
* @brief Events Flags APIs with timeout. |
| ... | ... | |
| 263 | 295 |
* @note The default is @p TRUE. |
| 264 | 296 |
* @note Requires @p CH_CFG_USE_EVENTS. |
| 265 | 297 |
*/ |
| 298 |
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) |
|
| 266 | 299 |
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
| 300 |
#endif |
|
| 267 | 301 |
|
| 268 | 302 |
/** |
| 269 | 303 |
* @brief Synchronous Messages APIs. |
| ... | ... | |
| 272 | 306 |
* |
| 273 | 307 |
* @note The default is @p TRUE. |
| 274 | 308 |
*/ |
| 309 |
#if !defined(CH_CFG_USE_MESSAGES) |
|
| 275 | 310 |
#define CH_CFG_USE_MESSAGES FALSE |
| 311 |
#endif |
|
| 276 | 312 |
|
| 277 | 313 |
/** |
| 278 | 314 |
* @brief Synchronous Messages queuing mode. |
| ... | ... | |
| 283 | 319 |
* requirements. |
| 284 | 320 |
* @note Requires @p CH_CFG_USE_MESSAGES. |
| 285 | 321 |
*/ |
| 322 |
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) |
|
| 286 | 323 |
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
| 324 |
#endif |
|
| 287 | 325 |
|
| 288 | 326 |
/** |
| 289 | 327 |
* @brief Mailboxes APIs. |
| ... | ... | |
| 293 | 331 |
* @note The default is @p TRUE. |
| 294 | 332 |
* @note Requires @p CH_CFG_USE_SEMAPHORES. |
| 295 | 333 |
*/ |
| 334 |
#if !defined(CH_CFG_USE_MAILBOXES) |
|
| 296 | 335 |
#define CH_CFG_USE_MAILBOXES FALSE |
| 336 |
#endif |
|
| 297 | 337 |
|
| 298 | 338 |
/** |
| 299 | 339 |
* @brief Core Memory Manager APIs. |
| ... | ... | |
| 302 | 342 |
* |
| 303 | 343 |
* @note The default is @p TRUE. |
| 304 | 344 |
*/ |
| 345 |
#if !defined(CH_CFG_USE_MEMCORE) |
|
| 305 | 346 |
#define CH_CFG_USE_MEMCORE FALSE |
| 347 |
#endif |
|
| 306 | 348 |
|
| 307 | 349 |
/** |
| 308 | 350 |
* @brief Heap Allocator APIs. |
| ... | ... | |
| 314 | 356 |
* @p CH_CFG_USE_SEMAPHORES. |
| 315 | 357 |
* @note Mutexes are recommended. |
| 316 | 358 |
*/ |
| 359 |
#if !defined(CH_CFG_USE_HEAP) |
|
| 317 | 360 |
#define CH_CFG_USE_HEAP FALSE |
| 361 |
#endif |
|
| 318 | 362 |
|
| 319 | 363 |
/** |
| 320 | 364 |
* @brief Memory Pools Allocator APIs. |
| ... | ... | |
| 323 | 367 |
* |
| 324 | 368 |
* @note The default is @p TRUE. |
| 325 | 369 |
*/ |
| 370 |
#if !defined(CH_CFG_USE_MEMPOOLS) |
|
| 326 | 371 |
#define CH_CFG_USE_MEMPOOLS FALSE |
| 372 |
#endif |
|
| 327 | 373 |
|
| 328 | 374 |
/** |
| 329 |
* @brief Objects FIFOs APIs. |
|
| 375 |
* @brief Objects FIFOs APIs.
|
|
| 330 | 376 |
* @details If enabled then the objects FIFOs APIs are included |
| 331 | 377 |
* in the kernel. |
| 332 | 378 |
* |
| 333 | 379 |
* @note The default is @p TRUE. |
| 334 | 380 |
*/ |
| 381 |
#if !defined(CH_CFG_USE_OBJ_FIFOS) |
|
| 335 | 382 |
#define CH_CFG_USE_OBJ_FIFOS FALSE |
| 383 |
#endif |
|
| 384 |
|
|
| 385 |
/** |
|
| 386 |
* @brief Pipes APIs. |
|
| 387 |
* @details If enabled then the pipes APIs are included |
|
| 388 |
* in the kernel. |
|
| 389 |
* |
|
| 390 |
* @note The default is @p TRUE. |
|
| 391 |
*/ |
|
| 392 |
#if !defined(CH_CFG_USE_PIPES) |
|
| 393 |
#define CH_CFG_USE_PIPES FALSE |
|
| 394 |
#endif |
|
| 336 | 395 |
|
| 337 | 396 |
/** |
| 338 | 397 |
* @brief Dynamic Threads APIs. |
| ... | ... | |
| 343 | 402 |
* @note Requires @p CH_CFG_USE_WAITEXIT. |
| 344 | 403 |
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. |
| 345 | 404 |
*/ |
| 405 |
#if !defined(CH_CFG_USE_DYNAMIC) |
|
| 346 | 406 |
#define CH_CFG_USE_DYNAMIC FALSE |
| 407 |
#endif |
|
| 347 | 408 |
|
| 348 | 409 |
/** @} */ |
| 349 | 410 |
|
| ... | ... | |
| 409 | 470 |
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE |
| 410 | 471 |
#endif |
| 411 | 472 |
|
| 473 |
/** |
|
| 474 |
* @brief Enables factory for Pipes. |
|
| 475 |
*/ |
|
| 476 |
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) |
|
| 477 |
#define CH_CFG_FACTORY_PIPES TRUE |
|
| 478 |
#endif |
|
| 479 |
|
|
| 412 | 480 |
/** @} */ |
| 413 | 481 |
|
| 414 | 482 |
/*===========================================================================*/ |
| ... | ... | |
| 423 | 491 |
* |
| 424 | 492 |
* @note The default is @p FALSE. |
| 425 | 493 |
*/ |
| 494 |
#if !defined(CH_DBG_STATISTICS) |
|
| 426 | 495 |
#if ((CH_CFG_USE_TM == TRUE) && (AMIROOS_CFG_DBG == true)) || defined(__DOXYGEN__) |
| 427 | 496 |
#define CH_DBG_STATISTICS TRUE |
| 428 | 497 |
#else |
| 429 | 498 |
#define CH_DBG_STATISTICS FALSE |
| 430 | 499 |
#endif |
| 500 |
#endif |
|
| 431 | 501 |
|
| 432 | 502 |
/** |
| 433 | 503 |
* @brief Debug option, system state check. |
| ... | ... | |
| 436 | 506 |
* |
| 437 | 507 |
* @note The default is @p FALSE. |
| 438 | 508 |
*/ |
| 509 |
#if !defined(CH_DBG_SYSTEM_STATE_CHECK) |
|
| 439 | 510 |
#if (AMIROOS_CFG_DBG == true) || defined(__DOXYGEN__) |
| 440 | 511 |
#define CH_DBG_SYSTEM_STATE_CHECK TRUE |
| 441 | 512 |
#else |
| 442 | 513 |
#define CH_DBG_SYSTEM_STATE_CHECK FALSE |
| 443 | 514 |
#endif |
| 515 |
#endif |
|
| 444 | 516 |
|
| 445 | 517 |
/** |
| 446 | 518 |
* @brief Debug option, parameters checks. |
| ... | ... | |
| 449 | 521 |
* |
| 450 | 522 |
* @note The default is @p FALSE. |
| 451 | 523 |
*/ |
| 524 |
#if !defined(CH_DBG_ENABLE_CHECKS) |
|
| 452 | 525 |
#if (AMIROOS_CFG_DBG == true) || defined(__DOXYGEN__) |
| 453 | 526 |
#define CH_DBG_ENABLE_CHECKS TRUE |
| 454 | 527 |
#else |
| 455 | 528 |
#define CH_DBG_ENABLE_CHECKS FALSE |
| 456 | 529 |
#endif |
| 530 |
#endif |
|
| 457 | 531 |
|
| 458 | 532 |
/** |
| 459 | 533 |
* @brief Debug option, consistency checks. |
| ... | ... | |
| 463 | 537 |
* |
| 464 | 538 |
* @note The default is @p FALSE. |
| 465 | 539 |
*/ |
| 540 |
#if !defined(CH_DBG_ENABLE_ASSERTS) |
|
| 466 | 541 |
#if (AMIROOS_CFG_DBG == true) || defined(__DOXYGEN__) |
| 467 | 542 |
#define CH_DBG_ENABLE_ASSERTS TRUE |
| 468 | 543 |
#else |
| 469 | 544 |
#define CH_DBG_ENABLE_ASSERTS FALSE |
| 470 | 545 |
#endif |
| 546 |
#endif |
|
| 471 | 547 |
|
| 472 | 548 |
/** |
| 473 | 549 |
* @brief Debug option, trace buffer. |
| ... | ... | |
| 475 | 551 |
* |
| 476 | 552 |
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED. |
| 477 | 553 |
*/ |
| 554 |
#if !defined(CH_DBG_TRACE_MASK) |
|
| 478 | 555 |
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED |
| 556 |
#endif |
|
| 479 | 557 |
|
| 480 | 558 |
/** |
| 481 | 559 |
* @brief Trace buffer entries. |
| 482 | 560 |
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is |
| 483 | 561 |
* different from @p CH_DBG_TRACE_MASK_DISABLED. |
| 484 | 562 |
*/ |
| 563 |
#if !defined(CH_DBG_TRACE_BUFFER_SIZE) |
|
| 485 | 564 |
#define CH_DBG_TRACE_BUFFER_SIZE 128 |
| 565 |
#endif |
|
| 486 | 566 |
|
| 487 | 567 |
/** |
| 488 | 568 |
* @brief Debug option, stack checks. |
| ... | ... | |
| 494 | 574 |
* @note The default failure mode is to halt the system with the global |
| 495 | 575 |
* @p panic_msg variable set to @p NULL. |
| 496 | 576 |
*/ |
| 577 |
#if !defined(CH_DBG_ENABLE_STACK_CHECK) |
|
| 497 | 578 |
#if (AMIROOS_CFG_DBG == true) || defined(__DOXYGEN__) |
| 498 | 579 |
#define CH_DBG_ENABLE_STACK_CHECK TRUE |
| 499 | 580 |
#else |
| 500 | 581 |
#define CH_DBG_ENABLE_STACK_CHECK FALSE |
| 501 | 582 |
#endif |
| 583 |
#endif |
|
| 502 | 584 |
|
| 503 | 585 |
/** |
| 504 | 586 |
* @brief Debug option, stacks initialization. |
| ... | ... | |
| 508 | 590 |
* |
| 509 | 591 |
* @note The default is @p FALSE. |
| 510 | 592 |
*/ |
| 593 |
#if !defined(CH_DBG_FILL_THREADS) |
|
| 511 | 594 |
#if (AMIROOS_CFG_PROFILE == true) || defined(__DOXYGEN__) |
| 512 | 595 |
#define CH_DBG_FILL_THREADS TRUE |
| 513 | 596 |
#else |
| 514 | 597 |
#define CH_DBG_FILL_THREADS FALSE |
| 515 | 598 |
#endif |
| 599 |
#endif |
|
| 516 | 600 |
|
| 517 | 601 |
/** |
| 518 | 602 |
* @brief Debug option, threads profiling. |
| ... | ... | |
| 523 | 607 |
* @note This debug option is not currently compatible with the |
| 524 | 608 |
* tickless mode. |
| 525 | 609 |
*/ |
| 610 |
#if !defined(CH_DBG_THREADS_PROFILING) |
|
| 526 | 611 |
#if ((CH_CFG_ST_TIMEDELTA == 0) && (AMIROOS_CFG_PROFILE == true)) || defined(__DOXYGEN__) |
| 527 | 612 |
#define CH_DBG_THREADS_PROFILING TRUE |
| 528 | 613 |
#else |
| 529 | 614 |
#define CH_DBG_THREADS_PROFILING FALSE |
| 530 | 615 |
#endif |
| 616 |
#endif |
|
| 531 | 617 |
|
| 532 | 618 |
/** @} */ |
| 533 | 619 |
|
| ... | ... | |
| 661 | 747 |
|
| 662 | 748 |
/*===========================================================================*/ |
| 663 | 749 |
/** |
| 664 |
* @name Port specific settings |
|
| 750 |
* @name Port-specific settings (override port settings defaulted in chcore.h). |
|
| 751 |
* @{
|
|
| 665 | 752 |
*/ |
| 666 | 753 |
/*===========================================================================*/ |
| 667 | 754 |
|
| 668 | 755 |
// These settings are specific to each module. |
| 669 | 756 |
|
| 757 |
/** @} */ |
|
| 758 |
|
|
| 670 | 759 |
/*===========================================================================*/ |
| 671 | 760 |
/** |
| 672 | 761 |
* @name other |
Also available in: Unified diff