Freertos for LPC CM3 tested on LPC1768

Committer:
dflet
Date:
Sat Jun 06 13:27:43 2015 +0000
Revision:
0:91ad48ad5687
Setup for LPC CM3 but may work with LPC CM4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dflet 0:91ad48ad5687 1 /*
dflet 0:91ad48ad5687 2 FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
dflet 0:91ad48ad5687 3 All rights reserved
dflet 0:91ad48ad5687 4
dflet 0:91ad48ad5687 5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
dflet 0:91ad48ad5687 6
dflet 0:91ad48ad5687 7 ***************************************************************************
dflet 0:91ad48ad5687 8 * *
dflet 0:91ad48ad5687 9 * FreeRTOS provides completely free yet professionally developed, *
dflet 0:91ad48ad5687 10 * robust, strictly quality controlled, supported, and cross *
dflet 0:91ad48ad5687 11 * platform software that has become a de facto standard. *
dflet 0:91ad48ad5687 12 * *
dflet 0:91ad48ad5687 13 * Help yourself get started quickly and support the FreeRTOS *
dflet 0:91ad48ad5687 14 * project by purchasing a FreeRTOS tutorial book, reference *
dflet 0:91ad48ad5687 15 * manual, or both from: http://www.FreeRTOS.org/Documentation *
dflet 0:91ad48ad5687 16 * *
dflet 0:91ad48ad5687 17 * Thank you! *
dflet 0:91ad48ad5687 18 * *
dflet 0:91ad48ad5687 19 ***************************************************************************
dflet 0:91ad48ad5687 20
dflet 0:91ad48ad5687 21 This file is part of the FreeRTOS distribution.
dflet 0:91ad48ad5687 22
dflet 0:91ad48ad5687 23 FreeRTOS is free software; you can redistribute it and/or modify it under
dflet 0:91ad48ad5687 24 the terms of the GNU General Public License (version 2) as published by the
dflet 0:91ad48ad5687 25 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
dflet 0:91ad48ad5687 26
dflet 0:91ad48ad5687 27 >>! NOTE: The modification to the GPL is included to allow you to distribute
dflet 0:91ad48ad5687 28 >>! a combined work that includes FreeRTOS without being obliged to provide
dflet 0:91ad48ad5687 29 >>! the source code for proprietary components outside of the FreeRTOS
dflet 0:91ad48ad5687 30 >>! kernel.
dflet 0:91ad48ad5687 31
dflet 0:91ad48ad5687 32 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
dflet 0:91ad48ad5687 33 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
dflet 0:91ad48ad5687 34 FOR A PARTICULAR PURPOSE. Full license text is available from the following
dflet 0:91ad48ad5687 35 link: http://www.freertos.org/a00114.html
dflet 0:91ad48ad5687 36
dflet 0:91ad48ad5687 37 1 tab == 4 spaces!
dflet 0:91ad48ad5687 38
dflet 0:91ad48ad5687 39 ***************************************************************************
dflet 0:91ad48ad5687 40 * *
dflet 0:91ad48ad5687 41 * Having a problem? Start by reading the FAQ "My application does *
dflet 0:91ad48ad5687 42 * not run, what could be wrong?" *
dflet 0:91ad48ad5687 43 * *
dflet 0:91ad48ad5687 44 * http://www.FreeRTOS.org/FAQHelp.html *
dflet 0:91ad48ad5687 45 * *
dflet 0:91ad48ad5687 46 ***************************************************************************
dflet 0:91ad48ad5687 47
dflet 0:91ad48ad5687 48 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
dflet 0:91ad48ad5687 49 license and Real Time Engineers Ltd. contact details.
dflet 0:91ad48ad5687 50
dflet 0:91ad48ad5687 51 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
dflet 0:91ad48ad5687 52 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
dflet 0:91ad48ad5687 53 compatible FAT file system, and our tiny thread aware UDP/IP stack.
dflet 0:91ad48ad5687 54
dflet 0:91ad48ad5687 55 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
dflet 0:91ad48ad5687 56 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
dflet 0:91ad48ad5687 57 licenses offer ticketed support, indemnification and middleware.
dflet 0:91ad48ad5687 58
dflet 0:91ad48ad5687 59 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
dflet 0:91ad48ad5687 60 engineered and independently SIL3 certified version for use in safety and
dflet 0:91ad48ad5687 61 mission critical applications that require provable dependability.
dflet 0:91ad48ad5687 62
dflet 0:91ad48ad5687 63 1 tab == 4 spaces!
dflet 0:91ad48ad5687 64 */
dflet 0:91ad48ad5687 65
dflet 0:91ad48ad5687 66 #ifndef FREERTOS_CONFIG_H
dflet 0:91ad48ad5687 67 #define FREERTOS_CONFIG_H
dflet 0:91ad48ad5687 68
dflet 0:91ad48ad5687 69 /*-----------------------------------------------------------
dflet 0:91ad48ad5687 70 * Application specific definitions.
dflet 0:91ad48ad5687 71 *
dflet 0:91ad48ad5687 72 * These definitions should be adjusted for your particular hardware and
dflet 0:91ad48ad5687 73 * application requirements.
dflet 0:91ad48ad5687 74 *
dflet 0:91ad48ad5687 75 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
dflet 0:91ad48ad5687 76 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
dflet 0:91ad48ad5687 77 *----------------------------------------------------------*/
dflet 0:91ad48ad5687 78
dflet 0:91ad48ad5687 79 #include <stdint.h>
dflet 0:91ad48ad5687 80 #include "myBoardInit.h"
dflet 0:91ad48ad5687 81 extern uint32_t SystemCoreClock;
dflet 0:91ad48ad5687 82 //#define vPortYieldProcessor swi_handler
dflet 0:91ad48ad5687 83
dflet 0:91ad48ad5687 84 #define configUSE_PREEMPTION 1
dflet 0:91ad48ad5687 85 #define configUSE_IDLE_HOOK 0
dflet 0:91ad48ad5687 86 #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
dflet 0:91ad48ad5687 87 #define configUSE_TICK_HOOK 0
dflet 0:91ad48ad5687 88 #define configCPU_CLOCK_HZ ( ( unsigned long ) SystemCoreClock )
dflet 0:91ad48ad5687 89 #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
dflet 0:91ad48ad5687 90 #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
dflet 0:91ad48ad5687 91 #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 10 * 1024 ) )
dflet 0:91ad48ad5687 92 #define configMAX_TASK_NAME_LEN ( 16 )
dflet 0:91ad48ad5687 93 #define configUSE_TRACE_FACILITY 1
dflet 0:91ad48ad5687 94 #define configUSE_16_BIT_TICKS 0
dflet 0:91ad48ad5687 95 #define configIDLE_SHOULD_YIELD 1//0
dflet 0:91ad48ad5687 96 #define configUSE_CO_ROUTINES 0
dflet 0:91ad48ad5687 97 #define configUSE_MUTEXES 1
dflet 0:91ad48ad5687 98
dflet 0:91ad48ad5687 99 //#define configMAX_PRIORITIES ( 10UL )
dflet 0:91ad48ad5687 100 /* Co-routine definitions. */
dflet 0:91ad48ad5687 101 #define configUSE_CO_ROUTINES 0
dflet 0:91ad48ad5687 102 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
dflet 0:91ad48ad5687 103
dflet 0:91ad48ad5687 104 #define configUSE_COUNTING_SEMAPHORES 1//0
dflet 0:91ad48ad5687 105 #define configUSE_ALTERNATIVE_API 1//0
dflet 0:91ad48ad5687 106 #define configCHECK_FOR_STACK_OVERFLOW 0
dflet 0:91ad48ad5687 107 #define configUSE_RECURSIVE_MUTEXES 1
dflet 0:91ad48ad5687 108 #define configQUEUE_REGISTRY_SIZE 10
dflet 0:91ad48ad5687 109 #define configGENERATE_RUN_TIME_STATS 0
dflet 0:91ad48ad5687 110
dflet 0:91ad48ad5687 111 /* Timer related defines. */
dflet 0:91ad48ad5687 112 #define configUSE_TIMERS 0
dflet 0:91ad48ad5687 113 #define configTIMER_TASK_PRIORITY 2
dflet 0:91ad48ad5687 114 #define configTIMER_QUEUE_LENGTH 20
dflet 0:91ad48ad5687 115 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
dflet 0:91ad48ad5687 116 #define configUSE_MALLOC_FAILED_HOOK 0//1
dflet 0:91ad48ad5687 117 #define configENABLE_BACKWARD_COMPATIBILITY 1//0
dflet 0:91ad48ad5687 118
dflet 0:91ad48ad5687 119 /* Set the following definitions to 1 to include the API function, or zero
dflet 0:91ad48ad5687 120 to exclude the API function. */
dflet 0:91ad48ad5687 121
dflet 0:91ad48ad5687 122 #define INCLUDE_vTaskPrioritySet 1
dflet 0:91ad48ad5687 123 #define INCLUDE_uxTaskPriorityGet 1
dflet 0:91ad48ad5687 124 #define INCLUDE_vTaskDelete 1
dflet 0:91ad48ad5687 125 #define INCLUDE_vTaskCleanUpResources 1
dflet 0:91ad48ad5687 126 #define INCLUDE_vTaskSuspend 1
dflet 0:91ad48ad5687 127 #define INCLUDE_vTaskDelayUntil 1
dflet 0:91ad48ad5687 128 #define INCLUDE_vTaskDelay 1
dflet 0:91ad48ad5687 129 #define INCLUDE_uxTaskGetStackHighWaterMark 0
dflet 0:91ad48ad5687 130 #define INCLUDE_xTaskGetSchedulerState 1
dflet 0:91ad48ad5687 131 #define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
dflet 0:91ad48ad5687 132 #define INCLUDE_xTaskGetIdleTaskHandle 1
dflet 0:91ad48ad5687 133 #define INCLUDE_pcTaskGetTaskName 1
dflet 0:91ad48ad5687 134 #define INCLUDE_eTaskGetState 1
dflet 0:91ad48ad5687 135 #define INCLUDE_xSemaphoreGetMutexHolder 0
dflet 0:91ad48ad5687 136
dflet 0:91ad48ad5687 137
dflet 0:91ad48ad5687 138 /* Use the system definition, if there is one */
dflet 0:91ad48ad5687 139 #ifdef __NVIC_PRIO_BITS
dflet 0:91ad48ad5687 140 #define configPRIO_BITS __NVIC_PRIO_BITS
dflet 0:91ad48ad5687 141 #else
dflet 0:91ad48ad5687 142 #define configPRIO_BITS 5 /* 32 priority levels */
dflet 0:91ad48ad5687 143 #endif
dflet 0:91ad48ad5687 144
dflet 0:91ad48ad5687 145 /* Define to trap errors during development. */
dflet 0:91ad48ad5687 146 //void vAssertCalled( const char *pcFile, unsigned long ulLine );
dflet 0:91ad48ad5687 147 // #define configASSERT( x ) if( x == 0 ) vAssertCalled( __FILE__, __LINE__ );
dflet 0:91ad48ad5687 148
dflet 0:91ad48ad5687 149 /* The lowest priority. */
dflet 0:91ad48ad5687 150 #define configKERNEL_INTERRUPT_PRIORITY ( 31 << (8 - configPRIO_BITS) )
dflet 0:91ad48ad5687 151 /* Priority 5, or 160 as only the top three bits are implemented. */
dflet 0:91ad48ad5687 152 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
dflet 0:91ad48ad5687 153 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
dflet 0:91ad48ad5687 154 #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )
dflet 0:91ad48ad5687 155
dflet 0:91ad48ad5687 156 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
dflet 0:91ad48ad5687 157 standard names - or at least those used in the unmodified vector table. */
dflet 0:91ad48ad5687 158 #define vPortSVCHandler SVC_Handler
dflet 0:91ad48ad5687 159 #define xPortPendSVHandler PendSV_Handler
dflet 0:91ad48ad5687 160 #define xPortSysTickHandler SysTick_Handler
dflet 0:91ad48ad5687 161
dflet 0:91ad48ad5687 162
dflet 0:91ad48ad5687 163 #endif /* FREERTOS_CONFIG_H */