Francisco Paez / freertos

Dependents:   frdm_k64f_freertos_lib

Committer:
fep
Date:
Wed May 31 02:27:10 2017 +0000
Revision:
0:62cd296ba2a7
FreeRTOS v9.0.0 for Cortex-M4F (FRDM-K64F and others...)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fep 0:62cd296ba2a7 1 /*
fep 0:62cd296ba2a7 2 FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
fep 0:62cd296ba2a7 3 All rights reserved
fep 0:62cd296ba2a7 4
fep 0:62cd296ba2a7 5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
fep 0:62cd296ba2a7 6
fep 0:62cd296ba2a7 7 This file is part of the FreeRTOS distribution.
fep 0:62cd296ba2a7 8
fep 0:62cd296ba2a7 9 FreeRTOS is free software; you can redistribute it and/or modify it under
fep 0:62cd296ba2a7 10 the terms of the GNU General Public License (version 2) as published by the
fep 0:62cd296ba2a7 11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
fep 0:62cd296ba2a7 12
fep 0:62cd296ba2a7 13 ***************************************************************************
fep 0:62cd296ba2a7 14 >>! NOTE: The modification to the GPL is included to allow you to !<<
fep 0:62cd296ba2a7 15 >>! distribute a combined work that includes FreeRTOS without being !<<
fep 0:62cd296ba2a7 16 >>! obliged to provide the source code for proprietary components !<<
fep 0:62cd296ba2a7 17 >>! outside of the FreeRTOS kernel. !<<
fep 0:62cd296ba2a7 18 ***************************************************************************
fep 0:62cd296ba2a7 19
fep 0:62cd296ba2a7 20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
fep 0:62cd296ba2a7 21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
fep 0:62cd296ba2a7 22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
fep 0:62cd296ba2a7 23 link: http://www.freertos.org/a00114.html
fep 0:62cd296ba2a7 24
fep 0:62cd296ba2a7 25 ***************************************************************************
fep 0:62cd296ba2a7 26 * *
fep 0:62cd296ba2a7 27 * FreeRTOS provides completely free yet professionally developed, *
fep 0:62cd296ba2a7 28 * robust, strictly quality controlled, supported, and cross *
fep 0:62cd296ba2a7 29 * platform software that is more than just the market leader, it *
fep 0:62cd296ba2a7 30 * is the industry's de facto standard. *
fep 0:62cd296ba2a7 31 * *
fep 0:62cd296ba2a7 32 * Help yourself get started quickly while simultaneously helping *
fep 0:62cd296ba2a7 33 * to support the FreeRTOS project by purchasing a FreeRTOS *
fep 0:62cd296ba2a7 34 * tutorial book, reference manual, or both: *
fep 0:62cd296ba2a7 35 * http://www.FreeRTOS.org/Documentation *
fep 0:62cd296ba2a7 36 * *
fep 0:62cd296ba2a7 37 ***************************************************************************
fep 0:62cd296ba2a7 38
fep 0:62cd296ba2a7 39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
fep 0:62cd296ba2a7 40 the FAQ page "My application does not run, what could be wrong?". Have you
fep 0:62cd296ba2a7 41 defined configASSERT()?
fep 0:62cd296ba2a7 42
fep 0:62cd296ba2a7 43 http://www.FreeRTOS.org/support - In return for receiving this top quality
fep 0:62cd296ba2a7 44 embedded software for free we request you assist our global community by
fep 0:62cd296ba2a7 45 participating in the support forum.
fep 0:62cd296ba2a7 46
fep 0:62cd296ba2a7 47 http://www.FreeRTOS.org/training - Investing in training allows your team to
fep 0:62cd296ba2a7 48 be as productive as possible as early as possible. Now you can receive
fep 0:62cd296ba2a7 49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
fep 0:62cd296ba2a7 50 Ltd, and the world's leading authority on the world's leading RTOS.
fep 0:62cd296ba2a7 51
fep 0:62cd296ba2a7 52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
fep 0:62cd296ba2a7 53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
fep 0:62cd296ba2a7 54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
fep 0:62cd296ba2a7 55
fep 0:62cd296ba2a7 56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
fep 0:62cd296ba2a7 57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
fep 0:62cd296ba2a7 58
fep 0:62cd296ba2a7 59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
fep 0:62cd296ba2a7 60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
fep 0:62cd296ba2a7 61 licenses offer ticketed support, indemnification and commercial middleware.
fep 0:62cd296ba2a7 62
fep 0:62cd296ba2a7 63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
fep 0:62cd296ba2a7 64 engineered and independently SIL3 certified version for use in safety and
fep 0:62cd296ba2a7 65 mission critical applications that require provable dependability.
fep 0:62cd296ba2a7 66
fep 0:62cd296ba2a7 67 1 tab == 4 spaces!
fep 0:62cd296ba2a7 68 */
fep 0:62cd296ba2a7 69
fep 0:62cd296ba2a7 70 #ifndef MPU_WRAPPERS_H
fep 0:62cd296ba2a7 71 #define MPU_WRAPPERS_H
fep 0:62cd296ba2a7 72
fep 0:62cd296ba2a7 73 /* This file redefines API functions to be called through a wrapper macro, but
fep 0:62cd296ba2a7 74 only for ports that are using the MPU. */
fep 0:62cd296ba2a7 75 #ifdef portUSING_MPU_WRAPPERS
fep 0:62cd296ba2a7 76
fep 0:62cd296ba2a7 77 /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is
fep 0:62cd296ba2a7 78 included from queue.c or task.c to prevent it from having an effect within
fep 0:62cd296ba2a7 79 those files. */
fep 0:62cd296ba2a7 80 #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
fep 0:62cd296ba2a7 81
fep 0:62cd296ba2a7 82 /*
fep 0:62cd296ba2a7 83 * Map standard (non MPU) API functions to equivalents that start
fep 0:62cd296ba2a7 84 * "MPU_". This will cause the application code to call the MPU_
fep 0:62cd296ba2a7 85 * version, which wraps the non-MPU version with privilege promoting
fep 0:62cd296ba2a7 86 * then demoting code, so the kernel code always runs will full
fep 0:62cd296ba2a7 87 * privileges.
fep 0:62cd296ba2a7 88 */
fep 0:62cd296ba2a7 89
fep 0:62cd296ba2a7 90 /* Map standard tasks.h API functions to the MPU equivalents. */
fep 0:62cd296ba2a7 91 #define xTaskCreate MPU_xTaskCreate
fep 0:62cd296ba2a7 92 #define xTaskCreateStatic MPU_xTaskCreateStatic
fep 0:62cd296ba2a7 93 #define xTaskCreateRestricted MPU_xTaskCreateRestricted
fep 0:62cd296ba2a7 94 #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions
fep 0:62cd296ba2a7 95 #define vTaskDelete MPU_vTaskDelete
fep 0:62cd296ba2a7 96 #define vTaskDelay MPU_vTaskDelay
fep 0:62cd296ba2a7 97 #define vTaskDelayUntil MPU_vTaskDelayUntil
fep 0:62cd296ba2a7 98 #define xTaskAbortDelay MPU_xTaskAbortDelay
fep 0:62cd296ba2a7 99 #define uxTaskPriorityGet MPU_uxTaskPriorityGet
fep 0:62cd296ba2a7 100 #define eTaskGetState MPU_eTaskGetState
fep 0:62cd296ba2a7 101 #define vTaskGetInfo MPU_vTaskGetInfo
fep 0:62cd296ba2a7 102 #define vTaskPrioritySet MPU_vTaskPrioritySet
fep 0:62cd296ba2a7 103 #define vTaskSuspend MPU_vTaskSuspend
fep 0:62cd296ba2a7 104 #define vTaskResume MPU_vTaskResume
fep 0:62cd296ba2a7 105 #define vTaskSuspendAll MPU_vTaskSuspendAll
fep 0:62cd296ba2a7 106 #define xTaskResumeAll MPU_xTaskResumeAll
fep 0:62cd296ba2a7 107 #define xTaskGetTickCount MPU_xTaskGetTickCount
fep 0:62cd296ba2a7 108 #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks
fep 0:62cd296ba2a7 109 #define pcTaskGetName MPU_pcTaskGetName
fep 0:62cd296ba2a7 110 #define xTaskGetHandle MPU_xTaskGetHandle
fep 0:62cd296ba2a7 111 #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark
fep 0:62cd296ba2a7 112 #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
fep 0:62cd296ba2a7 113 #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
fep 0:62cd296ba2a7 114 #define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer
fep 0:62cd296ba2a7 115 #define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer
fep 0:62cd296ba2a7 116 #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
fep 0:62cd296ba2a7 117 #define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle
fep 0:62cd296ba2a7 118 #define uxTaskGetSystemState MPU_uxTaskGetSystemState
fep 0:62cd296ba2a7 119 #define vTaskList MPU_vTaskList
fep 0:62cd296ba2a7 120 #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats
fep 0:62cd296ba2a7 121 #define xTaskGenericNotify MPU_xTaskGenericNotify
fep 0:62cd296ba2a7 122 #define xTaskNotifyWait MPU_xTaskNotifyWait
fep 0:62cd296ba2a7 123 #define ulTaskNotifyTake MPU_ulTaskNotifyTake
fep 0:62cd296ba2a7 124 #define xTaskNotifyStateClear MPU_xTaskNotifyStateClear
fep 0:62cd296ba2a7 125
fep 0:62cd296ba2a7 126 #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
fep 0:62cd296ba2a7 127 #define vTaskSetTimeOutState MPU_vTaskSetTimeOutState
fep 0:62cd296ba2a7 128 #define xTaskCheckForTimeOut MPU_xTaskCheckForTimeOut
fep 0:62cd296ba2a7 129 #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
fep 0:62cd296ba2a7 130
fep 0:62cd296ba2a7 131 /* Map standard queue.h API functions to the MPU equivalents. */
fep 0:62cd296ba2a7 132 #define xQueueGenericSend MPU_xQueueGenericSend
fep 0:62cd296ba2a7 133 #define xQueueGenericReceive MPU_xQueueGenericReceive
fep 0:62cd296ba2a7 134 #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting
fep 0:62cd296ba2a7 135 #define uxQueueSpacesAvailable MPU_uxQueueSpacesAvailable
fep 0:62cd296ba2a7 136 #define vQueueDelete MPU_vQueueDelete
fep 0:62cd296ba2a7 137 #define xQueueCreateMutex MPU_xQueueCreateMutex
fep 0:62cd296ba2a7 138 #define xQueueCreateMutexStatic MPU_xQueueCreateMutexStatic
fep 0:62cd296ba2a7 139 #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore
fep 0:62cd296ba2a7 140 #define xQueueCreateCountingSemaphoreStatic MPU_xQueueCreateCountingSemaphoreStatic
fep 0:62cd296ba2a7 141 #define xQueueGetMutexHolder MPU_xQueueGetMutexHolder
fep 0:62cd296ba2a7 142 #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive
fep 0:62cd296ba2a7 143 #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive
fep 0:62cd296ba2a7 144 #define xQueueGenericCreate MPU_xQueueGenericCreate
fep 0:62cd296ba2a7 145 #define xQueueGenericCreateStatic MPU_xQueueGenericCreateStatic
fep 0:62cd296ba2a7 146 #define xQueueCreateSet MPU_xQueueCreateSet
fep 0:62cd296ba2a7 147 #define xQueueAddToSet MPU_xQueueAddToSet
fep 0:62cd296ba2a7 148 #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet
fep 0:62cd296ba2a7 149 #define xQueueSelectFromSet MPU_xQueueSelectFromSet
fep 0:62cd296ba2a7 150 #define xQueueGenericReset MPU_xQueueGenericReset
fep 0:62cd296ba2a7 151
fep 0:62cd296ba2a7 152 #if( configQUEUE_REGISTRY_SIZE > 0 )
fep 0:62cd296ba2a7 153 #define vQueueAddToRegistry MPU_vQueueAddToRegistry
fep 0:62cd296ba2a7 154 #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue
fep 0:62cd296ba2a7 155 #define pcQueueGetName MPU_pcQueueGetName
fep 0:62cd296ba2a7 156 #endif
fep 0:62cd296ba2a7 157
fep 0:62cd296ba2a7 158 /* Map standard timer.h API functions to the MPU equivalents. */
fep 0:62cd296ba2a7 159 #define xTimerCreate MPU_xTimerCreate
fep 0:62cd296ba2a7 160 #define xTimerCreateStatic MPU_xTimerCreateStatic
fep 0:62cd296ba2a7 161 #define pvTimerGetTimerID MPU_pvTimerGetTimerID
fep 0:62cd296ba2a7 162 #define vTimerSetTimerID MPU_vTimerSetTimerID
fep 0:62cd296ba2a7 163 #define xTimerIsTimerActive MPU_xTimerIsTimerActive
fep 0:62cd296ba2a7 164 #define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle
fep 0:62cd296ba2a7 165 #define xTimerPendFunctionCall MPU_xTimerPendFunctionCall
fep 0:62cd296ba2a7 166 #define pcTimerGetName MPU_pcTimerGetName
fep 0:62cd296ba2a7 167 #define xTimerGetPeriod MPU_xTimerGetPeriod
fep 0:62cd296ba2a7 168 #define xTimerGetExpiryTime MPU_xTimerGetExpiryTime
fep 0:62cd296ba2a7 169 #define xTimerGenericCommand MPU_xTimerGenericCommand
fep 0:62cd296ba2a7 170
fep 0:62cd296ba2a7 171 /* Map standard event_group.h API functions to the MPU equivalents. */
fep 0:62cd296ba2a7 172 #define xEventGroupCreate MPU_xEventGroupCreate
fep 0:62cd296ba2a7 173 #define xEventGroupCreateStatic MPU_xEventGroupCreateStatic
fep 0:62cd296ba2a7 174 #define xEventGroupWaitBits MPU_xEventGroupWaitBits
fep 0:62cd296ba2a7 175 #define xEventGroupClearBits MPU_xEventGroupClearBits
fep 0:62cd296ba2a7 176 #define xEventGroupSetBits MPU_xEventGroupSetBits
fep 0:62cd296ba2a7 177 #define xEventGroupSync MPU_xEventGroupSync
fep 0:62cd296ba2a7 178 #define vEventGroupDelete MPU_vEventGroupDelete
fep 0:62cd296ba2a7 179
fep 0:62cd296ba2a7 180 /* Remove the privileged function macro. */
fep 0:62cd296ba2a7 181 #define PRIVILEGED_FUNCTION
fep 0:62cd296ba2a7 182
fep 0:62cd296ba2a7 183 #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
fep 0:62cd296ba2a7 184
fep 0:62cd296ba2a7 185 /* Ensure API functions go in the privileged execution section. */
fep 0:62cd296ba2a7 186 #define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions")))
fep 0:62cd296ba2a7 187 #define PRIVILEGED_DATA __attribute__((section("privileged_data")))
fep 0:62cd296ba2a7 188
fep 0:62cd296ba2a7 189 #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
fep 0:62cd296ba2a7 190
fep 0:62cd296ba2a7 191 #else /* portUSING_MPU_WRAPPERS */
fep 0:62cd296ba2a7 192
fep 0:62cd296ba2a7 193 #define PRIVILEGED_FUNCTION
fep 0:62cd296ba2a7 194 #define PRIVILEGED_DATA
fep 0:62cd296ba2a7 195 #define portUSING_MPU_WRAPPERS 0
fep 0:62cd296ba2a7 196
fep 0:62cd296ba2a7 197 #endif /* portUSING_MPU_WRAPPERS */
fep 0:62cd296ba2a7 198
fep 0:62cd296ba2a7 199
fep 0:62cd296ba2a7 200 #endif /* MPU_WRAPPERS_H */
fep 0:62cd296ba2a7 201
fep 0:62cd296ba2a7 202