www.freertos.org test on stm32f0
Fork of FreeRTOS by
Source/portable/RVDS/ARM_CM0/portmacro.h@1:fc62ab66aa39, 2018-03-02 (annotated)
- Committer:
- thoulin
- Date:
- Fri Mar 02 09:46:03 2018 +0000
- Revision:
- 1:fc62ab66aa39
stm32f030r8 free rtos but,it can not run right.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thoulin | 1:fc62ab66aa39 | 1 | /* |
thoulin | 1:fc62ab66aa39 | 2 | FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. |
thoulin | 1:fc62ab66aa39 | 3 | All rights reserved |
thoulin | 1:fc62ab66aa39 | 4 | |
thoulin | 1:fc62ab66aa39 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. |
thoulin | 1:fc62ab66aa39 | 6 | |
thoulin | 1:fc62ab66aa39 | 7 | *************************************************************************** |
thoulin | 1:fc62ab66aa39 | 8 | * * |
thoulin | 1:fc62ab66aa39 | 9 | * FreeRTOS provides completely free yet professionally developed, * |
thoulin | 1:fc62ab66aa39 | 10 | * robust, strictly quality controlled, supported, and cross * |
thoulin | 1:fc62ab66aa39 | 11 | * platform software that has become a de facto standard. * |
thoulin | 1:fc62ab66aa39 | 12 | * * |
thoulin | 1:fc62ab66aa39 | 13 | * Help yourself get started quickly and support the FreeRTOS * |
thoulin | 1:fc62ab66aa39 | 14 | * project by purchasing a FreeRTOS tutorial book, reference * |
thoulin | 1:fc62ab66aa39 | 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * |
thoulin | 1:fc62ab66aa39 | 16 | * * |
thoulin | 1:fc62ab66aa39 | 17 | * Thank you! * |
thoulin | 1:fc62ab66aa39 | 18 | * * |
thoulin | 1:fc62ab66aa39 | 19 | *************************************************************************** |
thoulin | 1:fc62ab66aa39 | 20 | |
thoulin | 1:fc62ab66aa39 | 21 | This file is part of the FreeRTOS distribution. |
thoulin | 1:fc62ab66aa39 | 22 | |
thoulin | 1:fc62ab66aa39 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under |
thoulin | 1:fc62ab66aa39 | 24 | the terms of the GNU General Public License (version 2) as published by the |
thoulin | 1:fc62ab66aa39 | 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. |
thoulin | 1:fc62ab66aa39 | 26 | |
thoulin | 1:fc62ab66aa39 | 27 | >>! NOTE: The modification to the GPL is included to allow you to distribute |
thoulin | 1:fc62ab66aa39 | 28 | >>! a combined work that includes FreeRTOS without being obliged to provide |
thoulin | 1:fc62ab66aa39 | 29 | >>! the source code for proprietary components outside of the FreeRTOS |
thoulin | 1:fc62ab66aa39 | 30 | >>! kernel. |
thoulin | 1:fc62ab66aa39 | 31 | |
thoulin | 1:fc62ab66aa39 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY |
thoulin | 1:fc62ab66aa39 | 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
thoulin | 1:fc62ab66aa39 | 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following |
thoulin | 1:fc62ab66aa39 | 35 | link: http://www.freertos.org/a00114.html |
thoulin | 1:fc62ab66aa39 | 36 | |
thoulin | 1:fc62ab66aa39 | 37 | 1 tab == 4 spaces! |
thoulin | 1:fc62ab66aa39 | 38 | |
thoulin | 1:fc62ab66aa39 | 39 | *************************************************************************** |
thoulin | 1:fc62ab66aa39 | 40 | * * |
thoulin | 1:fc62ab66aa39 | 41 | * Having a problem? Start by reading the FAQ "My application does * |
thoulin | 1:fc62ab66aa39 | 42 | * not run, what could be wrong?" * |
thoulin | 1:fc62ab66aa39 | 43 | * * |
thoulin | 1:fc62ab66aa39 | 44 | * http://www.FreeRTOS.org/FAQHelp.html * |
thoulin | 1:fc62ab66aa39 | 45 | * * |
thoulin | 1:fc62ab66aa39 | 46 | *************************************************************************** |
thoulin | 1:fc62ab66aa39 | 47 | |
thoulin | 1:fc62ab66aa39 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, |
thoulin | 1:fc62ab66aa39 | 49 | license and Real Time Engineers Ltd. contact details. |
thoulin | 1:fc62ab66aa39 | 50 | |
thoulin | 1:fc62ab66aa39 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, |
thoulin | 1:fc62ab66aa39 | 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS |
thoulin | 1:fc62ab66aa39 | 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. |
thoulin | 1:fc62ab66aa39 | 54 | |
thoulin | 1:fc62ab66aa39 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High |
thoulin | 1:fc62ab66aa39 | 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS |
thoulin | 1:fc62ab66aa39 | 57 | licenses offer ticketed support, indemnification and middleware. |
thoulin | 1:fc62ab66aa39 | 58 | |
thoulin | 1:fc62ab66aa39 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety |
thoulin | 1:fc62ab66aa39 | 60 | engineered and independently SIL3 certified version for use in safety and |
thoulin | 1:fc62ab66aa39 | 61 | mission critical applications that require provable dependability. |
thoulin | 1:fc62ab66aa39 | 62 | |
thoulin | 1:fc62ab66aa39 | 63 | 1 tab == 4 spaces! |
thoulin | 1:fc62ab66aa39 | 64 | */ |
thoulin | 1:fc62ab66aa39 | 65 | |
thoulin | 1:fc62ab66aa39 | 66 | |
thoulin | 1:fc62ab66aa39 | 67 | #ifndef PORTMACRO_H |
thoulin | 1:fc62ab66aa39 | 68 | #define PORTMACRO_H |
thoulin | 1:fc62ab66aa39 | 69 | |
thoulin | 1:fc62ab66aa39 | 70 | #ifdef __cplusplus |
thoulin | 1:fc62ab66aa39 | 71 | extern "C" { |
thoulin | 1:fc62ab66aa39 | 72 | #endif |
thoulin | 1:fc62ab66aa39 | 73 | |
thoulin | 1:fc62ab66aa39 | 74 | /*----------------------------------------------------------- |
thoulin | 1:fc62ab66aa39 | 75 | * Port specific definitions. |
thoulin | 1:fc62ab66aa39 | 76 | * |
thoulin | 1:fc62ab66aa39 | 77 | * The settings in this file configure FreeRTOS correctly for the |
thoulin | 1:fc62ab66aa39 | 78 | * given hardware and compiler. |
thoulin | 1:fc62ab66aa39 | 79 | * |
thoulin | 1:fc62ab66aa39 | 80 | * These settings should not be altered. |
thoulin | 1:fc62ab66aa39 | 81 | *----------------------------------------------------------- |
thoulin | 1:fc62ab66aa39 | 82 | */ |
thoulin | 1:fc62ab66aa39 | 83 | |
thoulin | 1:fc62ab66aa39 | 84 | /* Type definitions. */ |
thoulin | 1:fc62ab66aa39 | 85 | #define portCHAR char |
thoulin | 1:fc62ab66aa39 | 86 | #define portFLOAT float |
thoulin | 1:fc62ab66aa39 | 87 | #define portDOUBLE double |
thoulin | 1:fc62ab66aa39 | 88 | #define portLONG long |
thoulin | 1:fc62ab66aa39 | 89 | #define portSHORT short |
thoulin | 1:fc62ab66aa39 | 90 | #define portSTACK_TYPE unsigned portLONG |
thoulin | 1:fc62ab66aa39 | 91 | #define portBASE_TYPE long |
thoulin | 1:fc62ab66aa39 | 92 | |
thoulin | 1:fc62ab66aa39 | 93 | #if( configUSE_16_BIT_TICKS == 1 ) |
thoulin | 1:fc62ab66aa39 | 94 | typedef unsigned portSHORT portTickType; |
thoulin | 1:fc62ab66aa39 | 95 | #define portMAX_DELAY ( portTickType ) 0xffff |
thoulin | 1:fc62ab66aa39 | 96 | #else |
thoulin | 1:fc62ab66aa39 | 97 | typedef unsigned portLONG portTickType; |
thoulin | 1:fc62ab66aa39 | 98 | #define portMAX_DELAY ( portTickType ) 0xffffffff |
thoulin | 1:fc62ab66aa39 | 99 | #endif |
thoulin | 1:fc62ab66aa39 | 100 | /*-----------------------------------------------------------*/ |
thoulin | 1:fc62ab66aa39 | 101 | |
thoulin | 1:fc62ab66aa39 | 102 | /* Architecture specifics. */ |
thoulin | 1:fc62ab66aa39 | 103 | #define portSTACK_GROWTH ( -1 ) |
thoulin | 1:fc62ab66aa39 | 104 | #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) |
thoulin | 1:fc62ab66aa39 | 105 | #define portBYTE_ALIGNMENT 8 |
thoulin | 1:fc62ab66aa39 | 106 | /*-----------------------------------------------------------*/ |
thoulin | 1:fc62ab66aa39 | 107 | |
thoulin | 1:fc62ab66aa39 | 108 | |
thoulin | 1:fc62ab66aa39 | 109 | /* Scheduler utilities. */ |
thoulin | 1:fc62ab66aa39 | 110 | extern void vPortYield( void ); |
thoulin | 1:fc62ab66aa39 | 111 | #define portNVIC_INT_CTRL_REG ( * ( ( volatile unsigned long * ) 0xe000ed04 ) ) |
thoulin | 1:fc62ab66aa39 | 112 | #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) |
thoulin | 1:fc62ab66aa39 | 113 | #define portYIELD() vPortYield() |
thoulin | 1:fc62ab66aa39 | 114 | #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT |
thoulin | 1:fc62ab66aa39 | 115 | #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) |
thoulin | 1:fc62ab66aa39 | 116 | /*-----------------------------------------------------------*/ |
thoulin | 1:fc62ab66aa39 | 117 | |
thoulin | 1:fc62ab66aa39 | 118 | /* Critical section management. */ |
thoulin | 1:fc62ab66aa39 | 119 | extern void vPortEnterCritical( void ); |
thoulin | 1:fc62ab66aa39 | 120 | extern void vPortExitCritical( void ); |
thoulin | 1:fc62ab66aa39 | 121 | extern unsigned long ulSetInterruptMaskFromISR( void ); |
thoulin | 1:fc62ab66aa39 | 122 | extern void vClearInterruptMaskFromISR( unsigned long ulMask ); |
thoulin | 1:fc62ab66aa39 | 123 | |
thoulin | 1:fc62ab66aa39 | 124 | #define portSET_INTERRUPT_MASK_FROM_ISR() ulSetInterruptMaskFromISR() |
thoulin | 1:fc62ab66aa39 | 125 | #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vClearInterruptMaskFromISR( x ) |
thoulin | 1:fc62ab66aa39 | 126 | #define portDISABLE_INTERRUPTS() __disable_irq() |
thoulin | 1:fc62ab66aa39 | 127 | #define portENABLE_INTERRUPTS() __enable_irq() |
thoulin | 1:fc62ab66aa39 | 128 | #define portENTER_CRITICAL() vPortEnterCritical() |
thoulin | 1:fc62ab66aa39 | 129 | #define portEXIT_CRITICAL() vPortExitCritical() |
thoulin | 1:fc62ab66aa39 | 130 | |
thoulin | 1:fc62ab66aa39 | 131 | /*-----------------------------------------------------------*/ |
thoulin | 1:fc62ab66aa39 | 132 | |
thoulin | 1:fc62ab66aa39 | 133 | /* Task function macros as described on the FreeRTOS.org WEB site. */ |
thoulin | 1:fc62ab66aa39 | 134 | #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) |
thoulin | 1:fc62ab66aa39 | 135 | #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) |
thoulin | 1:fc62ab66aa39 | 136 | |
thoulin | 1:fc62ab66aa39 | 137 | #define portNOP() |
thoulin | 1:fc62ab66aa39 | 138 | |
thoulin | 1:fc62ab66aa39 | 139 | #ifdef __cplusplus |
thoulin | 1:fc62ab66aa39 | 140 | } |
thoulin | 1:fc62ab66aa39 | 141 | #endif |
thoulin | 1:fc62ab66aa39 | 142 | |
thoulin | 1:fc62ab66aa39 | 143 | #endif /* PORTMACRO_H */ |
thoulin | 1:fc62ab66aa39 | 144 |