FreeRTOSConfig.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * FreeRTOS Kernel V10.4.4
  3. * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * SPDX-License-Identifier: MIT
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  8. * this software and associated documentation files (the "Software"), to deal in
  9. * the Software without restriction, including without limitation the rights to
  10. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  11. * the Software, and to permit persons to whom the Software is furnished to do so,
  12. * subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included in all
  15. * copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  19. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  20. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  21. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. *
  24. * https://www.FreeRTOS.org
  25. * https://github.com/FreeRTOS
  26. *
  27. */
  28. #ifndef FREERTOS_CONFIG_H
  29. #define FREERTOS_CONFIG_H
  30. /*-----------------------------------------------------------
  31. * Application specific definitions.
  32. *
  33. * These definitions should be adjusted for your particular hardware and
  34. * application requirements.
  35. *
  36. * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
  37. * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
  38. *
  39. * See http://www.freertos.org/a00110.html.
  40. *----------------------------------------------------------*/
  41. #define configCPU_CLOCK_HZ ( 48000000UL )
  42. #define configTICK_RATE_HZ ((TickType_t) 1000 )
  43. #define configMAX_PRIORITIES 5
  44. #define configMINIMAL_STACK_SIZE ((unsigned short) 90 )
  45. #define configMAX_TASK_NAME_LEN 10
  46. #define configUSE_16_BIT_TICKS 0
  47. #define configIDLE_SHOULD_YIELD 1
  48. #define configUSE_PREEMPTION 1
  49. #define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
  50. #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
  51. #define configUSE_TASK_NOTIFICATIONS 1
  52. #define configUSE_TIME_SLICING 1
  53. #define configUSE_NEWLIB_REENTRANT 0
  54. #define configENABLE_BACKWARD_COMPATIBILITY 1
  55. #define configUSE_POSIX_ERRNO 0
  56. #define configUSE_APPLICATION_TASK_TAG 0
  57. #define configRECORD_STACK_HIGH_ADDRESS 1
  58. /* Definition assert() function. */
  59. #define configASSERT(x) if((x)==0) { taskDISABLE_INTERRUPTS(); for( ;; ); }
  60. /* The highest interrupt priority that can be used by any interrupt service
  61. routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
  62. INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
  63. PRIORITY THAN THIS! (higher priorities are lower numeric values. */
  64. #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY ( 1 )
  65. /* Memory allocation related definitions. */
  66. #define configSUPPORT_STATIC_ALLOCATION 0
  67. #define configSUPPORT_DYNAMIC_ALLOCATION 1
  68. #define configTOTAL_HEAP_SIZE (( size_t ) 8192 )
  69. #define configAPPLICATION_ALLOCATED_HEAP 0
  70. /* Hook function related definitions. */
  71. #define configUSE_IDLE_HOOK 0
  72. #define configUSE_TICK_HOOK 0
  73. #define configUSE_MALLOC_FAILED_HOOK 0
  74. #define configCHECK_FOR_STACK_OVERFLOW 0
  75. #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
  76. /* Run time and task stats gathering related definitions. */
  77. #define configGENERATE_RUN_TIME_STATS 0
  78. #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
  79. #define portGET_RUN_TIME_COUNTER_VALUE() xTaskGetTickCount()
  80. #define configUSE_TRACE_FACILITY 1
  81. #define configUSE_STATS_FORMATTING_FUNCTIONS 1
  82. /* Co-routine related definitions. */
  83. #define configUSE_CO_ROUTINES 0
  84. #define configMAX_CO_ROUTINE_PRIORITIES 2
  85. /* SEMAPHORES and MUTEXS */
  86. #define configUSE_MUTEXES 1
  87. #define configUSE_RECURSIVE_MUTEXES 1
  88. #define configUSE_COUNTING_SEMAPHORES 1
  89. /* Software timer related definitions. */
  90. #define configUSE_TIMERS 1
  91. #define configTIMER_TASK_PRIORITY 2
  92. #define configTIMER_QUEUE_LENGTH 10
  93. #define configTIMER_TASK_STACK_DEPTH 180
  94. /* Tickless Idle Mode */
  95. #define configUSE_TICKLESS_IDLE 0
  96. /* QUEUE */
  97. #define configQUEUE_REGISTRY_SIZE 2
  98. #define configUSE_QUEUE_SETS 0
  99. /* Optional functions - most linkers will remove unused functions anyway. */
  100. #define INCLUDE_vTaskPrioritySet 1
  101. #define INCLUDE_uxTaskPriorityGet 1
  102. #define INCLUDE_vTaskDelete 1
  103. #define INCLUDE_vTaskSuspend 1
  104. #define INCLUDE_vTaskDelayUntil 1
  105. #define INCLUDE_vTaskDelay 1
  106. #define INCLUDE_xTaskGetSchedulerState 1
  107. #define INCLUDE_xTaskGetCurrentTaskHandle 1
  108. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  109. #define INCLUDE_uxTaskGetStackHighWaterMark2 0
  110. #define INCLUDE_xTaskGetIdleTaskHandle 0
  111. #define INCLUDE_eTaskGetState 1
  112. #define INCLUDE_xEventGroupSetBitFromISR 1
  113. #define INCLUDE_xTimerPendFunctionCall 1
  114. #define INCLUDE_xTaskAbortDelay 1
  115. #define INCLUDE_xTaskGetHandle 1
  116. #define INCLUDE_xTaskResumeFromISR 1
  117. #define INCLUDE_xQueueGetMutexHolder 1
  118. /* Run time stats gathering definitions. */
  119. #ifdef __GNUC__
  120. /* The #ifdef just prevents this C specific syntax from being included in
  121. assembly files. */
  122. void vMainConfigureTimerForRunTimeStats( void );
  123. unsigned long ulMainGetRunTimeCounterValue( void );
  124. #endif
  125. /* Cortex-M specific definitions. */
  126. #ifdef __NVIC_PRIO_BITS
  127. #define configPRIO_BITS __NVIC_PRIO_BITS
  128. #else
  129. #define configPRIO_BITS 4
  130. #endif
  131. /* The lowest interrupt priority that can be used in a call to a "set priority"
  132. function. */
  133. #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY (0x0F)
  134. /* Interrupt priorities used by the kernel port layer itself. These are generic
  135. to all Cortex-M ports, and do not rely on any particular library functions. */
  136. #ifndef configKERNEL_INTERRUPT_PRIORITY
  137. #define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8-configPRIO_BITS))
  138. #endif
  139. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  140. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  141. #ifndef configMAX_SYSCALL_INTERRUPT_PRIORITY
  142. #define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8-configPRIO_BITS))
  143. #endif
  144. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
  145. standard names. */
  146. #define vPortSVCHandler SVC_Handler
  147. #define xPortPendSVHandler PendSV_Handler
  148. #define xPortSysTickHandler SysTick_Handler
  149. #endif /* FREERTOS_CONFIG_H */