-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFreeRTOSConfig.h
217 lines (147 loc) · 7.28 KB
/
FreeRTOSConfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/*
* FreeRTOS Kernel V10.3.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright (C) 2010-2020 Xilinx, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software. If you wish to use our Amazon
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
*
* THE SOFTWARE IS PROVIDED "AS-IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* http://www.FreeRTOS.org
* http://aws.amazon.com/freertos
*
* 1 tab == 4 spaces!
*/
#ifndef _FREERTOSCONFIG_H
#define _FREERTOSCONFIG_H
#include "xparameters.h"
#include "bspconfig.h"
//HETEROGENEOUSRTOS ADDITIONAL CONFIGS
#define configMAX_RT_TASKS (4)
//#define configVERBOSE_CTX_SWITCH_FOR_FPGA_SCHEDULER
//#define configSCHEDULER_SOFTWARE
//#define configFAULTDETECTOR_SOFTWARE
#define configIGNORE_FAULTS_DETECTED_BY_SW_FAULT_DETECTOR
//define configDISABLE_ONLINE_TRAINING
#define configCRITICALITY_LEVELS (3)
//FPGA SCHEDULER
//#define configJOBEND_OVERHEAD_IN_FPGA_SCHEDULER_TICKS (58.0)
//
//#define configATOMIC_OVERHEAD_IN_FPGA_SCHEDULER_TICKS (509.0)
//
//#define configATOMIC_OVERHEAD_WITH_REEXECUTION_IN_FPGA_SCHEDULER_TICKS (528.0)
#define configFPGA_SCHEDULER_PERIOD_IN_MICROS (0.2)
#define configJOBEND_OVERHEAD_FPGA_SCHEDULER_IN_MICROS (1.188)
#define configATOMIC_OVERHEAD_FPGA_SCHEDULER_IN_MICROS (5.738)
#define configATOMIC_OVERHEAD_WITH_REEXECUTION_FPGA_SCHEDULER_IN_MICROS (6.022)
//SOFTWARE SCHEDULER
#define configTICK_PERIOD_IN_MICROS (100.000)
#define configJOBEND_OVERHEAD_SOFTWARE_SCHEDULER_IN_MICROS (0.446)
#define configATOMIC_SOFTWARE_SCHEDULER_OVERHEAD_IN_MICROS (17.550)
#define configATOMIC_SOFTWARE_SCHEDULER_OVERHEAD_WITH_REEXECUTION_IN_MICROS (17.634)
//#define configTICK_PERIOD_IN_MICROS (1.000)
//
//#define configJOBEND_OVERHEAD_SOFTWARE_SCHEDULER_IN_MICROS (0.0)
//
//#define configATOMIC_SOFTWARE_SCHEDULER_OVERHEAD_IN_MICROS (0.0)
#define configATOMIC_SOFTWARE_SCHEDULER_OVERHEAD_WITH_REEXECUTION_IN_MICROS (0.0)
//depending on the (sometimes hardcoded) sizes of fields in
//FAULTDETECTOR_controlStr,
//FAULTDETECTOR_testpointDescriptorStr
//and FAULTDETECTOR_testpointShortDescriptorStr
//forces some memory accesses optimisations. NOTE that the order of the first fields of such structs (uniId, executionId and checkId) must ALWAYS match between them, as well as field sizes.
//In case of changing field sizes and/or order of such structs, check the code marked with the following define:
#define configENABLE_STRUCTS_SPECIFIC_MEMORY_OPTIMISATIONS_FOR_FAULT_DETECTOR
//and adapt it to the new structs. To disable enforcing such optimisations comment the define.
//to reduce the memory accesses in blockIfFaultDetected() when no fault is experienced, checking whether a fault has happened can be avoided if the fault detector has been synthesized to output an invalid executionId (such as current executionId-1) for the last examined testPoint in case of fault to make the task wait forever.
//#define configOPTIMISATION_ON_FAULT_FAULT_DETECTOR_WRITES_PREVIOUS_EXECUTION_ID
//_________________________________
#define configUSE_PREEMPTION 1
//mutexes not supported yet with custom EDF-VD scheduler on FPGA
#define configUSE_MUTEXES 0
#define INCLUDE_xSemaphoreGetMutexHolder 1
//mutexes not supported yet with custom EDF-VD scheduler on FPGA
#define configUSE_RECURSIVE_MUTEXES 0
#define configUSE_COUNTING_SEMAPHORES 1
#define configUSE_TIMERS 0
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
#define configUSE_MALLOC_FAILED_HOOK 1
#define configUSE_TRACE_FACILITY 1
#define configUSE_NEWLIB_REENTRANT 0
#define configSTREAM_BUFFER 0
#define configMESSAGE_BUFFER 0
#define configSUPPORT_STATIC_ALLOCATION 0
#define configUSE_16_BIT_TICKS 0
#define configUSE_APPLICATION_TASK_TAG 0
#define configUSE_CO_ROUTINES 0
#define configTICK_RATE_HZ (10000)
#define configMAX_PRIORITIES (8)
#define configMAX_CO_ROUTINE_PRIORITIES 2
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 200)
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 65536 ) )
#define configMAX_TASK_NAME_LEN 10
#define configIDLE_SHOULD_YIELD 1
#define configUSE_TIME_SLICING 1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH ((configMINIMAL_STACK_SIZE) * 2)
#define configASSERT( x ) if( ( x ) == 0 ) vApplicationAssert( __FILE__, __LINE__ )
#define configUSE_QUEUE_SETS 1
#define configUSE_TASK_NOTIFICATIONS 1
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_TASK_FPU_SUPPORT 1
#define configQUEUE_REGISTRY_SIZE 10
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
#define configGENERATE_RUN_TIME_STATS 0
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
#define portGET_RUN_TIME_COUNTER_VALUE()
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#define configUSE_TICKLESS_IDLE 0
#define configTASK_RETURN_ADDRESS prvTaskExitError
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 1
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_eTaskGetState 1
#define INCLUDE_xTimerPendFunctionCall 0
#define INCLUDE_pcTaskGetTaskName 1
#define INCLUDE_xTaskGetHandle 1
#define portPOINTER_SIZE_TYPE uint32_t
#define portTICK_TYPE_IS_ATOMIC 1
#define configMESSAGE_BUFFER_LENGTH_TYPE uint32_t
#define configSTACK_DEPTH_TYPE uint32_t
#define configMAX_API_CALL_INTERRUPT_PRIORITY (18)
#define configINTERRUPT_CONTROLLER_BASE_ADDRESS ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )
#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )
#define configUNIQUE_INTERRUPT_PRIORITIES 32
void vApplicationAssert( const char *pcFile, uint32_t ulLine );
void FreeRTOS_SetupTickInterrupt( void );
#define configSETUP_TICK_INTERRUPT() FreeRTOS_SetupTickInterrupt()
void FreeRTOS_ClearTickInterrupt( void );
#define configCLEAR_TICK_INTERRUPT() FreeRTOS_ClearTickInterrupt()
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortSetInterruptMask()
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask(x)
#ifdef FREERTOS_ENABLE_TRACE
#include "FreeRTOSSTMTrace.h"
#endif /* FREERTOS_ENABLE_TRACE */
#endif