rtconfig.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. #ifndef __RTTHREAD_CFG_H__
  2. #define __RTTHREAD_CFG_H__
  3. // <RDTConfigurator URL="http://www.rt-thread.com/eclipse">
  4. // <integer name="RT_NAME_MAX" description="Maximal size of kernel object name length" default="6" />
  5. #define RT_NAME_MAX 6
  6. // <integer name="RT_ALIGN_SIZE" description="Alignment size for CPU architecture data access" default="4" />
  7. #define RT_ALIGN_SIZE 4
  8. // <integer name="RT_THREAD_PRIORITY_MAX" description="Maximal level of thread priority" default="32">
  9. // <item description="8">8</item>
  10. // <item description="32">32</item>
  11. // <item description="256">256</item>
  12. // </integer>
  13. #define RT_THREAD_PRIORITY_MAX 32
  14. // <integer name="RT_TICK_PER_SECOND" description="OS tick per second" default="100" />
  15. #define RT_TICK_PER_SECOND 100
  16. // <section name="RT_DEBUG" description="Kernel Debug Configuration" default="true" >
  17. #define RT_DEBUG
  18. // <bool name="RT_THREAD_DEBUG" description="Thread debug enable" default="false" />
  19. // #define RT_THREAD_DEBUG
  20. // <bool name="RT_USING_OVERFLOW_CHECK" description="Thread stack over flow detect" default="true" />
  21. #define RT_USING_OVERFLOW_CHECK
  22. // </section>
  23. // <bool name="RT_USING_HOOK" description="Using hook functions" default="true" />
  24. #define RT_USING_HOOK
  25. // <section name="RT_USING_TIMER_SOFT" description="Using software timer which will start a thread to handle soft-timer" default="true" >
  26. // #define RT_USING_TIMER_SOFT
  27. // <integer name="RT_TIMER_THREAD_PRIO" description="The priority level of timer thread" default="4" />
  28. #define RT_TIMER_THREAD_PRIO 4
  29. // <integer name="RT_TIMER_THREAD_STACK_SIZE" description="The stack size of timer thread" default="512" />
  30. #define RT_TIMER_THREAD_STACK_SIZE 512
  31. // <integer name="RT_TIMER_TICK_PER_SECOND" description="The soft-timer tick per second" default="10" />
  32. #define RT_TIMER_TICK_PER_SECOND 10
  33. // </section>
  34. // <section name="IPC" description="Inter-Thread communication" default="always" >
  35. // <bool name="RT_USING_SEMAPHORE" description="Using semaphore in the system" default="true" />
  36. #define RT_USING_SEMAPHORE
  37. // <bool name="RT_USING_MUTEX" description="Using mutex in the system" default="true" />
  38. #define RT_USING_MUTEX
  39. // <bool name="RT_USING_EVENT" description="Using event group in the system" default="true" />
  40. #define RT_USING_EVENT
  41. // <bool name="RT_USING_MAILBOX" description="Using mailbox in the system" default="true" />
  42. #define RT_USING_MAILBOX
  43. // <bool name="RT_USING_MESSAGEQUEUE" description="Using message queue in the system" default="true" />
  44. #define RT_USING_MESSAGEQUEUE
  45. // </section>
  46. // <section name="MM" description="Memory Management" default="always" >
  47. // <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
  48. #define RT_USING_MEMPOOL
  49. // <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Object in the system" default="true" />
  50. #define RT_USING_MEMHEAP
  51. // <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
  52. #define RT_USING_HEAP
  53. // <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
  54. #define RT_USING_SMALL_MEM
  55. // <bool name="RT_USING_SLAB" description="Using SLAB memory management for large memory" default="false" />
  56. // #define RT_USING_SLAB
  57. // </section>
  58. // <section name="RT_USING_DEVICE" description="Using Device Driver Framework" default="true" >
  59. #define RT_USING_DEVICE
  60. // <bool name="RT_USING_UART0" description="Using UART0" default="true" />
  61. #define RT_USING_UART0
  62. // <integer name="RT_UART_RX_BUFFER_SIZE" description="The buffer size for UART reception" default="64" />
  63. #define RT_UART_RX_BUFFER_SIZE 64
  64. // </section>
  65. // <section name="RT_USING_CONSOLE" description="Using console" default="true" >
  66. #define RT_USING_CONSOLE
  67. // <integer name="RT_CONSOLEBUF_SIZE" description="The buffer size for console output" default="128" />
  68. #define RT_CONSOLEBUF_SIZE 128
  69. // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart" />
  70. #define RT_CONSOLE_DEVICE_NAME "uart0"
  71. // </section>
  72. // <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
  73. // #define RT_USING_COMPONENTS_INIT
  74. // <section name="RT_USING_FINSH" description="Using finsh as shell, which is a C-Express shell" default="true" >
  75. #define RT_USING_FINSH
  76. // <bool name="FINSH_USING_SYMTAB" description="Using symbol table in finsh shell" default="true" />
  77. #define FINSH_USING_SYMTAB
  78. // <bool name="FINSH_USING_DESCRIPTION" description="Keeping description in symbol table" default="true" />
  79. #define FINSH_USING_DESCRIPTION
  80. // <integer name="FINSH_THREAD_STACK_SIZE" description="The stack size for finsh thread" default="4096" />
  81. #define FINSH_THREAD_STACK_SIZE 4096
  82. // </section>
  83. // <section name="LIBC" description="C Runtime library setting" default="always" >
  84. // <bool name="RT_USING_LIBC" description="Using C library" default="true" />
  85. // #define RT_USING_LIBC
  86. // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
  87. // #define RT_USING_PTHREADS
  88. // </section>
  89. // <section name="RT_USING_DFS" description="Device file system" default="true" >
  90. // #define RT_USING_DFS
  91. // <bool name="DFS_USING_WORKDIR" description="Using working directory" default="true" />
  92. #define DFS_USING_WORKDIR
  93. // <integer name="DFS_FILESYSTEMS_MAX" description="The maximal number of mounted file system" default="4" />
  94. #define DFS_FILESYSTEMS_MAX 2
  95. // <integer name="DFS_FD_MAX" description="The maximal number of opened files" default="4" />
  96. #define DFS_FD_MAX 4
  97. // <bool name="RT_USING_DFS_ELMFAT" description="Using ELM FatFs" default="true" />
  98. #define RT_USING_DFS_ELMFAT
  99. // <integer name="RT_DFS_ELM_USE_LFN" description="Support long file name" default="0">
  100. // <item description="LFN1">1</item>
  101. // <item description="LFN1">2</item>
  102. // </integer>
  103. #define RT_DFS_ELM_USE_LFN 1
  104. // <integer name="RT_DFS_ELM_CODE_PAGE" description="specifies the OEM code page to be used on the target system" default="936">
  105. // <item description="Japanese Shift-JIS (DBCS, OEM, Windows)">932</item>
  106. // <item description="Simplified Chinese GBK (DBCS, OEM, Windows)">936</item>
  107. // <item description="Korean (DBCS, OEM, Windows)">949</item>
  108. // <item description="Traditional Chinese Big5 (DBCS, OEM, Windows)">950</item>
  109. // <item description="Central Europe (Windows)">1250</item>
  110. // <item description="Cyrillic (Windows)">1251</item>
  111. // <item description="Latin 1 (Windows)">1252</item>
  112. // <item description="Greek (Windows)">1253</item>
  113. // <item description="Turkish (Windows)">1254</item>
  114. // <item description="Hebrew (Windows)">1255</item>
  115. // <item description="Arabic (Windows)">1256</item>
  116. // <item description="Baltic (Windows)">1257</item>
  117. // <item description="Vietnam (OEM, Windows)">1258</item>
  118. // <item description="U.S. (OEM)">437</item>
  119. // <item description="Arabic (OEM)">720</item>
  120. // <item description="Greek (OEM)">737</item>
  121. // <item description="Baltic (OEM)">775</item>
  122. // <item description="Multilingual Latin 1 (OEM)">850</item>
  123. // <item description="Multilingual Latin 1 + Euro (OEM)">858</item>
  124. // <item description="Latin 2 (OEM)">852</item>
  125. // <item description="Cyrillic (OEM)">855</item>
  126. // <item description="Russian (OEM)">866</item>
  127. // <item description="Turkish (OEM)">857</item>
  128. // <item description="Hebrew (OEM)">862</item>
  129. // <item description="Thai (OEM, Windows)">874</item>
  130. // <item description="ASCII only (Valid for non LFN cfg.)">1</item>
  131. // </integer>
  132. #define RT_DFS_ELM_CODE_PAGE 437
  133. // <integer name="RT_DFS_ELM_MAX_LFN" description="Maximal size of file name length" default="255" />
  134. #define RT_DFS_ELM_MAX_LFN 64
  135. // <bool name="RT_USING_DFS_YAFFS2" description="Using YAFFS2" default="false" />
  136. // #define RT_USING_DFS_YAFFS2
  137. // <bool name="RT_USING_DFS_UFFS" description="Using UFFS" default="false" />
  138. // #define RT_USING_DFS_UFFS
  139. // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
  140. // #define RT_USING_DFS_DEVFS
  141. // <bool name="RT_USING_DFS_NFS" description="Using NFS v3 client file system" default="false" />
  142. // #define RT_USING_DFS_NFS
  143. // <string name="RT_NFS_HOST_EXPORT" description="NFSv3 host export" default="192.168.1.5:/" />
  144. #define RT_NFS_HOST_EXPORT "192.168.1.5:/"
  145. // </section>
  146. // <section name="RT_USING_LWIP" description="lwip, a lightweight TCP/IP protocol stack" default="true" >
  147. #define RT_USING_LWIP
  148. // <bool name="RT_LWIP_ICMP" description="Enable ICMP protocol" default="true" />
  149. #define RT_LWIP_ICMP
  150. // <bool name="RT_LWIP_IGMP" description="Enable IGMP protocol" default="false" />
  151. // #define RT_LWIP_IGMP
  152. // <bool name="RT_LWIP_UDP" description="Enable UDP protocol" default="true" />
  153. #define RT_LWIP_UDP
  154. // <bool name="RT_LWIP_TCP" description="Enable TCP protocol" default="true" />
  155. #define RT_LWIP_TCP
  156. // <bool name="RT_LWIP_DNS" description="Enable DNS protocol" default="true" />
  157. #define RT_LWIP_DNS
  158. // <integer name="RT_LWIP_PBUF_NUM" description="Maximal number of buffers in the pbuf pool" default="4" />
  159. #define RT_LWIP_PBUF_NUM 4
  160. // <integer name="RT_LWIP_TCP_PCB_NUM" description="Maximal number of simultaneously active TCP connections" default="5" />
  161. #define RT_LWIP_TCP_PCB_NUM 3
  162. // <integer name="RT_LWIP_TCP_SND_BUF" description="TCP sender buffer size" default="8192" />
  163. #define RT_LWIP_TCP_SND_BUF (2 * TCP_MSS)
  164. // <integer name="RT_LWIP_TCP_WND" description="TCP receive window" default="8192" />
  165. #define RT_LWIP_TCP_WND 2048
  166. // <bool name="RT_LWIP_SNMP" description="Enable SNMP protocol" default="false" />
  167. // #define RT_LWIP_SNMP
  168. // <bool name="RT_LWIP_DHCP" description="Enable DHCP client to get IP address" default="false" />
  169. // #define RT_LWIP_DHCP
  170. // <integer name="RT_LWIP_TCPTHREAD_PRIORITY" description="the thread priority of TCP thread" default="128" />
  171. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  172. // <integer name="RT_LWIP_TCPTHREAD_MBOX_SIZE" description="the mail box size of TCP thread to wait for" default="32" />
  173. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  174. // <integer name="RT_LWIP_TCPTHREAD_STACKSIZE" description="the thread stack size of TCP thread" default="4096" />
  175. #define RT_LWIP_TCPTHREAD_STACKSIZE 4096
  176. // <integer name="RT_LWIP_ETHTHREAD_PRIORITY" description="the thread priority of ethnetif thread" default="144" />
  177. #define RT_LWIP_ETHTHREAD_PRIORITY 14
  178. // <integer name="RT_LWIP_ETHTHREAD_MBOX_SIZE" description="the mail box size of ethnetif thread to wait for" default="8" />
  179. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  180. // <integer name="RT_LWIP_ETHTHREAD_STACKSIZE" description="the stack size of ethnetif thread" default="512" />
  181. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  182. // <ipaddr name="RT_LWIP_IPADDR" description="IP address of device" default="192.168.1.30" />
  183. #define RT_LWIP_IPADDR "192.168.1.30"
  184. // <ipaddr name="RT_LWIP_GWADDR" description="Gateway address of device" default="192.168.1.1" />
  185. #define RT_LWIP_GWADDR "192.168.1.1"
  186. // <ipaddr name="RT_LWIP_MSKADDR" description="Mask address of device" default="255.255.255.0" />
  187. #define RT_LWIP_MSKADDR "255.255.255.0"
  188. // </section>
  189. // <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
  190. // #define RT_USING_CMSIS_OS
  191. // <bool name="RT_USING_RTT_CMSIS" description="Using CMSIS in RTT" default="true" />
  192. #define RT_USING_RTT_CMSIS
  193. // <bool name="RT_USING_BSP_CMSIS" description="Using CMSIS in BSP" default="true" />
  194. // #define RT_USING_BSP_CMSIS
  195. // </RDTConfigurator>
  196. #endif