Pico-Framework
A web-first embedded framework for C++
Loading...
Searching...
No Matches
FreeRTOSConfig.h
Go to the documentation of this file.
1
/*
2
* FreeRTOS V202111.00
3
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6
* this software and associated documentation files (the "Software"), to deal in
7
* the Software without restriction, including without limitation the rights to
8
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
* the Software, and to permit persons to whom the Software is furnished to do so,
10
* subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in all
13
* copies or substantial portions of the Software.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
*
22
* http://www.FreeRTOS.org
23
* http://aws.amazon.com/freertos
24
*
25
* 1 tab == 4 spaces!
26
*/
27
28
#ifndef FREERTOS_CONFIG_H
29
#define FREERTOS_CONFIG_H
30
31
#ifndef portINLINE
32
#define portINLINE __inline
33
#endif
34
35
/*-----------------------------------------------------------
36
* Application specific definitions.
37
*
38
* These definitions should be adjusted for your particular hardware and
39
* application requirements.
40
*
41
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
42
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
43
*
44
* See http://www.freertos.org/a00110.html
45
*----------------------------------------------------------*/
46
47
#define TaskPrio_Low 1
48
#define TaskPrio_Mid 4
49
#define TaskPrio_High 8
50
#define TaskPrio_Highest 12
51
#define TaskPrio_Network 6
52
#define TaskPrio_Application 10
53
#define TaskPrio_Idle 0
54
#define TaskPrio_Interrupt 15
55
56
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 16
57
58
/* Scheduler Related */
59
#define configUSE_PREEMPTION 1
60
#define configUSE_TICKLESS_IDLE 0
61
#define configUSE_IDLE_HOOK 0
62
#define configUSE_TICK_HOOK 0
63
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
64
#define configMAX_PRIORITIES 32
65
#define configMINIMAL_STACK_SIZE ( configSTACK_DEPTH_TYPE ) 512
66
#define configUSE_16_BIT_TICKS 0
67
68
#define configIDLE_SHOULD_YIELD 1
69
70
/* Synchronization Related */
71
#define configUSE_MUTEXES 1
72
#define configUSE_RECURSIVE_MUTEXES 1
73
#define configUSE_APPLICATION_TASK_TAG 0
74
#define configUSE_COUNTING_SEMAPHORES 1
75
#define configQUEUE_REGISTRY_SIZE 8
76
#define configUSE_QUEUE_SETS 1
77
#define configUSE_TIME_SLICING 1
78
#define configUSE_NEWLIB_REENTRANT 0
79
// todo need this for lwip FreeRTOS sys_arch to compile
80
#define configENABLE_BACKWARD_COMPATIBILITY 1
81
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
82
83
/* System */
84
#define configSTACK_DEPTH_TYPE uint32_t
85
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
86
87
/* Memory allocation related definitions. */
88
#define configSUPPORT_STATIC_ALLOCATION 1
89
#define configSUPPORT_DYNAMIC_ALLOCATION 1
90
91
#ifdef PICO_RP2350
92
#define configTOTAL_HEAP_SIZE ( 200 * 1024 )
93
#else
94
#define configTOTAL_HEAP_SIZE ( 100 * 1024 )
95
#endif
96
97
#define configAPPLICATION_ALLOCATED_HEAP 0
98
99
/* Hook function related definitions. */
100
#define configCHECK_FOR_STACK_OVERFLOW 2
101
#define configASSERT(x) if ((x) == 0) { portDISABLE_INTERRUPTS(); for( ;; ); }
102
103
#define configUSE_MALLOC_FAILED_HOOK 1
104
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
105
106
/* Run time and task stats gathering related definitions. */
107
#define configGENERATE_RUN_TIME_STATS 0
108
#define configUSE_TRACE_FACILITY 1
109
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
110
111
/* Co-routine related definitions. */
112
#define configUSE_CO_ROUTINES 0
113
#define configMAX_CO_ROUTINE_PRIORITIES 1
114
115
/* Software timer related definitions. */
116
#define configUSE_TIMERS 1
117
#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
118
#define configTIMER_QUEUE_LENGTH 10
119
#define configTIMER_TASK_STACK_DEPTH 1024
120
121
/* Interrupt nesting behaviour configuration. */
122
/*
123
#define configKERNEL_INTERRUPT_PRIORITY [dependent of processor]
124
#define configMAX_SYSCALL_INTERRUPT_PRIORITY [dependent on processor and application]
125
#define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application]
126
*/
127
128
#define configNUMBER_OF_CORES 1
129
130
#if FREE_RTOS_KERNEL_SMP
// set by the RP2xxx SMP port of FreeRTOS
131
/* SMP port only */
132
#ifndef configNUMBER_OF_CORES
133
#define configNUMBER_OF_CORES 1
134
#endif
135
#define configNUM_CORES configNUMBER_OF_CORES
136
#define configTICK_CORE 0
137
#define configRUN_MULTIPLE_PRIORITIES 1
138
#if configNUMBER_OF_CORES > 1
139
#define configUSE_CORE_AFFINITY 1
140
#endif
141
#define configUSE_PASSIVE_IDLE_HOOK 0
142
#endif
143
144
/* RP2040 specific */
145
#define configSUPPORT_PICO_SYNC_INTEROP 1
146
#define configSUPPORT_PICO_TIME_INTEROP 1
147
148
#if PICO_RP2350
149
#define portHAS_STACK_OVERFLOW_CHECKING 1
150
#define portUSING_MPU_WRAPPERS 0
151
#define configENABLE_MPU 0
152
#define configENABLE_TRUSTZONE 0
153
#define configRUN_FREERTOS_SECURE_ONLY 1
154
#define configENABLE_FPU 1
155
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
156
#endif
157
158
#include <assert.h>
159
/* Define to trap errors during development. */
160
//#define configASSERT(x) assert(x)
161
162
/* Set the following definitions to 1 to include the API function, or zero
163
to exclude the API function. */
164
#define INCLUDE_vTaskPrioritySet 1
165
#define INCLUDE_uxTaskPriorityGet 1
166
#define INCLUDE_vTaskDelete 1
167
#define INCLUDE_vTaskSuspend 1
168
#define INCLUDE_vTaskDelayUntil 1
169
#define INCLUDE_vTaskDelay 1
170
#define INCLUDE_xTaskGetSchedulerState 1
171
#define INCLUDE_xTaskGetCurrentTaskHandle 1
172
#define INCLUDE_uxTaskGetStackHighWaterMark 1
173
#define INCLUDE_xTaskGetIdleTaskHandle 1
174
#define INCLUDE_eTaskGetState 1
175
#define INCLUDE_xTimerPendFunctionCall 1
176
#define INCLUDE_xTaskAbortDelay 1
177
#define INCLUDE_xTaskGetHandle 1
178
#define INCLUDE_xTaskResumeFromISR 1
179
#define INCLUDE_xQueueGetMutexHolder 1
180
181
#if PICO_RP2350
182
#define configENABLE_MPU 0
183
#define configENABLE_TRUSTZONE 0
184
#define configRUN_FREERTOS_SECURE_ONLY 1
185
#define configENABLE_FPU 1
186
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
187
#define configCPU_CLOCK_HZ 150000000
188
#endif
189
190
// for extended stack information
191
192
#define configRECORD_STACK_HIGH_ADDRESS 1
193
194
195
/* A header file that defines trace macro can be included here. */
196
197
#endif
/* FREERTOS_CONFIG_H */
198
port
FreeRTOSConfig.h
Generated by
1.9.8