FreeRTOSConfig.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. * FreeRTOS V202112.00
  3. * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  6. * this software and associated documentation files (the "Software"), to deal in
  7. * the Software without restriction, including without limitation the rights to
  8. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  9. * the Software, and to permit persons to whom the Software is furnished to do so,
  10. * subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  17. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  18. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  19. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * https://www.FreeRTOS.org
  23. * https://aws.amazon.com/freertos
  24. *
  25. */
  26. #ifndef FREERTOS_CONFIG_H
  27. #define FREERTOS_CONFIG_H
  28. /*-----------------------------------------------------------
  29. * Application specific definitions.
  30. *
  31. * These definitions should be adjusted for your particular hardware and
  32. * application requirements.
  33. *
  34. * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
  35. * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
  36. *
  37. * See http://www.freertos.org/a00110.html
  38. *----------------------------------------------------------*/
  39. //not used
  40. #define configUSE_PREEMPTION 1
  41. #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
  42. #define configUSE_QUEUE_SETS 1
  43. #define configUSE_IDLE_HOOK 0
  44. #define configUSE_TICK_HOOK 1
  45. #define configCPU_CLOCK_HZ ( SystemCoreClock )
  46. #define configTICK_RATE_HZ ( 1000 )
  47. #define configMAX_PRIORITIES ( 5 )
  48. #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
  49. #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 46 * 1024 ) )
  50. #define configMAX_TASK_NAME_LEN ( 10 )
  51. #define configUSE_TRACE_FACILITY 1
  52. #define configUSE_16_BIT_TICKS 0
  53. #define configIDLE_SHOULD_YIELD 1
  54. #define configQUEUE_REGISTRY_SIZE 8
  55. #define configCHECK_FOR_STACK_OVERFLOW 2
  56. #define configUSE_MALLOC_FAILED_HOOK 1
  57. #define configUSE_APPLICATION_TASK_TAG 0
  58. #define configUSE_COUNTING_SEMAPHORES 1
  59. /* The full demo always has tasks to run so the tick will never be turned off.
  60. The blinky demo will use the default tickless idle implementation to turn the
  61. tick off. */
  62. #define configUSE_TICKLESS_IDLE 0
  63. /* Run time stats gathering definitions. */
  64. #define configGENERATE_RUN_TIME_STATS 0
  65. /* This demo makes use of one or more example stats formatting functions. These
  66. format the raw data provided by the uxTaskGetSystemState() function in to human
  67. readable ASCII form. See the notes in the implementation of vTaskList() within
  68. FreeRTOS/Source/tasks.c for limitations. */
  69. #define configUSE_STATS_FORMATTING_FUNCTIONS 1
  70. /* Co-routine definitions. */
  71. #define configUSE_CO_ROUTINES 0
  72. #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
  73. /* Software timer definitions. */
  74. #define configUSE_TIMERS 1
  75. #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
  76. #define configTIMER_QUEUE_LENGTH 5
  77. #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
  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_vTaskCleanUpResources 1
  84. #define INCLUDE_vTaskSuspend 1
  85. #define INCLUDE_vTaskDelayUntil 1
  86. #define INCLUDE_vTaskDelay 1
  87. #define INCLUDE_eTaskGetState 1
  88. #define INCLUDE_xTimerPendFunctionCall 1
  89. /* Cortex-M specific definitions. */
  90. #ifdef __NVIC_PRIO_BITS
  91. /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
  92. #define configPRIO_BITS __NVIC_PRIO_BITS
  93. #else
  94. #define configPRIO_BITS 4 /* 15 priority levels */
  95. #endif
  96. /* The lowest interrupt priority that can be used in a call to a "set priority"
  97. function. */
  98. #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
  99. /* The highest interrupt priority that can be used by any interrupt service
  100. routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
  101. INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
  102. PRIORITY THAN THIS! (higher priorities are lower numeric values. */
  103. #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 4
  104. /* Interrupt priorities used by the kernel port layer itself. These are generic
  105. to all Cortex-M ports, and do not rely on any particular library functions. */
  106. #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  107. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  108. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  109. #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  110. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
  111. standard names. */
  112. #define xPortPendSVHandler PendSV_Handler
  113. #define vPortSVCHandler SVC_Handler
  114. #define xPortSysTickHandler SysTick_Handler
  115. //used
  116. #define configUSE_MUTEXES 1
  117. #define configSUPPORT_DYNAMIC_ALLOCATION 1
  118. #define configSUPPORT_STATIC_ALLOCATION 1
  119. #define configUSE_RECURSIVE_MUTEXES 1
  120. #endif /* FREERTOS_CONFIG_H */