2 * FreeRTOS Kernel V10.0.1
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
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.
22 * http://www.FreeRTOS.org
23 * http://aws.amazon.com/freertos
29 #ifndef FREERTOS_CONFIG_H
30 #define FREERTOS_CONFIG_H
32 /*-----------------------------------------------------------
33 * Application specific definitions.
35 * These definitions should be adjusted for your particular hardware and
36 * application requirements.
38 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
39 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
41 * See http://www.freertos.org/a00110.html.
42 *----------------------------------------------------------*/
46 #define configCPU_CLOCK_HZ 100000000UL
47 #define configTICK_RATE_HZ ((TickType_t)1000)
48 #define configTOTAL_HEAP_SIZE ((size_t)(4096))
49 #define configMINIMAL_STACK_SIZE ((unsigned short)130)
50 #define configCHECK_FOR_STACK_OVERFLOW 0
51 #define configMAX_PRIORITIES (5)
52 #define configUSE_PREEMPTION 1
53 #define configIDLE_SHOULD_YIELD 1
54 #define configMAX_TASK_NAME_LEN (10)
56 /* Software timer definitions. */
57 #define configUSE_TIMERS 1
58 #define configTIMER_TASK_PRIORITY (2)
59 #define configTIMER_QUEUE_LENGTH 5
60 #define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
62 #define configUSE_MUTEXES 1
63 #define configUSE_RECURSIVE_MUTEXES 1
64 #define configUSE_COUNTING_SEMAPHORES 1
65 #define configUSE_QUEUE_SETS 1
66 #define configUSE_IDLE_HOOK 0
67 #define configUSE_TICK_HOOK 0
68 #define configUSE_MALLOC_FAILED_HOOK 0
69 #define configUSE_16_BIT_TICKS 0
71 /* Set the following definitions to 1 to include the API function, or zero
72 to exclude the API function. */
73 #define INCLUDE_vTaskPrioritySet 1
74 #define INCLUDE_uxTaskPriorityGet 1
75 #define INCLUDE_vTaskDelete 1
76 #define INCLUDE_vTaskSuspend 1
77 #define INCLUDE_vTaskDelayUntil 1
78 #define INCLUDE_vTaskDelay 1
79 #define INCLUDE_eTaskGetState 1
81 /* Normal assert() semantics without relying on the provision of an assert.h header file. */
82 #define configASSERT( x ) if( ( x ) == 0 ) { for( ;; ); }
84 /* Configure interrupt controller specific definitions */
85 #define configINTERRUPT_CONTROLLER_BASE_ADDRESS 0x2C000000
86 #define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x1000
87 #define configUNIQUE_INTERRUPT_PRIORITIES 32
90 * The FreeRTOS Cortex-A port implements a full interrupt nesting model.
92 * Interrupts that are assigned a priority at or below
93 * configMAX_API_CALL_INTERRUPT_PRIORITY (which counter-intuitively in the ARM
94 * generic interrupt controller [GIC] means a priority that has a numerical
95 * value above configMAX_API_CALL_INTERRUPT_PRIORITY) can call FreeRTOS safe API
96 * functions and will nest.
98 * Interrupts that are assigned a priority above
99 * configMAX_API_CALL_INTERRUPT_PRIORITY (which in the GIC means a numerical
100 * value below configMAX_API_CALL_INTERRUPT_PRIORITY) cannot call any FreeRTOS
101 * API functions, will nest, and will not be masked by FreeRTOS critical
102 * sections (although it is necessary for interrupts to be globally disabled
103 * extremely briefly as the interrupt mask is updated in the GIC).
105 * FreeRTOS functions that can be called from an interrupt are those that end in
106 * "FromISR". FreeRTOS maintains a separate interrupt safe API to enable
107 * interrupt entry to be shorter, faster, simpler and smaller.
109 #define configMAX_API_CALL_INTERRUPT_PRIORITY 25
112 * The application must provide a function that configures a peripheral to
113 * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT()
114 * in FreeRTOSConfig.h to call the function.
116 void vConfigureTickInterrupt( void );
117 void vClearTickInterrupt ( void );
119 /* Map the FreeRTOS port timer configuration functions to their implementations */
120 #define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()
121 #define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()
123 /* Map the FreeRTOS IRQ and SVC/SWI handlers to the names used in the C startup
124 code (which is where the vector table is defined). */
125 #define FreeRTOS_IRQ_Handler IRQ_Handler
126 #define FreeRTOS_SWI_Handler SWI_Handler
128 #endif /* FREERTOS_CONFIG_H */