FreeRTOSConfig.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 15
  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 0
  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*8 )
  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 14
  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 14
  92. #define configTIMER_QUEUE_LENGTH 10
  93. #define configTIMER_TASK_STACK_DEPTH 256
  94. #define configIDLE_TASK_STACK_DEPTH 512
  95. /* Tickless Idle Mode */
  96. #define configUSE_TICKLESS_IDLE 0
  97. /* QUEUE */
  98. #define configQUEUE_REGISTRY_SIZE 2
  99. #define configUSE_QUEUE_SETS 0
  100. /* Optional functions - most linkers will remove unused functions anyway. */
  101. #define INCLUDE_vTaskPrioritySet 1
  102. #define INCLUDE_uxTaskPriorityGet 1
  103. #define INCLUDE_vTaskDelete 1
  104. #define INCLUDE_vTaskSuspend 1
  105. #define INCLUDE_vTaskDelayUntil 1
  106. #define INCLUDE_vTaskDelay 1
  107. #define INCLUDE_xTaskGetSchedulerState 1
  108. #define INCLUDE_xTaskGetCurrentTaskHandle 1
  109. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  110. #define INCLUDE_uxTaskGetStackHighWaterMark2 0
  111. #define INCLUDE_xTaskGetIdleTaskHandle 0
  112. #define INCLUDE_eTaskGetState 1
  113. #define INCLUDE_xEventGroupSetBitFromISR 1
  114. #define INCLUDE_xTimerPendFunctionCall 1
  115. #define INCLUDE_xTaskAbortDelay 1
  116. #define INCLUDE_xTaskGetHandle 1
  117. #define INCLUDE_xTaskResumeFromISR 1
  118. #define INCLUDE_xQueueGetMutexHolder 1
  119. /* Run time stats gathering definitions. */
  120. #ifdef __GNUC__
  121. /* The #ifdef just prevents this C specific syntax from being included in
  122. assembly files. */
  123. void vMainConfigureTimerForRunTimeStats( void );
  124. unsigned long ulMainGetRunTimeCounterValue( void );
  125. #endif
  126. /* Cortex-M specific definitions. */
  127. #ifdef __NVIC_PRIO_BITS
  128. #define configPRIO_BITS __NVIC_PRIO_BITS
  129. #else
  130. #define configPRIO_BITS 4
  131. #endif
  132. /* The lowest interrupt priority that can be used in a call to a "set priority"
  133. function. */
  134. #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY (0x01)
  135. /* Interrupt priorities used by the kernel port layer itself. These are generic
  136. to all Cortex-M ports, and do not rely on any particular library functions. */
  137. #ifndef configKERNEL_INTERRUPT_PRIORITY
  138. #define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8-configPRIO_BITS))
  139. #endif
  140. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  141. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  142. #ifndef configMAX_SYSCALL_INTERRUPT_PRIORITY
  143. #define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8-configPRIO_BITS))
  144. #endif
  145. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
  146. standard names. */
  147. #define vPortSVCHandler SVC_Handler
  148. #define xPortPendSVHandler PendSV_Handler
  149. #define xPortSysTickHandler SysTick_Handler
  150. #endif /* FREERTOS_CONFIG_H */