FreeRTOSConfig.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. #ifndef FREERTOS_CONFIG_H
  2. #define FREERTOS_CONFIG_H
  3. /* Scheduler Related */
  4. #define configUSE_PREEMPTION 1
  5. #define configUSE_TICKLESS_IDLE 0
  6. #define configUSE_IDLE_HOOK 0
  7. #define configUSE_TICK_HOOK 0
  8. #define configTICK_RATE_HZ ((TickType_t)1000)
  9. #define configMAX_PRIORITIES 32
  10. #define configMINIMAL_STACK_SIZE (configSTACK_DEPTH_TYPE)512
  11. #define configUSE_16_BIT_TICKS 0
  12. #define configIDLE_SHOULD_YIELD 1
  13. /* Synchronization Related */
  14. #define configUSE_MUTEXES 1
  15. #define configUSE_RECURSIVE_MUTEXES 1
  16. #define configUSE_APPLICATION_TASK_TAG 0
  17. #define configUSE_COUNTING_SEMAPHORES 1
  18. #define configQUEUE_REGISTRY_SIZE 8
  19. #define configUSE_QUEUE_SETS 1
  20. #define configUSE_TIME_SLICING 1
  21. #define configUSE_NEWLIB_REENTRANT 0
  22. // todo need this for lwip FreeRTOS sys_arch to compile
  23. #define configENABLE_BACKWARD_COMPATIBILITY 1
  24. #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
  25. /* System */
  26. #define configSTACK_DEPTH_TYPE uint32_t
  27. #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
  28. /* Memory allocation related definitions. */
  29. #define configSUPPORT_STATIC_ALLOCATION 0
  30. #define configSUPPORT_DYNAMIC_ALLOCATION 1
  31. #define configTOTAL_HEAP_SIZE (48 * 1024)
  32. #define configAPPLICATION_ALLOCATED_HEAP 0
  33. /* Hook function related definitions. */
  34. #define configCHECK_FOR_STACK_OVERFLOW 0
  35. #define configUSE_MALLOC_FAILED_HOOK 0
  36. #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
  37. /* Run time and task stats gathering related definitions. */
  38. #define configGENERATE_RUN_TIME_STATS 0
  39. #define configUSE_TRACE_FACILITY 1
  40. #define configUSE_STATS_FORMATTING_FUNCTIONS 0
  41. /* Co-routine related definitions. */
  42. #define configUSE_CO_ROUTINES 0
  43. #define configMAX_CO_ROUTINE_PRIORITIES 1
  44. /* Software timer related definitions. */
  45. #define configUSE_TIMERS 1
  46. #define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
  47. #define configTIMER_QUEUE_LENGTH 10
  48. #define configTIMER_TASK_STACK_DEPTH 1024
  49. /* Interrupt nesting behaviour configuration. */
  50. /*
  51. #define configKERNEL_INTERRUPT_PRIORITY [dependent of processor]
  52. #define configMAX_SYSCALL_INTERRUPT_PRIORITY [dependent on processor and application]
  53. #define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application]
  54. */
  55. #define configNUMBER_OF_CORES 2
  56. /* SMP (configNUMBER_OF_CORES > 1) only */
  57. #define configTICK_CORE 0
  58. #define configRUN_MULTIPLE_PRIORITIES 1
  59. #if configNUMBER_OF_CORES > 1
  60. #define configUSE_CORE_AFFINITY 1
  61. #endif
  62. #define configUSE_PASSIVE_IDLE_HOOK 0
  63. /* Armv8-M */
  64. /* Not currently supported */
  65. #define configENABLE_MPU 0
  66. #define configENABLE_FPU 1
  67. /* Not currently supported */
  68. #define configENABLE_TRUSTZONE 0
  69. #define configRUN_FREERTOS_SECURE_ONLY 1
  70. // see https://www.freertos.org/RTOS-Cortex-M3-M4.html
  71. #define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
  72. /* RP2xxx specific */
  73. #define configSUPPORT_PICO_SYNC_INTEROP 1
  74. #define configSUPPORT_PICO_TIME_INTEROP 1
  75. #include <assert.h>
  76. /* Define to trap errors during development. */
  77. #define configASSERT(x) assert(x)
  78. /* Set the following definitions to 1 to include the API function, or zero
  79. to exclude the API function. */
  80. #define INCLUDE_vTaskPrioritySet 1
  81. #define INCLUDE_uxTaskPriorityGet 1
  82. #define INCLUDE_vTaskDelete 1
  83. #define INCLUDE_vTaskSuspend 1
  84. #define INCLUDE_vTaskDelayUntil 1
  85. #define INCLUDE_vTaskDelay 1
  86. #define INCLUDE_xTaskGetSchedulerState 1
  87. #define INCLUDE_xTaskGetCurrentTaskHandle 1
  88. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  89. #define INCLUDE_xTaskGetIdleTaskHandle 1
  90. #define INCLUDE_eTaskGetState 1
  91. #define INCLUDE_xTimerPendFunctionCall 1
  92. #define INCLUDE_xTaskAbortDelay 1
  93. #define INCLUDE_xTaskGetHandle 1
  94. #define INCLUDE_xTaskResumeFromISR 1
  95. #define INCLUDE_xQueueGetMutexHolder 1
  96. #endif // FREERTOS_CONFIG_H