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