Plant Monitor SAM3X8E
Loading...
Searching...
No Matches
FreeRTOSConfig.h
Go to the documentation of this file.
1/*
2 * FreeRTOS Kernel <DEVELOPMENT BRANCH>
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
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all 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,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 *
25 * https://www.FreeRTOS.org
26 * https://github.com/FreeRTOS
27 *
28 */
29
30/*******************************************************************************
31 * This file provides an example FreeRTOSConfig.h header file, inclusive of an
32 * abbreviated explanation of each configuration item. Online and reference
33 * documentation provides more information.
34 * https://www.freertos.org/a00110.html
35 *
36 * Constant values enclosed in square brackets ('[' and ']') must be completed
37 * before this file will build.
38 *
39 * Use the FreeRTOSConfig.h supplied with the RTOS port in use rather than this
40 * generic file, if one is available.
41 ******************************************************************************/
42
43#ifndef FREERTOS_CONFIG_H
44#define FREERTOS_CONFIG_H
45
46/******************************************************************************/
47/* Hardware description related definitions. **********************************/
48/******************************************************************************/
49
50/* In most cases, configCPU_CLOCK_HZ must be set to the frequency of the clock
51 * that drives the peripheral used to generate the kernels periodic tick
52 * interrupt. The default value is set to 20MHz and matches the QEMU demo
53 * settings. Your application will certainly need a different value so set this
54 * correctly. This is very often, but not always, equal to the main system clock
55 * frequency. */
56#define configCPU_CLOCK_HZ ( ( unsigned long ) 84000000 )
57
58/* configSYSTICK_CLOCK_HZ is an optional parameter for ARM Cortex-M ports only.
59 *
60 * By default ARM Cortex-M ports generate the RTOS tick interrupt from the
61 * Cortex-M SysTick timer. Most Cortex-M MCUs run the SysTick timer at the same
62 * frequency as the MCU itself - when that is the case configSYSTICK_CLOCK_HZ is
63 * not needed and should be left undefined. If the SysTick timer is clocked at a
64 * different frequency to the MCU core then set configCPU_CLOCK_HZ to the MCU
65 * clock frequency, as normal, and configSYSTICK_CLOCK_HZ to the SysTick clock
66 * frequency. Not used if left undefined.
67 * The default value is undefined (commented out). If you need this value bring
68 * it back and set it to a suitable value. */
69
70/*
71 #define configSYSTICK_CLOCK_HZ [Platform specific]
72 */
73
74/******************************************************************************/
75/* Scheduling behaviour related definitions. **********************************/
76/******************************************************************************/
77
78/* configTICK_RATE_HZ sets frequency of the tick interrupt in Hz, normally
79 * calculated from the configCPU_CLOCK_HZ value. */
80#define configTICK_RATE_HZ 100
81
82/* Set configUSE_PREEMPTION to 1 to use pre-emptive scheduling. Set
83 * configUSE_PREEMPTION to 0 to use co-operative scheduling.
84 * See https://www.freertos.org/single-core-amp-smp-rtos-scheduling.html. */
85#define configUSE_PREEMPTION 1
86
87/* Set configUSE_TIME_SLICING to 1 to have the scheduler switch between Ready
88 * state tasks of equal priority on every tick interrupt. Set
89 * configUSE_TIME_SLICING to 0 to prevent the scheduler switching between Ready
90 * state tasks just because there was a tick interrupt. See
91 * https://freertos.org/single-core-amp-smp-rtos-scheduling.html. */
92#define configUSE_TIME_SLICING 0
93
94/* Set configUSE_PORT_OPTIMISED_TASK_SELECTION to 1 to select the next task to
95 * run using an algorithm optimised to the instruction set of the target
96 * hardware - normally using a count leading zeros assembly instruction. Set to
97 * 0 to select the next task to run using a generic C algorithm that works for
98 * all FreeRTOS ports. Not all FreeRTOS ports have this option. Defaults to 0
99 * if left undefined. */
100#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
101
102/* Set configUSE_TICKLESS_IDLE to 1 to use the low power tickless mode. Set to
103 * 0 to keep the tick interrupt running at all times. Not all FreeRTOS ports
104 * support tickless mode. See
105 * https://www.freertos.org/low-power-tickless-rtos.html Defaults to 0 if left
106 * undefined. */
107#define configUSE_TICKLESS_IDLE 0
108
109/* configMAX_PRIORITIES Sets the number of available task priorities. Tasks can
110 * be assigned priorities of 0 to (configMAX_PRIORITIES - 1). Zero is the
111 * lowest priority. */
112#define configMAX_PRIORITIES 5
113
114/* configMINIMAL_STACK_SIZE defines the size of the stack used by the Idle task
115 * (in words, not in bytes!). The kernel does not use this constant for any
116 * other purpose. Demo applications use the constant to make the demos somewhat
117 * portable across hardware architectures. */
118#define configMINIMAL_STACK_SIZE 128
119
120/* configMAX_TASK_NAME_LEN sets the maximum length (in characters) of a task's
121 * human readable name. Includes the NULL terminator. */
122#define configMAX_TASK_NAME_LEN 16
123
124/* Time is measured in 'ticks' - which is the number of times the tick interrupt
125 * has executed since the RTOS kernel was started.
126 * The tick count is held in a variable of type TickType_t.
127 *
128 * configTICK_TYPE_WIDTH_IN_BITS controls the type (and therefore bit-width) of
129 * TickType_t:
130 *
131 * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_16_BITS causes
132 * TickType_t to be defined (typedef'ed) as an unsigned 16-bit type.
133 *
134 * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_32_BITS causes
135 * TickType_t to be defined (typedef'ed) as an unsigned 32-bit type.
136 *
137 * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_64_BITS causes
138 * TickType_t to be defined (typedef'ed) as an unsigned 64-bit type. */
139#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_32_BITS
140
141/* Set configIDLE_SHOULD_YIELD to 1 to have the Idle task yield to an
142 * application task if there is an Idle priority (priority 0) application task
143 * that can run. Set to 0 to have the Idle task use all of its timeslice.
144 * Default to 1 if left undefined. */
145#define configIDLE_SHOULD_YIELD 1
146
147/* Each task has an array of task notifications.
148 * configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the
149 * array. See https://www.freertos.org/RTOS-task-notifications.html Defaults to
150 * 1 if left undefined. */
151#define configTASK_NOTIFICATION_ARRAY_ENTRIES 1
152
153/* configQUEUE_REGISTRY_SIZE sets the maximum number of queues and semaphores
154 * that can be referenced from the queue registry. Only required when using a
155 * kernel aware debugger. Defaults to 0 if left undefined. */
156#define configQUEUE_REGISTRY_SIZE 0
157
158/* Set configENABLE_BACKWARD_COMPATIBILITY to 1 to map function names and
159 * datatypes from old version of FreeRTOS to their latest equivalent. Defaults
160 * to 1 if left undefined. */
161#define configENABLE_BACKWARD_COMPATIBILITY 0
162
163/* Each task has its own array of pointers that can be used as thread local
164 * storage. configNUM_THREAD_LOCAL_STORAGE_POINTERS set the number of indexes
165 * in the array. See
166 * https://www.freertos.org/thread-local-storage-pointers.html Defaults to 0 if
167 * left undefined. */
168#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0
169
170/* When configUSE_MINI_LIST_ITEM is set to 0, MiniListItem_t and ListItem_t are
171 * both the same. When configUSE_MINI_LIST_ITEM is set to 1, MiniListItem_t
172 * contains 3 fewer fields than ListItem_t which saves some RAM at the cost of
173 * violating strict aliasing rules which some compilers depend on for
174 * optimization. Defaults to 1 if left undefined. */
175#define configUSE_MINI_LIST_ITEM 1
176
177/* Sets the type used by the parameter to xTaskCreate() that specifies the stack
178 * size of the task being created. The same type is used to return information
179 * about stack usage in various other API calls. Defaults to size_t if left
180 * undefined. */
181#define configSTACK_DEPTH_TYPE size_t
182
183/* configMESSAGE_BUFFER_LENGTH_TYPE sets the type used to store the length of
184 * each message written to a FreeRTOS message buffer (the length is also written
185 * to the message buffer. Defaults to size_t if left undefined - but that may
186 * waste space if messages never go above a length that could be held in a
187 * uint8_t. */
188#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
189
190/* If configHEAP_CLEAR_MEMORY_ON_FREE is set to 1, then blocks of memory
191 * allocated using pvPortMalloc() will be cleared (i.e. set to zero) when freed
192 * using vPortFree(). Defaults to 0 if left undefined. */
193#define configHEAP_CLEAR_MEMORY_ON_FREE 1
194
195/* vTaskList and vTaskGetRunTimeStats APIs take a buffer as a parameter and
196 * assume that the length of the buffer is configSTATS_BUFFER_MAX_LENGTH.
197 * Defaults to 0xFFFF if left undefined. New applications are recommended to use
198 * vTaskListTasks and vTaskGetRunTimeStatistics APIs instead and supply the
199 * length of the buffer explicitly to avoid memory corruption. */
200#define configSTATS_BUFFER_MAX_LENGTH 0xFFFF
201
202/* Set configUSE_NEWLIB_REENTRANT to 1 to have a newlib reent structure
203 * allocated for each task. Set to 0 to not support newlib reent structures.
204 * Default to 0 if left undefined.
205 *
206 * Note Newlib support has been included by popular demand, but is not used or
207 * tested by the FreeRTOS maintainers themselves. FreeRTOS is not responsible
208 * for resulting newlib operation. User must be familiar with newlib and must
209 * provide system-wide implementations of the necessary stubs. Note that (at the
210 * time of writing) the current newlib design implements a system-wide malloc()
211 * that must be provided with locks. */
212#define configUSE_NEWLIB_REENTRANT 0
213
214/******************************************************************************/
215/* Software timer related definitions. ****************************************/
216/******************************************************************************/
217
218/* Set configUSE_TIMERS to 1 to include software timer functionality in the
219 * build. Set to 0 to exclude software timer functionality from the build. The
220 * FreeRTOS/source/timers.c source file must be included in the build if
221 * configUSE_TIMERS is set to 1. Default to 0 if left undefined. See
222 * https://www.freertos.org/RTOS-software-timer.html. */
223#define configUSE_TIMERS 1
224
225/* configTIMER_TASK_PRIORITY sets the priority used by the timer task. Only
226 * used if configUSE_TIMERS is set to 1. The timer task is a standard FreeRTOS
227 * task, so its priority is set like any other task. See
228 * https://www.freertos.org/RTOS-software-timer-service-daemon-task.html Only
229 * used if configUSE_TIMERS is set to 1. */
230#define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
231
232/* configTIMER_TASK_STACK_DEPTH sets the size of the stack allocated to the
233 * timer task (in words, not in bytes!). The timer task is a standard FreeRTOS
234 * task. See
235 * https://www.freertos.org/RTOS-software-timer-service-daemon-task.html Only
236 * used if configUSE_TIMERS is set to 1. */
237#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
238
239/* configTIMER_QUEUE_LENGTH sets the length of the queue (the number of discrete
240 * items the queue can hold) used to send commands to the timer task. See
241 * https://www.freertos.org/RTOS-software-timer-service-daemon-task.html Only
242 * used if configUSE_TIMERS is set to 1. */
243#define configTIMER_QUEUE_LENGTH 10
244
245/******************************************************************************/
246/* Event Group related definitions. *******************************************/
247/******************************************************************************/
248
249/* Set configUSE_EVENT_GROUPS to 1 to include event group functionality in the
250 * build. Set to 0 to exclude event group functionality from the build. The
251 * FreeRTOS/source/event_groups.c source file must be included in the build if
252 * configUSE_EVENT_GROUPS is set to 1. Defaults to 1 if left undefined. */
253
254#define configUSE_EVENT_GROUPS 1
255
256/******************************************************************************/
257/* Stream Buffer related definitions. *****************************************/
258/******************************************************************************/
259
260/* Set configUSE_STREAM_BUFFERS to 1 to include stream buffer functionality in
261 * the build. Set to 0 to exclude event group functionality from the build. The
262 * FreeRTOS/source/stream_buffer.c source file must be included in the build if
263 * configUSE_STREAM_BUFFERS is set to 1. Defaults to 1 if left undefined. */
264
265#define configUSE_STREAM_BUFFERS 1
266
267/******************************************************************************/
268/* Memory allocation related definitions. *************************************/
269/******************************************************************************/
270
271/* Set configSUPPORT_STATIC_ALLOCATION to 1 to include FreeRTOS API functions
272 * that create FreeRTOS objects (tasks, queues, etc.) using statically allocated
273 * memory in the build. Set to 0 to exclude the ability to create statically
274 * allocated objects from the build. Defaults to 0 if left undefined. See
275 * https://www.freertos.org/Static_Vs_Dynamic_Memory_Allocation.html. */
276#define configSUPPORT_STATIC_ALLOCATION 1
277
278/* Set configSUPPORT_DYNAMIC_ALLOCATION to 1 to include FreeRTOS API functions
279 * that create FreeRTOS objects (tasks, queues, etc.) using dynamically
280 * allocated memory in the build. Set to 0 to exclude the ability to create
281 * dynamically allocated objects from the build. Defaults to 1 if left
282 * undefined. See
283 * https://www.freertos.org/Static_Vs_Dynamic_Memory_Allocation.html. */
284#define configSUPPORT_DYNAMIC_ALLOCATION 1
285
286/* Sets the total size of the FreeRTOS heap, in bytes, when heap_1.c, heap_2.c
287 * or heap_4.c are included in the build. This value is defaulted to 4096 bytes
288 * but it must be tailored to each application. Note the heap will appear in
289 * the .bss section. See https://www.freertos.org/a00111.html. */
290#define configTOTAL_HEAP_SIZE 4096
291
292/* Set configAPPLICATION_ALLOCATED_HEAP to 1 to have the application allocate
293 * the array used as the FreeRTOS heap. Set to 0 to have the linker allocate
294 * the array used as the FreeRTOS heap. Defaults to 0 if left undefined. */
295#define configAPPLICATION_ALLOCATED_HEAP 0
296
297/* Set configSTACK_ALLOCATION_FROM_SEPARATE_HEAP to 1 to have task stacks
298 * allocated from somewhere other than the FreeRTOS heap. This is useful if you
299 * want to ensure stacks are held in fast memory. Set to 0 to have task stacks
300 * come from the standard FreeRTOS heap. The application writer must provide
301 * implementations for pvPortMallocStack() and vPortFreeStack() if set to 1.
302 * Defaults to 0 if left undefined. */
303#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
304
305/* Set configENABLE_HEAP_PROTECTOR to 1 to enable bounds checking and
306 * obfuscation to internal heap block pointers in heap_4.c and heap_5.c to help
307 * catch pointer corruptions. Defaults to 0 if left undefined. */
308#define configENABLE_HEAP_PROTECTOR 0
309
310/******************************************************************************/
311/* Interrupt nesting behaviour configuration. *********************************/
312/******************************************************************************/
313
314/* configKERNEL_INTERRUPT_PRIORITY sets the priority of the tick and context
315 * switch performing interrupts. Not supported by all FreeRTOS ports. See
316 * https://www.freertos.org/RTOS-Cortex-M3-M4.html for information specific to
317 * ARM Cortex-M devices. */
318#define configKERNEL_INTERRUPT_PRIORITY 240
319
320/* configMAX_SYSCALL_INTERRUPT_PRIORITY sets the interrupt priority above which
321 * FreeRTOS API calls must not be made. Interrupts above this priority are
322 * never disabled, so never delayed by RTOS activity. The default value is set
323 * to the highest interrupt priority (0). Not supported by all FreeRTOS ports.
324 * See https://www.freertos.org/RTOS-Cortex-M3-M4.html for information specific
325 * to ARM Cortex-M devices. */
326#define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
327
328/* Another name for configMAX_SYSCALL_INTERRUPT_PRIORITY - the name used depends
329 * on the FreeRTOS port. */
330#define configMAX_API_CALL_INTERRUPT_PRIORITY 16
331
332/******************************************************************************/
333/* Hook and callback function related definitions. ****************************/
334/******************************************************************************/
335
336/* Set the following configUSE_* constants to 1 to include the named hook
337 * functionality in the build. Set to 0 to exclude the hook functionality from
338 * the build. The application writer is responsible for providing the hook
339 * function for any set to 1. See https://www.freertos.org/a00016.html. */
340#define configUSE_IDLE_HOOK 0
341#define configUSE_TICK_HOOK 0
342#define configUSE_MALLOC_FAILED_HOOK 0
343#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
344
345/* Set configUSE_SB_COMPLETED_CALLBACK to 1 to have send and receive completed
346 * callbacks for each instance of a stream buffer or message buffer. When the
347 * option is set to 1, APIs xStreamBufferCreateWithCallback() and
348 * xStreamBufferCreateStaticWithCallback() (and likewise APIs for message
349 * buffer) can be used to create a stream buffer or message buffer instance
350 * with application provided callbacks. Defaults to 0 if left undefined. */
351#define configUSE_SB_COMPLETED_CALLBACK 0
352
353/* Set configCHECK_FOR_STACK_OVERFLOW to 1 or 2 for FreeRTOS to check for a
354 * stack overflow at the time of a context switch. Set to 0 to not look for a
355 * stack overflow. If configCHECK_FOR_STACK_OVERFLOW is 1 then the check only
356 * looks for the stack pointer being out of bounds when a task's context is
357 * saved to its stack - this is fast but somewhat ineffective. If
358 * configCHECK_FOR_STACK_OVERFLOW is 2 then the check looks for a pattern
359 * written to the end of a task's stack having been overwritten. This is
360 * slower, but will catch most (but not all) stack overflows. The application
361 * writer must provide the stack overflow callback when
362 * configCHECK_FOR_STACK_OVERFLOW is set to 1. See
363 * https://www.freertos.org/Stacks-and-stack-overflow-checking.html Defaults to
364 * 0 if left undefined. */
365#define configCHECK_FOR_STACK_OVERFLOW 0
366
367/******************************************************************************/
368/* Run time and task stats gathering related definitions. *********************/
369/******************************************************************************/
370
371/* Set configGENERATE_RUN_TIME_STATS to 1 to have FreeRTOS collect data on the
372 * processing time used by each task. Set to 0 to not collect the data. The
373 * application writer needs to provide a clock source if set to 1. Defaults to
374 * 0 if left undefined. See https://www.freertos.org/rtos-run-time-stats.html.
375 */
376#define configGENERATE_RUN_TIME_STATS 0
377
378/* Set configUSE_TRACE_FACILITY to include additional task structure members
379 * are used by trace and visualisation functions and tools. Set to 0 to exclude
380 * the additional information from the structures. Defaults to 0 if left
381 * undefined. */
382#define configUSE_TRACE_FACILITY 0
383
384/* Set to 1 to include the vTaskList() and vTaskGetRunTimeStats() functions in
385 * the build. Set to 0 to exclude these functions from the build. These two
386 * functions introduce a dependency on string formatting functions that would
387 * otherwise not exist - hence they are kept separate. Defaults to 0 if left
388 * undefined. */
389#define configUSE_STATS_FORMATTING_FUNCTIONS 0
390
391/******************************************************************************/
392/* Co-routine related definitions. ********************************************/
393/******************************************************************************/
394
395/* Set configUSE_CO_ROUTINES to 1 to include co-routine functionality in the
396 * build, or 0 to omit co-routine functionality from the build. To include
397 * co-routines, croutine.c must be included in the project. Defaults to 0 if
398 * left undefined. */
399#define configUSE_CO_ROUTINES 0
400
401/* configMAX_CO_ROUTINE_PRIORITIES defines the number of priorities available
402 * to the application co-routines. Any number of co-routines can share the same
403 * priority. Defaults to 0 if left undefined. */
404#define configMAX_CO_ROUTINE_PRIORITIES 1
405
406/******************************************************************************/
407/* Debugging assistance. ******************************************************/
408/******************************************************************************/
409
410/* configASSERT() has the same semantics as the standard C assert(). It can
411 * either be defined to take an action when the assertion fails, or not defined
412 * at all (i.e. comment out or delete the definitions) to completely remove
413 * assertions. configASSERT() can be defined to anything you want, for example
414 * you can call a function if an assert fails that passes the filename and line
415 * number of the failing assert (for example, "vAssertCalled( __FILE__, __LINE__
416 * )" or it can simple disable interrupts and sit in a loop to halt all
417 * execution on the failing line for viewing in a debugger. */
418
419/* *INDENT-OFF* */
420#define configASSERT( x ) \
421 if( ( x ) == 0 ) \
422 { \
423 taskDISABLE_INTERRUPTS(); \
424 for( ; ; ) \
425 ; \
426 }
427/* *INDENT-ON* */
428
429/******************************************************************************/
430/* FreeRTOS MPU specific definitions. *****************************************/
431/******************************************************************************/
432
433/* If configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS is set to 1 then
434 * the application writer can provide functions that execute in privileged mode.
435 * See:
436 * https://www.freertos.org/a00110.html#configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS
437 * Defaults to 0 if left undefined. Only used by the FreeRTOS Cortex-M MPU
438 * ports, not the standard ARMv7-M Cortex-M port. */
439#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
440
441/* Set configTOTAL_MPU_REGIONS to the number of MPU regions implemented on your
442 * target hardware. Normally 8 or 16. Only used by the FreeRTOS Cortex-M MPU
443 * ports, not the standard ARMv7-M Cortex-M port. Defaults to 8 if left
444 * undefined. */
445#define configTOTAL_MPU_REGIONS 8
446
447/* configTEX_S_C_B_FLASH allows application writers to override the default
448 * values for the for TEX, Shareable (S), Cacheable (C) and Bufferable (B) bits
449 * for the MPU region covering Flash. Defaults to 0x07UL (which means TEX=000,
450 * S=1, C=1, B=1) if left undefined. Only used by the FreeRTOS Cortex-M MPU
451 * ports, not the standard ARMv7-M Cortex-M port. */
452#define configTEX_S_C_B_FLASH 0x07UL
453
454/* configTEX_S_C_B_SRAM allows application writers to override the default
455 * values for the for TEX, Shareable (S), Cacheable (C) and Bufferable (B) bits
456 * for the MPU region covering RAM. Defaults to 0x07UL (which means TEX=000,
457 * S=1, C=1, B=1) if left undefined. Only used by the FreeRTOS Cortex-M MPU
458 * ports, not the standard ARMv7-M Cortex-M port. */
459#define configTEX_S_C_B_SRAM 0x07UL
460
461/* Set configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY to 0 to prevent any privilege
462 * escalations originating from outside of the kernel code itself. Set to 1 to
463 * allow application tasks to raise privilege. Defaults to 1 if left undefined.
464 * Only used by the FreeRTOS Cortex-M MPU ports, not the standard ARMv7-M
465 * Cortex-M port. */
466#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY 1
467
468/* Set configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS to 1 to allow unprivileged
469 * tasks enter critical sections (effectively mask interrupts). Set to 0 to
470 * prevent unprivileged tasks entering critical sections. Defaults to 1 if left
471 * undefined. Only used by the FreeRTOS Cortex-M MPU ports, not the standard
472 * ARMv7-M Cortex-M port. */
473#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
474
475/* FreeRTOS Kernel version 10.6.0 introduced a new v2 MPU wrapper, namely
476 * mpu_wrappers_v2.c. Set configUSE_MPU_WRAPPERS_V1 to 0 to use the new v2 MPU
477 * wrapper. Set configUSE_MPU_WRAPPERS_V1 to 1 to use the old v1 MPU wrapper
478 * (mpu_wrappers.c). Defaults to 0 if left undefined. */
479#define configUSE_MPU_WRAPPERS_V1 0
480
481/* When using the v2 MPU wrapper, set configPROTECTED_KERNEL_OBJECT_POOL_SIZE to
482 * the total number of kernel objects, which includes tasks, queues, semaphores,
483 * mutexes, event groups, timers, stream buffers and message buffers, in your
484 * application. The application will not be able to have more than
485 * configPROTECTED_KERNEL_OBJECT_POOL_SIZE kernel objects at any point of
486 * time. */
487#define configPROTECTED_KERNEL_OBJECT_POOL_SIZE 10
488
489/* When using the v2 MPU wrapper, set configSYSTEM_CALL_STACK_SIZE to the size
490 * of the system call stack in words. Each task has a statically allocated
491 * memory buffer of this size which is used as the stack to execute system
492 * calls. For example, if configSYSTEM_CALL_STACK_SIZE is defined as 128 and
493 * there are 10 tasks in the application, the total amount of memory used for
494 * system call stacks is 128 * 10 = 1280 words. */
495#define configSYSTEM_CALL_STACK_SIZE 128
496
497/* When using the v2 MPU wrapper, set configENABLE_ACCESS_CONTROL_LIST to 1 to
498 * enable Access Control List (ACL) feature. When ACL is enabled, an
499 * unprivileged task by default does not have access to any kernel object other
500 * than itself. The application writer needs to explicitly grant the
501 * unprivileged task access to the kernel objects it needs using the APIs
502 * provided for the same. Defaults to 0 if left undefined. */
503#define configENABLE_ACCESS_CONTROL_LIST 1
504
505/******************************************************************************/
506/* SMP( Symmetric MultiProcessing ) Specific Configuration definitions. *******/
507/******************************************************************************/
508
509/* Set configNUMBER_OF_CORES to the number of available processor cores.
510 * Defaults to 1 if left undefined. */
511
512/*
513 #define configNUMBER_OF_CORES [Num of available cores]
514 */
515
516/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one), set
517 * configRUN_MULTIPLE_PRIORITIES to 0 to allow multiple tasks to run
518 * simultaneously only if they do not have equal priority, thereby maintaining
519 * the paradigm of a lower priority task never running if a higher priority task
520 * is able to run. If configRUN_MULTIPLE_PRIORITIES is set to 1, multiple tasks
521 * with different priorities may run simultaneously - so a higher and lower
522 * priority task may run on different cores at the same time. */
523#define configRUN_MULTIPLE_PRIORITIES 0
524
525/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one), set
526 * configUSE_CORE_AFFINITY to 1 to enable core affinity feature. When core
527 * affinity feature is enabled, the vTaskCoreAffinitySet and
528 * vTaskCoreAffinityGet APIs can be used to set and retrieve which cores a task
529 * can run on. If configUSE_CORE_AFFINITY is set to 0 then the FreeRTOS
530 * scheduler is free to run any task on any available core. */
531#define configUSE_CORE_AFFINITY 0
532
533/* When using SMP with core affinity feature enabled, set
534 * configTASK_DEFAULT_CORE_AFFINITY to change the default core affinity mask for
535 * tasks created without an affinity mask specified. Setting the define to 1
536 * would make such tasks run on core 0 and setting it to (1 <<
537 * portGET_CORE_ID()) would make such tasks run on the current core. This config
538 * value is useful, if swapping tasks between cores is not supported (e.g.
539 * Tricore) or if legacy code should be controlled. Defaults to tskNO_AFFINITY
540 * if left undefined. */
541#define configTASK_DEFAULT_CORE_AFFINITY tskNO_AFFINITY
542
543/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one), if
544 * configUSE_TASK_PREEMPTION_DISABLE is set to 1, individual tasks can be set to
545 * either pre-emptive or co-operative mode using the vTaskPreemptionDisable and
546 * vTaskPreemptionEnable APIs. */
547#define configUSE_TASK_PREEMPTION_DISABLE 0
548
549/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one), set
550 * configUSE_PASSIVE_IDLE_HOOK to 1 to allow the application writer to use
551 * the passive idle task hook to add background functionality without the
552 * overhead of a separate task. Defaults to 0 if left undefined. */
553#define configUSE_PASSIVE_IDLE_HOOK 0
554
555/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one),
556 * configTIMER_SERVICE_TASK_CORE_AFFINITY allows the application writer to set
557 * the core affinity of the RTOS Daemon/Timer Service task. Defaults to
558 * tskNO_AFFINITY if left undefined. */
559#define configTIMER_SERVICE_TASK_CORE_AFFINITY tskNO_AFFINITY
560
561/* When using SMP (i.e. configNUMBER_OF_CORES is greater than one), set
562 * configIDLE_AFFINITY to 1 to pin each Idle task to its corresponding
563 * core. When set to 1, Idle task N will only run on core N, using an affinity
564 * mask of (1 << N). Set to 0 to allow the scheduler to run Idle tasks on any
565 * available core. Defaults to 0 if left undefined. */
566#define configIDLE_AFFINITY 0
567
568/******************************************************************************/
569/* ARMv8-M secure side port related definitions. ******************************/
570/******************************************************************************/
571
572/* secureconfigMAX_SECURE_CONTEXTS define the maximum number of tasks that can
573 * call into the secure side of an ARMv8-M chip. Not used by any other ports.
574 */
575#define secureconfigMAX_SECURE_CONTEXTS 5
576
577/* Defines the kernel provided implementation of
578 * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory()
579 * to provide the memory that is used by the Idle task and Timer task
580 * respectively. The application can provide its own implementation of
581 * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by
582 * setting configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */
583#define configKERNEL_PROVIDED_STATIC_MEMORY 1
584
585/******************************************************************************/
586/* ARMv8-M port Specific Configuration definitions. ***************************/
587/******************************************************************************/
588
589/* Set configENABLE_TRUSTZONE to 1 when running FreeRTOS on the non-secure side
590 * to enable the TrustZone support in FreeRTOS ARMv8-M ports which allows the
591 * non-secure FreeRTOS tasks to call the (non-secure callable) functions
592 * exported from secure side. */
593#define configENABLE_TRUSTZONE 1
594
595/* If the application writer does not want to use TrustZone, but the hardware
596 * does not support disabling TrustZone then the entire application (including
597 * the FreeRTOS scheduler) can run on the secure side without ever branching to
598 * the non-secure side. To do that, in addition to setting
599 * configENABLE_TRUSTZONE to 0, also set configRUN_FREERTOS_SECURE_ONLY to 1. */
600#define configRUN_FREERTOS_SECURE_ONLY 1
601
602/* Set configENABLE_MPU to 1 to enable the Memory Protection Unit (MPU), or 0
603 * to leave the Memory Protection Unit disabled. */
604#define configENABLE_MPU 1
605
606/* Set configENABLE_FPU to 1 to enable the Floating Point Unit (FPU), or 0
607 * to leave the Floating Point Unit disabled. */
608#define configENABLE_FPU 1
609
610/* Set configENABLE_MVE to 1 to enable the M-Profile Vector Extension (MVE)
611 * support, or 0 to leave the MVE support disabled. This option is only
612 * applicable to Cortex-M52, Cortex-M55, Cortex-M85 and STAR-MC3 ports as
613 * M-Profile Vector Extension (MVE) is available only on these architectures.
614 * configENABLE_MVE must be left undefined, or defined to 0 for the
615 * Cortex-M23,Cortex-M33 and Cortex-M35P ports. */
616#define configENABLE_MVE 1
617
618/******************************************************************************/
619/* ARMv7-M and ARMv8-M port Specific Configuration definitions. ***************/
620/******************************************************************************/
621
622/* Set configCHECK_HANDLER_INSTALLATION to 1 to enable additional asserts to
623 * verify that the application has correctly installed FreeRTOS interrupt
624 * handlers.
625 *
626 * An application can install FreeRTOS interrupt handlers in one of the
627 * following ways:
628 * 1. Direct Routing - Install the functions vPortSVCHandler and
629 * xPortPendSVHandler for SVC call and PendSV interrupts respectively.
630 * 2. Indirect Routing - Install separate handlers for SVC call and PendSV
631 * interrupts and route program control from those
632 * handlers to vPortSVCHandler and xPortPendSVHandler functions. The
633 * applications that use Indirect Routing must set
634 * configCHECK_HANDLER_INSTALLATION to 0.
635 *
636 * Defaults to 1 if left undefined. */
637#define configCHECK_HANDLER_INSTALLATION 1
638
639#define vPortSVCHandler SVC_Handler
640#define xPortPendSVHandler PendSV_Handler
641#define xPortSysTickHandler SysTick_Handler
642
643/******************************************************************************/
644/* Definitions that include or exclude functionality. *************************/
645/******************************************************************************/
646
647/* Set the following configUSE_* constants to 1 to include the named feature in
648 * the build, or 0 to exclude the named feature from the build. */
649#define configUSE_TASK_NOTIFICATIONS 1
650#define configUSE_MUTEXES 1
651#define configUSE_RECURSIVE_MUTEXES 1
652#define configUSE_COUNTING_SEMAPHORES 1
653#define configUSE_QUEUE_SETS 0
654#define configUSE_APPLICATION_TASK_TAG 0
655
656/* USE_POSIX_ERRNO enables the task global FreeRTOS_errno variable which will
657 * contain the most recent error for that task. */
658#define configUSE_POSIX_ERRNO 0
659
660/* Set the following INCLUDE_* constants to 1 to include the named API function,
661 * or 0 to exclude the named API function. Most linkers will remove unused
662 * functions even when the constant is 1. */
663#define INCLUDE_vTaskPrioritySet 1
664#define INCLUDE_uxTaskPriorityGet 1
665#define INCLUDE_vTaskDelete 1
666#define INCLUDE_vTaskSuspend 1
667#define INCLUDE_xTaskDelayUntil 1
668#define INCLUDE_vTaskDelay 1
669#define INCLUDE_xTaskGetSchedulerState 1
670#define INCLUDE_xTaskGetCurrentTaskHandle 1
671#define INCLUDE_uxTaskGetStackHighWaterMark 0
672#define INCLUDE_xTaskGetIdleTaskHandle 0
673#define INCLUDE_eTaskGetState 0
674#define INCLUDE_xTimerPendFunctionCall 0
675#define INCLUDE_xTaskAbortDelay 0
676#define INCLUDE_xTaskGetHandle 0
677#define INCLUDE_xTaskResumeFromISR 1
678
679#endif /* FREERTOS_CONFIG_H */