FreeRTOSConfig.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /* USER CODE BEGIN Header */
  2. /*
  3. * FreeRTOS Kernel V10.3.1
  4. * Portion Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  5. * Portion Copyright (C) 2019 StMicroelectronics, Inc. All Rights Reserved.
  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. * http://www.FreeRTOS.org
  25. * http://aws.amazon.com/freertos
  26. *
  27. * 1 tab == 4 spaces!
  28. */
  29. /* USER CODE END Header */
  30. #ifndef FREERTOS_CONFIG_H
  31. #define FREERTOS_CONFIG_H
  32. /*-----------------------------------------------------------
  33. * Application specific definitions.
  34. *
  35. * These definitions should be adjusted for your particular hardware and
  36. * application requirements.
  37. *
  38. * These parameters and more are described within the 'configuration' section of the
  39. * FreeRTOS API documentation available on the FreeRTOS.org web site.
  40. *
  41. * See http://www.freertos.org/a00110.html
  42. *----------------------------------------------------------*/
  43. /* USER CODE BEGIN Includes */
  44. /* Section where include file can be added */
  45. /* USER CODE END Includes */
  46. /* Ensure definitions are only used by the compiler, and not by the assembler. */
  47. #if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
  48. #include <stdint.h>
  49. extern uint32_t SystemCoreClock;
  50. #endif
  51. #ifndef CMSIS_device_header
  52. #define CMSIS_device_header "stm32h7xx.h"
  53. #endif /* CMSIS_device_header */
  54. #define configENABLE_FPU 0
  55. #define configENABLE_MPU 0
  56. #define configUSE_PREEMPTION 1
  57. #define configSUPPORT_STATIC_ALLOCATION 1
  58. #define configSUPPORT_DYNAMIC_ALLOCATION 1
  59. #define configUSE_IDLE_HOOK 0
  60. #define configUSE_TICK_HOOK 0
  61. #define configCPU_CLOCK_HZ ( SystemCoreClock )
  62. #define configTICK_RATE_HZ ((TickType_t)1000)
  63. #define configMAX_PRIORITIES ( 56 )
  64. #define configMINIMAL_STACK_SIZE ((uint16_t)512)
  65. #define configTOTAL_HEAP_SIZE ((size_t)64*1024)
  66. #define configMAX_TASK_NAME_LEN ( 16 )
  67. #define configUSE_TRACE_FACILITY 1
  68. #define configUSE_16_BIT_TICKS 0
  69. #define configUSE_MUTEXES 1
  70. #define configQUEUE_REGISTRY_SIZE 8
  71. #define configCHECK_FOR_STACK_OVERFLOW 1
  72. #define configUSE_RECURSIVE_MUTEXES 1
  73. #define configUSE_COUNTING_SEMAPHORES 1
  74. #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
  75. /* USER CODE BEGIN MESSAGE_BUFFER_LENGTH_TYPE */
  76. /* Defaults to size_t for backward compatibility, but can be changed
  77. if lengths will always be less than the number of bytes in a size_t. */
  78. #define configMESSAGE_BUFFER_LENGTH_TYPE size_t
  79. /* USER CODE END MESSAGE_BUFFER_LENGTH_TYPE */
  80. /* Co-routine definitions. */
  81. #define configUSE_CO_ROUTINES 0
  82. #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
  83. /* Software timer definitions. */
  84. #define configUSE_TIMERS 1
  85. #define configTIMER_TASK_PRIORITY ( 2 )
  86. #define configTIMER_QUEUE_LENGTH 10
  87. #define configTIMER_TASK_STACK_DEPTH 1024
  88. /* The following flag must be enabled only when using newlib */
  89. #define configUSE_NEWLIB_REENTRANT 1
  90. /* CMSIS-RTOS V2 flags */
  91. #define configUSE_OS2_THREAD_SUSPEND_RESUME 1
  92. #define configUSE_OS2_THREAD_ENUMERATE 1
  93. #define configUSE_OS2_EVENTFLAGS_FROM_ISR 1
  94. #define configUSE_OS2_THREAD_FLAGS 1
  95. #define configUSE_OS2_TIMER 1
  96. #define configUSE_OS2_MUTEX 1
  97. /* Set the following definitions to 1 to include the API function, or zero
  98. to exclude the API function. */
  99. #define INCLUDE_vTaskPrioritySet 1
  100. #define INCLUDE_uxTaskPriorityGet 1
  101. #define INCLUDE_vTaskDelete 1
  102. #define INCLUDE_vTaskCleanUpResources 0
  103. #define INCLUDE_vTaskSuspend 1
  104. #define INCLUDE_vTaskDelayUntil 1
  105. #define INCLUDE_vTaskDelay 1
  106. #define INCLUDE_xTaskGetSchedulerState 1
  107. #define INCLUDE_xTimerPendFunctionCall 1
  108. #define INCLUDE_xQueueGetMutexHolder 1
  109. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  110. #define INCLUDE_xTaskGetCurrentTaskHandle 1
  111. #define INCLUDE_eTaskGetState 1
  112. /*
  113. * The CMSIS-RTOS V2 FreeRTOS wrapper is dependent on the heap implementation used
  114. * by the application thus the correct define need to be enabled below
  115. */
  116. #define USE_FreeRTOS_HEAP_4
  117. /* Cortex-M specific definitions. */
  118. #ifdef __NVIC_PRIO_BITS
  119. /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
  120. #define configPRIO_BITS __NVIC_PRIO_BITS
  121. #else
  122. #define configPRIO_BITS 4
  123. #endif
  124. /* The lowest interrupt priority that can be used in a call to a "set priority"
  125. function. */
  126. #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
  127. /* The highest interrupt priority that can be used by any interrupt service
  128. routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
  129. INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
  130. PRIORITY THAN THIS! (higher priorities are lower numeric values. */
  131. #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
  132. /* Interrupt priorities used by the kernel port layer itself. These are generic
  133. to all Cortex-M ports, and do not rely on any particular library functions. */
  134. #define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  135. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  136. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  137. #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
  138. /* Normal assert() semantics without relying on the provision of an assert.h
  139. header file. */
  140. /* USER CODE BEGIN 1 */
  141. #define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );}
  142. /* USER CODE END 1 */
  143. /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
  144. standard names. */
  145. #define vPortSVCHandler SVC_Handler
  146. #define xPortPendSVHandler PendSV_Handler
  147. /* IMPORTANT: After 10.3.1 update, Systick_Handler comes from NVIC (if SYS timebase = systick), otherwise from cmsis_os2.c */
  148. #define USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION 0
  149. /* USER CODE BEGIN Defines */
  150. /* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
  151. /* USER CODE END Defines */
  152. #endif /* FREERTOS_CONFIG_H */