FreeRTOSConfig.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /*
  2. FreeRTOS V7.3.0 - Copyright (C) 2012 Real Time Engineers Ltd.
  3. FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
  4. http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
  5. ***************************************************************************
  6. * *
  7. * FreeRTOS tutorial books are available in pdf and paperback. *
  8. * Complete, revised, and edited pdf reference manuals are also *
  9. * available. *
  10. * *
  11. * Purchasing FreeRTOS documentation will not only help you, by *
  12. * ensuring you get running as quickly as possible and with an *
  13. * in-depth knowledge of how to use FreeRTOS, it will also help *
  14. * the FreeRTOS project to continue with its mission of providing *
  15. * professional grade, cross platform, de facto standard solutions *
  16. * for microcontrollers - completely free of charge! *
  17. * *
  18. * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
  19. * *
  20. * Thank you for using FreeRTOS, and thank you for your support! *
  21. * *
  22. ***************************************************************************
  23. This file is part of the FreeRTOS distribution.
  24. FreeRTOS is free software; you can redistribute it and/or modify it under
  25. the terms of the GNU General Public License (version 2) as published by the
  26. Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
  27. >>>NOTE<<< The modification to the GPL is included to allow you to
  28. distribute a combined work that includes FreeRTOS without being obliged to
  29. provide the source code for proprietary components outside of the FreeRTOS
  30. kernel. FreeRTOS is distributed in the hope that it will be useful, but
  31. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  32. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  33. more details. You should have received a copy of the GNU General Public
  34. License and the FreeRTOS license exception along with FreeRTOS; if not it
  35. can be viewed here: http://www.freertos.org/a00114.html and also obtained
  36. by writing to Richard Barry, contact details for whom are available on the
  37. FreeRTOS WEB site.
  38. 1 tab == 4 spaces!
  39. ***************************************************************************
  40. * *
  41. * Having a problem? Start by reading the FAQ "My application does *
  42. * not run, what could be wrong?" *
  43. * *
  44. * http://www.FreeRTOS.org/FAQHelp.html *
  45. * *
  46. ***************************************************************************
  47. http://www.FreeRTOS.org - Documentation, training, latest versions, license
  48. and contact details.
  49. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
  50. including FreeRTOS+Trace - an indispensable productivity tool.
  51. Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
  52. the code with commercial support, indemnification, and middleware, under
  53. the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
  54. provide a safety engineered and independently SIL3 certified version under
  55. the SafeRTOS brand: http://www.SafeRTOS.com.
  56. */
  57. #ifndef FREERTOS_CONFIG_H
  58. #define FREERTOS_CONFIG_H
  59. /*
  60. * The following #error directive is to remind users that a batch file must be
  61. * executed prior to this project being built. The batch file *cannot* be
  62. * executed from within the IDE! Once it has been executed, re-open or refresh
  63. * the Eclipse project and remove the #error line below.
  64. */
  65. //#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
  66. //#include "LPC17xx.h"
  67. /*-----------------------------------------------------------
  68. * Application specific definitions.
  69. *
  70. * These definitions should be adjusted for your particular hardware and
  71. * application requirements.
  72. *
  73. * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
  74. * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
  75. *----------------------------------------------------------*/
  76. #define configUSE_PREEMPTION 1
  77. #define configUSE_IDLE_HOOK 0
  78. #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
  79. #define configUSE_TICK_HOOK 1
  80. #define configCPU_CLOCK_HZ ( ( unsigned long ) 99000000 )
  81. #define configTICK_RATE_HZ ( ( portTickType ) 1000 )
  82. #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
  83. #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 19 * 1024 ) )
  84. #define configMAX_TASK_NAME_LEN ( 12 )
  85. #define configUSE_TRACE_FACILITY 1
  86. #define configUSE_16_BIT_TICKS 0
  87. #define configIDLE_SHOULD_YIELD 0
  88. #define configUSE_CO_ROUTINES 0
  89. #define configUSE_MUTEXES 1
  90. #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
  91. #define configUSE_COUNTING_SEMAPHORES 0
  92. #define configUSE_ALTERNATIVE_API 0
  93. #define configCHECK_FOR_STACK_OVERFLOW 2
  94. #define configUSE_RECURSIVE_MUTEXES 1
  95. #define configQUEUE_REGISTRY_SIZE 10
  96. #define configGENERATE_RUN_TIME_STATS 1
  97. /* Set the following definitions to 1 to include the API function, or zero
  98. to exclude the API function. */
  99. #define INCLUDE_vTaskPrioritySet 1
  100. #define INCLUDE_uxTaskPriorityGet 1
  101. #define INCLUDE_vTaskDelete 1
  102. #define INCLUDE_vTaskCleanUpResources 0
  103. #define INCLUDE_vTaskSuspend 1
  104. #define INCLUDE_vTaskDelayUntil 1
  105. #define INCLUDE_vTaskDelay 1
  106. #define INCLUDE_uxTaskGetStackHighWaterMark 1
  107. /*-----------------------------------------------------------
  108. * Ethernet configuration.
  109. *-----------------------------------------------------------*/
  110. /* MAC address configuration. */
  111. #define configMAC_ADDR0 0x00
  112. #define configMAC_ADDR1 0x12
  113. #define configMAC_ADDR2 0x13
  114. #define configMAC_ADDR3 0x10
  115. #define configMAC_ADDR4 0x15
  116. #define configMAC_ADDR5 0x11
  117. /* IP address configuration. */
  118. #define configIP_ADDR0 192
  119. #define configIP_ADDR1 168
  120. #define configIP_ADDR2 0
  121. #define configIP_ADDR3 201
  122. /* Netmask configuration. */
  123. #define configNET_MASK0 255
  124. #define configNET_MASK1 255
  125. #define configNET_MASK2 255
  126. #define configNET_MASK3 0
  127. /* Use the system definition, if there is one */
  128. #ifdef __NVIC_PRIO_BITS
  129. #define configPRIO_BITS __NVIC_PRIO_BITS
  130. #else
  131. #define configPRIO_BITS 5 /* 32 priority levels */
  132. #endif
  133. /* The lowest priority. */
  134. #define configKERNEL_INTERRUPT_PRIORITY ( 31 << (8 - configPRIO_BITS) )
  135. /* Priority 5, or 160 as only the top three bits are implemented. */
  136. /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
  137. See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
  138. #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )
  139. /* Priorities passed to NVIC_SetPriority() do not require shifting as the
  140. function does the shifting itself. Note these priorities need to be equal to
  141. or lower than configMAX_SYSCALL_INTERRUPT_PRIORITY - therefore the numeric
  142. value needs to be equal to or greater than 5 (on the Cortex-M3 the lower the
  143. numeric value the higher the interrupt priority). */
  144. #define configEMAC_INTERRUPT_PRIORITY 5
  145. #define configUSB_INTERRUPT_PRIORITY 6
  146. /*-----------------------------------------------------------
  147. * Macros required to setup the timer for the run time stats.
  148. *-----------------------------------------------------------*/
  149. extern void vConfigureTimerForRunTimeStats( void );
  150. #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()
  151. #define portGET_RUN_TIME_COUNTER_VALUE() LPC_TIM0->TC
  152. #endif /* FREERTOS_CONFIG_H */