Prusa MINI Firmware overview
FreeRTOSConfig.h
Go to the documentation of this file.
1 /* USER CODE BEGIN Header */
2 /*
3  FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
4  All rights reserved
5 
6  VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
7 
8  This file is part of the FreeRTOS distribution.
9 
10  FreeRTOS is free software; you can redistribute it and/or modify it under
11  the terms of the GNU General Public License (version 2) as published by the
12  Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
13 
14  ***************************************************************************
15  >>! NOTE: The modification to the GPL is included to allow you to !<<
16  >>! distribute a combined work that includes FreeRTOS without being !<<
17  >>! obliged to provide the source code for proprietary components !<<
18  >>! outside of the FreeRTOS kernel. !<<
19  ***************************************************************************
20 
21  FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
22  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
23  FOR A PARTICULAR PURPOSE. Full license text is available on the following
24  link: http://www.freertos.org/a00114.html
25 
26  ***************************************************************************
27  * *
28  * FreeRTOS provides completely free yet professionally developed, *
29  * robust, strictly quality controlled, supported, and cross *
30  * platform software that is more than just the market leader, it *
31  * is the industry's de facto standard. *
32  * *
33  * Help yourself get started quickly while simultaneously helping *
34  * to support the FreeRTOS project by purchasing a FreeRTOS *
35  * tutorial book, reference manual, or both: *
36  * http://www.FreeRTOS.org/Documentation *
37  * *
38  ***************************************************************************
39 
40  http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
41  the FAQ page "My application does not run, what could be wrong?". Have you
42  defined configASSERT()?
43 
44  http://www.FreeRTOS.org/support - In return for receiving this top quality
45  embedded software for free we request you assist our global community by
46  participating in the support forum.
47 
48  http://www.FreeRTOS.org/training - Investing in training allows your team to
49  be as productive as possible as early as possible. Now you can receive
50  FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
51  Ltd, and the world's leading authority on the world's leading RTOS.
52 
53  http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
54  including FreeRTOS+Trace - an indispensable productivity tool, a DOS
55  compatible FAT file system, and our tiny thread aware UDP/IP stack.
56 
57  http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
58  Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
59 
60  http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
61  Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
62  licenses offer ticketed support, indemnification and commercial middleware.
63 
64  http://www.SafeRTOS.com - High Integrity Systems also provide a safety
65  engineered and independently SIL3 certified version for use in safety and
66  mission critical applications that require provable dependability.
67 
68  1 tab == 4 spaces!
69 */
70 /* USER CODE END Header */
71 
72 #ifndef FREERTOS_CONFIG_H
73 #define FREERTOS_CONFIG_H
74 
75 /*-----------------------------------------------------------
76  * Application specific definitions.
77  *
78  * These definitions should be adjusted for your particular hardware and
79  * application requirements.
80  *
81  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
82  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
83  *
84  * See http://www.freertos.org/a00110.html.
85  *----------------------------------------------------------*/
86 
87 /* USER CODE BEGIN Includes */
88 /* Section where include file can be added */
89 #define traceTASK_SWITCHED_IN() \
90  extern void StartIdleMonitor(void); \
91  StartIdleMonitor()
92 #define traceTASK_SWITCHED_OUT() \
93  extern void EndIdleMonitor(void); \
94  EndIdleMonitor()
95 /* USER CODE END Includes */
96 
97 /* Ensure stdint is only used by the compiler, and not the assembler. */
98 #if defined(__ICCARM__) || defined(__CC_ARM) || defined(__GNUC__)
99  #include <stdint.h>
100 extern uint32_t SystemCoreClock;
101 #endif
102 
103 #define configUSE_PREEMPTION 1
104 #define configSUPPORT_STATIC_ALLOCATION 0
105 #define configSUPPORT_DYNAMIC_ALLOCATION 1
106 #define configUSE_IDLE_HOOK 1
107 #define configUSE_TICK_HOOK 1
108 #define configCPU_CLOCK_HZ (SystemCoreClock)
109 #define configTICK_RATE_HZ ((TickType_t)1000)
110 #define configMAX_PRIORITIES (7)
111 #define configMINIMAL_STACK_SIZE ((uint16_t)128)
112 #define configTOTAL_HEAP_SIZE ((size_t)49152)
113 #define configMAX_TASK_NAME_LEN (16)
114 #define configUSE_16_BIT_TICKS 0
115 #define configUSE_MUTEXES 1
116 #define configQUEUE_REGISTRY_SIZE 8
117 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
118 
119 /* Co-routine definitions. */
120 #define configUSE_CO_ROUTINES 0
121 #define configMAX_CO_ROUTINE_PRIORITIES (2)
122 
123 /* Set the following definitions to 1 to include the API function, or zero
124 to exclude the API function. */
125 #define INCLUDE_vTaskPrioritySet 1
126 #define INCLUDE_uxTaskPriorityGet 1
127 #define INCLUDE_vTaskDelete 1
128 #define INCLUDE_vTaskCleanUpResources 0
129 #define INCLUDE_vTaskSuspend 1
130 #define INCLUDE_vTaskDelayUntil 0
131 #define INCLUDE_vTaskDelay 1
132 #define INCLUDE_xTaskGetSchedulerState 1
133 
134 /* Cortex-M specific definitions. */
135 #ifdef __NVIC_PRIO_BITS
136  /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
137  #define configPRIO_BITS __NVIC_PRIO_BITS
138 #else
139  #define configPRIO_BITS 4
140 #endif
141 
142 /* The lowest interrupt priority that can be used in a call to a "set priority"
143 function. */
144 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
145 
146 /* The highest interrupt priority that can be used by any interrupt service
147 routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
148 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
149 PRIORITY THAN THIS! (higher priorities are lower numeric values. */
150 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
151 
152 /* Interrupt priorities used by the kernel port layer itself. These are generic
153 to all Cortex-M ports, and do not rely on any particular library functions. */
154 #define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
155 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
156 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
157 #define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
158 
159 /* Normal assert() semantics without relying on the provision of an assert.h
160 header file. */
161 /* USER CODE BEGIN 1 */
162 #define configASSERT(x) \
163  if ((x) == 0) { \
164  taskDISABLE_INTERRUPTS(); \
165  for (;;) \
166  ; \
167  }
168 /* USER CODE END 1 */
169 
170 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
171 standard names. */
172 #define vPortSVCHandler SVC_Handler
173 #define xPortPendSVHandler PendSV_Handler
174 
175 /* IMPORTANT: This define is commented when used with STM32Cube firmware, when timebase is systick,
176  to prevent overwriting SysTick_Handler defined within STM32Cube HAL */
177 #define xPortSysTickHandler SysTick_Handler
178 
179 /* USER CODE BEGIN Defines */
180 /* Section where parameter definitions can be added (for instance, to override default ones in FreeRTOS.h) */
181 /* USER CODE END Defines */
182 
183 #endif /* FREERTOS_CONFIG_H */
SystemCoreClock
#define SystemCoreClock
Definition: HAL.h:27