rtconfig.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /* RT-Thread config file */
  2. #ifndef __RTTHREAD_CFG_H__
  3. #define __RTTHREAD_CFG_H__
  4. //add by mojingxian.defualt idle stack is too small.
  5. #define IDLE_THREAD_STACK_SIZE 512
  6. /* RT_NAME_MAX*/
  7. #define RT_NAME_MAX 32
  8. /* RT_ALIGN_SIZE*/
  9. #define RT_ALIGN_SIZE 4
  10. /* PRIORITY_MAX */
  11. #define RT_THREAD_PRIORITY_MAX 256
  12. /* Tick per Second */
  13. #define RT_TICK_PER_SECOND 1000
  14. /* SECTION: RT_DEBUG */
  15. /* Thread Debug */
  16. /* #define RT_DEBUG */
  17. /* #define RT_THREAD_DEBUG */
  18. #define RT_USING_OVERFLOW_CHECK
  19. /* Using Hook */
  20. #define RT_USING_HOOK
  21. /* Using Software Timer */
  22. //#define RT_USING_TIMER_SOFT
  23. #define RT_TIMER_THREAD_PRIO 8
  24. #define RT_TIMER_THREAD_STACK_SIZE 512
  25. #define RT_TIMER_TICK_PER_SECOND 1000
  26. /* SECTION: IPC */
  27. /* Using Semaphore */
  28. #define RT_USING_SEMAPHORE
  29. /* Using Mutex */
  30. #define RT_USING_MUTEX
  31. /* Using Event */
  32. #define RT_USING_EVENT
  33. /* Using MailBox */
  34. #define RT_USING_MAILBOX
  35. /* Using Message Queue */
  36. #define RT_USING_MESSAGEQUEUE
  37. /* SECTION: Memory Management */
  38. /* Using Memory Pool Management*/
  39. #define RT_USING_MEMPOOL
  40. /* Using Dynamic Heap Management */
  41. #define RT_USING_HEAP
  42. /* Using Small MM */
  43. #define RT_USING_SMALL_MEM
  44. /* Using SLAB Allocator */
  45. //#define RT_USING_SLAB
  46. /* SECTION: Device System */
  47. /* Using Device System */
  48. #define RT_USING_DEVICE
  49. /* Using Module System */
  50. //#define RT_USING_MODULE
  51. #define RT_USING_LIBDL
  52. /* SECTION: Console options */
  53. #define RT_USING_CONSOLE
  54. /* the buffer size of console */
  55. #define RT_CONSOLEBUF_SIZE 128
  56. /* SECTION: finsh, a C-Express shell */
  57. /* Using FinSH as Shell*/
  58. #define RT_USING_FINSH
  59. /* Using symbol table */
  60. #define FINSH_USING_SYMTAB
  61. #define FINSH_USING_DESCRIPTION
  62. #define FINSH_THREAD_STACK_SIZE 1024
  63. /* SECTION: a runtime libc library */
  64. /* a runtime libc library */
  65. //#define RT_USING_NEWLIB
  66. //#define RT_USING_PTHREADS
  67. /* SECTION: C++ support */
  68. /* Using C++ support */
  69. /* #define RT_USING_CPLUSPLUS */
  70. /* SECTION: Device filesystem support */
  71. /* using DFS support */
  72. //#define RT_USING_DFS
  73. #define RT_USING_DFS_ELMFAT
  74. /* use long file name feature */
  75. #define RT_DFS_ELM_USE_LFN 1
  76. /* the max number of file length */
  77. #define RT_DFS_ELM_MAX_LFN 128
  78. /* #define RT_USING_DFS_YAFFS2 */
  79. /* #define RT_USING_DFS_UFFS */
  80. #define RT_USING_DFS_DEVFS
  81. /* #define RT_USING_DFS_NFS */
  82. #define RT_NFS_HOST_EXPORT "192.168.1.5:/"
  83. #define DFS_USING_WORKDIR
  84. /* the max number of mounted filesystem */
  85. #define DFS_FILESYSTEMS_MAX 4
  86. /* the max number of opened files */
  87. #define DFS_FD_MAX 16
  88. /* the max number of cached sector */
  89. #define DFS_CACHE_MAX_NUM 4
  90. /* Enable freemodbus protocal stack*/
  91. /* #define RT_USING_MODBUS */
  92. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  93. /* Using lighweight TCP/IP protocol stack */
  94. /* #define RT_USING_LWIP */
  95. //#define RT_LWIP_DNS
  96. /* Trace LwIP protocol */
  97. /* #define RT_LWIP_DEBUG */
  98. /* Enable ICMP protocol */
  99. #define RT_LWIP_ICMP
  100. /* Enable IGMP protocol */
  101. #define RT_LWIP_IGMP
  102. /* Enable UDP protocol */
  103. #define RT_LWIP_UDP
  104. /* Enable TCP protocol */
  105. #define RT_LWIP_TCP
  106. /* the number of simulatenously active TCP connections*/
  107. #define RT_LWIP_TCP_PCB_NUM 5
  108. /* TCP sender buffer space */
  109. #define RT_LWIP_TCP_SND_BUF 1024*8
  110. /* TCP receive window. */
  111. #define RT_LWIP_TCP_WND 1024*8
  112. /* Enable SNMP protocol */
  113. /* #define RT_LWIP_SNMP */
  114. /* Using DHCP */
  115. /* #define RT_LWIP_DHCP */
  116. /* ip address of target */
  117. #define RT_LWIP_IPADDR0 192
  118. #define RT_LWIP_IPADDR1 168
  119. #define RT_LWIP_IPADDR2 1
  120. #define RT_LWIP_IPADDR3 30
  121. /* gateway address of target */
  122. #define RT_LWIP_GWADDR0 192
  123. #define RT_LWIP_GWADDR1 168
  124. #define RT_LWIP_GWADDR2 1
  125. #define RT_LWIP_GWADDR3 1
  126. /* mask address of target */
  127. #define RT_LWIP_MSKADDR0 255
  128. #define RT_LWIP_MSKADDR1 255
  129. #define RT_LWIP_MSKADDR2 255
  130. #define RT_LWIP_MSKADDR3 0
  131. /* the number of blocks for pbuf */
  132. #define RT_LWIP_PBUF_NUM 16
  133. /* the number of simultaneously queued TCP */
  134. #define RT_LWIP_TCP_SEG_NUM 40
  135. /* thread priority of tcpip thread */
  136. #define RT_LWIP_TCPTHREAD_PRIORITY 128
  137. /* mail box size of tcpip thread to wait for */
  138. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 32
  139. /* thread stack size of tcpip thread */
  140. #define RT_LWIP_TCPTHREAD_STACKSIZE 4096
  141. /* thread priority of ethnetif thread */
  142. #define RT_LWIP_ETHTHREAD_PRIORITY 144
  143. /* mail box size of ethnetif thread to wait for */
  144. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 32
  145. /* thread stack size of ethnetif thread */
  146. #define RT_LWIP_ETHTHREAD_STACKSIZE 1024
  147. /* SECTION: RTGUI support */
  148. /* using RTGUI support */
  149. #define RT_USING_RTGUI
  150. /* name length of RTGUI object */
  151. #define RTGUI_NAME_MAX 16
  152. /* support 16 weight font */
  153. #define RTGUI_USING_FONT16
  154. /* support 16 weight font */
  155. #define RTGUI_USING_FONT12
  156. /* support Chinese font */
  157. #define RTGUI_USING_FONTHZ
  158. /* use DFS as file interface */
  159. #define RTGUI_USING_DFS_FILERW
  160. /* use font file as Chinese font */
  161. /* #define RTGUI_USING_HZ_FILE */
  162. /* use Chinese bitmap font */
  163. #define RTGUI_USING_HZ_BMP
  164. /* use small size in RTGUI */
  165. /* #define RTGUI_USING_SMALL_SIZE */
  166. /* use mouse cursor */
  167. /* #define RTGUI_USING_MOUSE_CURSOR */
  168. /* RTGUI image options */
  169. //#define RTGUI_IMAGE_XPM
  170. //#define RTGUI_IMAGE_JPEG
  171. //#define RTGUI_IMAGE_PNG
  172. //#define RTGUI_IMAGE_BMP
  173. /* SECTION: FTK support */
  174. /* using FTK support */
  175. /* #define RT_USING_FTK */
  176. /*
  177. * Note on FTK:
  178. *
  179. * FTK depends :
  180. * #define RT_USING_NEWLIB
  181. * #define DFS_USING_WORKDIR
  182. *
  183. * And the maximal length must great than 64
  184. * #define RT_DFS_ELM_MAX_LFN 128
  185. */
  186. #endif