FreeRTOS Real Time Operating System, Modified from Kenji Arai's initial port. See freertos.org for full documentation.

Fork of FreeRTOS_on_mbed_v1 by Kenji Arai

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FreeRTOSConfig.h Source File

FreeRTOSConfig.h

00001 /*
00002     FreeRTOS V6.0.3 - Copyright (C) 2010 Real Time Engineers Ltd.
00003 
00004     ***************************************************************************
00005     *                                                                         *
00006     * If you are:                                                             *
00007     *                                                                         *
00008     *    + New to FreeRTOS,                                                   *
00009     *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
00010     *    + Looking for basic training,                                        *
00011     *    + Wanting to improve your FreeRTOS skills and productivity           *
00012     *                                                                         *
00013     * then take a look at the FreeRTOS eBook                                  *
00014     *                                                                         *
00015     *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
00016     *                  http://www.FreeRTOS.org/Documentation                  *
00017     *                                                                         *
00018     * A pdf reference manual is also available.  Both are usually delivered   *
00019     * to your inbox within 20 minutes to two hours when purchased between 8am *
00020     * and 8pm GMT (although please allow up to 24 hours in case of            *
00021     * exceptional circumstances).  Thank you for your support!                *
00022     *                                                                         *
00023     ***************************************************************************
00024 
00025     This file is part of the FreeRTOS distribution.
00026 
00027     FreeRTOS is free software; you can redistribute it and/or modify it under
00028     the terms of the GNU General Public License (version 2) as published by the
00029     Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
00030     ***NOTE*** The exception to the GPL is included to allow you to distribute
00031     a combined work that includes FreeRTOS without being obliged to provide the
00032     source code for proprietary components outside of the FreeRTOS kernel.
00033     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
00034     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00035     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00036     more details. You should have received a copy of the GNU General Public 
00037     License and the FreeRTOS license exception along with FreeRTOS; if not it 
00038     can be viewed here: http://www.freertos.org/a00114.html and also obtained 
00039     by writing to Richard Barry, contact details for whom are available on the
00040     FreeRTOS WEB site.
00041 
00042     1 tab == 4 spaces!
00043 
00044     http://www.FreeRTOS.org - Documentation, latest information, license and
00045     contact details.
00046 
00047     http://www.SafeRTOS.com - A version that is certified for use in safety
00048     critical systems.
00049 
00050     http://www.OpenRTOS.com - Commercial support, development, porting,
00051     licensing and training services.
00052 */
00053 
00054 /*
00055  *  Modified for mbed & Xpresso NXP LPC1768 board
00056  *  By Kenji Arai / JH1PJL on March 9th,2010
00057  *      August 1st,2010
00058  */
00059 
00060 #ifndef FREERTOS_CONFIG_H
00061 #define FREERTOS_CONFIG_H
00062 
00063 #include "LPC17xx.h"
00064 
00065 #define portREMOVE_STATIC_QUALIFIER
00066 
00067 // Modified by  Kenji Arai / JH1PJL, August 28th,2010
00068 /*-----------------------------------------------------------
00069  * Board Selection
00070  *-----------------------------------------------------------*/
00071 #define USE_XPRESSO 0
00072 #define USE_MBED    1
00073 
00074 // Modified by  Kenji Arai / JH1PJL, September 10th,2010
00075 /*-----------------------------------------------------------
00076  * ADC mode selection
00077  *-----------------------------------------------------------*/
00078 #define CH_GSEN_ONLY 1
00079 
00080 // Modified by  Kenji Arai / JH1PJL, August 22nd,2010
00081 /*-----------------------------------------------------------
00082  * AHB Memory usage
00083  *-----------------------------------------------------------*/
00084 #define USE_AHB_RAM 1
00085 
00086 // Modified by  Kenji Arai / JH1PJL, September 18th,2010
00087 /*-----------------------------------------------------------
00088  * Monitor interface
00089  *-----------------------------------------------------------*/
00090 #define MON_VIA_USB    0
00091 #define MON_VIA_UART 1
00092 
00093 /*-----------------------------------------------------------
00094  * Application specific definitions.
00095  *
00096  * These definitions should be adjusted for your particular hardware and
00097  * application requirements.
00098  *
00099  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
00100  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
00101  *----------------------------------------------------------*/
00102 
00103 #define configUSE_PREEMPTION        1
00104 #define configUSE_IDLE_HOOK            0
00105 #define configMAX_PRIORITIES        ( ( unsigned portBASE_TYPE ) 5 )
00106 #define configUSE_TICK_HOOK            1
00107 
00108 // Modified by RJACKSON 11/2013
00109 #define configUSE_TIMERS 1
00110 
00111 // Modified by  Kenji Arai / JH1PJL, May 2nd,2010
00112 #define configCPU_CLOCK_HZ            ( ( unsigned long ) 99000000 )
00113 //#define configCPU_CLOCK_HZ        ( ( unsigned long ) 100000000 )
00114 #define configTICK_RATE_HZ            ( ( portTickType ) 1000 )
00115 #define configMINIMAL_STACK_SIZE    ( ( unsigned short ) 64 )
00116 // Modified by  Kenji Arai / JH1PJL, August 13th,2010
00117 #define configMIN_STACK_SIZE        ( ( unsigned short ) 80 )
00118 #define configMID_STACK_SIZE        ( ( unsigned short ) 120 )
00119 #define configMAX_STACK_SIZE        ( ( unsigned short ) 180 )
00120 
00121 // Modified by  Kenji Arai / JH1PJL, May 8th,2010
00122 //#define configTOTAL_HEAP_SIZE        ( ( size_t ) ( 17 * 1024 ) )
00123 //    back to original August 18th, 2010
00124 //#define configTOTAL_HEAP_SIZE        ( ( size_t ) ( 19 * 1024 ) )
00125 //    more bigger August 18th, 2010
00126 #define configTOTAL_HEAP_SIZE        ( ( size_t ) ( 22 * 1024 ) )
00127 #define configMAX_TASK_NAME_LEN        ( 12 )
00128 #define configUSE_TRACE_FACILITY    1
00129 #define configUSE_16_BIT_TICKS        0
00130 #define configIDLE_SHOULD_YIELD        0
00131 #define configUSE_CO_ROUTINES         0
00132 #define configUSE_MUTEXES            1
00133 
00134 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
00135 
00136 #define configUSE_COUNTING_SEMAPHORES     0
00137 #define configUSE_ALTERNATIVE_API         0
00138 #define configCHECK_FOR_STACK_OVERFLOW    2
00139 #define configUSE_RECURSIVE_MUTEXES        1
00140 #define configQUEUE_REGISTRY_SIZE        10
00141 #define configGENERATE_RUN_TIME_STATS    1
00142 
00143 /* Set the following definitions to 1 to include the API function, or zero
00144 to exclude the API function. */
00145 
00146 #define INCLUDE_vTaskPrioritySet            1
00147 #define INCLUDE_uxTaskPriorityGet            1
00148 #define INCLUDE_vTaskDelete                    1
00149 #define INCLUDE_vTaskCleanUpResources        0
00150 #define INCLUDE_vTaskSuspend                1
00151 #define INCLUDE_vTaskDelayUntil                1
00152 #define INCLUDE_vTaskDelay                    1
00153 #define INCLUDE_uxTaskGetStackHighWaterMark    1
00154 
00155 /*-----------------------------------------------------------
00156  * Ethernet configuration.
00157  *-----------------------------------------------------------*/
00158 
00159 /* MAC address configuration. */
00160 #define configMAC_ADDR0    0x00
00161 #define configMAC_ADDR1    0x12
00162 #define configMAC_ADDR2    0x13
00163 #define configMAC_ADDR3    0x10
00164 #define configMAC_ADDR4    0x15
00165 #define configMAC_ADDR5    0x11
00166 
00167 /* IP address configuration. */
00168 #define configIP_ADDR0        192
00169 #define configIP_ADDR1        168
00170 // Modified by  Kenji Arai / JH1PJL, March 9th,2010
00171 //#define configIP_ADDR2    0
00172 #define configIP_ADDR2        1
00173 //#define configIP_ADDR3    201
00174 #define configIP_ADDR3        22
00175 
00176 /* Netmask configuration. */
00177 #define configNET_MASK0        255
00178 #define configNET_MASK1        255
00179 #define configNET_MASK2        255
00180 #define configNET_MASK3        0
00181 
00182 /* Use the system definition, if there is one */
00183 #ifdef __NVIC_PRIO_BITS
00184     #define configPRIO_BITS       __NVIC_PRIO_BITS
00185 #else
00186     #define configPRIO_BITS       5        /* 32 priority levels */
00187 #endif
00188 
00189 /* The lowest priority. */
00190 #define configKERNEL_INTERRUPT_PRIORITY     ( 31 << (8 - configPRIO_BITS) )
00191 /* Priority 5, or 160 as only the top three bits are implemented. */
00192 #define configMAX_SYSCALL_INTERRUPT_PRIORITY     ( 5 << (8 - configPRIO_BITS) )
00193 
00194 /* Priorities passed to NVIC_SetPriority() do not require shifting as the
00195 function does the shifting itself.  Note these priorities need to be equal to
00196 or lower than configMAX_SYSCALL_INTERRUPT_PRIORITY - therefore the numeric
00197 value needs to be equal to or greater than 5 (on the Cortex M3 the lower the
00198 numeric value the higher the interrupt priority). */
00199 #define configEMAC_INTERRUPT_PRIORITY        5
00200 #define configUSB_INTERRUPT_PRIORITY        6
00201 
00202 
00203 /*-----------------------------------------------------------
00204  * Macros required to setup the timer for the run time status.
00205  *-----------------------------------------------------------*/
00206 #ifdef __cplusplus
00207 extern "C" {
00208 #endif
00209 extern void vConfigureTimerForRunTimeStats( void );
00210 #ifdef __cplusplus
00211 }
00212 #endif
00213 //extern void vConfigureTimerForRunTimeStats( void );
00214 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
00215 // Modified by K.Arai April 11th, 2010
00216 #define portGET_RUN_TIME_COUNTER_VALUE() LPC_TIM0->TC
00217 
00218 
00219 #endif /* FREERTOS_CONFIG_H */