rtconfig.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. /* RT-Thread config file */
  2. #ifndef __RTTHREAD_CFG_H__
  3. #define __RTTHREAD_CFG_H__
  4. /* RT_NAME_MAX*/
  5. #define RT_NAME_MAX 32
  6. /* RT_ALIGN_SIZE*/
  7. #define RT_ALIGN_SIZE 4
  8. /* PRIORITY_MAX */
  9. #define RT_THREAD_PRIORITY_MAX 256
  10. /* Tick per Second */
  11. #define RT_TICK_PER_SECOND 100
  12. /* SECTION: RT_DEBUG */
  13. /* Thread Debug */
  14. #define RT_DEBUG
  15. #define SCHEDULER_DEBUG
  16. /* #define RT_THREAD_DEBUG */
  17. #define RT_USING_OVERFLOW_CHECK
  18. /* Using Hook */
  19. #define RT_USING_HOOK
  20. /* Using Software Timer */
  21. #define RT_USING_TIMER_SOFT
  22. #define RT_TIMER_THREAD_PRIO 8
  23. #define RT_TIMER_THREAD_STACK_SIZE 512
  24. #define RT_TIMER_TICK_PER_SECOND 10
  25. #define IDLE_THREAD_STACK_SIZE 1024
  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. #define RT_USING_DEVICE_IPC
  50. /* Using Module System */
  51. #define RT_USING_MODULE
  52. #define RT_USING_LIBDL
  53. /* Interrupt debug */
  54. #define RT_USING_INTERRUPT_INFO
  55. #define RT_USING_SERIAL
  56. /* SECTION: Console options */
  57. #define RT_USING_CONSOLE
  58. /* the buffer size of console */
  59. #define RT_CONSOLEBUF_SIZE 1024
  60. #define RT_CONSOLE_DEVICE_NAME "uart0"
  61. /* SECTION: finsh, a C-Express shell */
  62. /* Using FinSH as Shell*/
  63. #define RT_USING_FINSH
  64. /* Using symbol table */
  65. #define FINSH_USING_SYMTAB
  66. #define FINSH_USING_DESCRIPTION
  67. #define FINSH_THREAD_STACK_SIZE 4096
  68. #define FINSH_USING_HISTORY 1
  69. #define FINSH_USING_MSH
  70. /* SECTION: the runtime libc library */
  71. /* the runtime libc library */
  72. #define RT_USING_LIBC
  73. #define RT_USING_PTHREADS
  74. /* SECTION: C++ support */
  75. /* Using C++ support */
  76. /* #define RT_USING_CPLUSPLUS */
  77. /* SECTION: Device filesystem support */
  78. /* using DFS support */
  79. #define RT_USING_DFS
  80. #define RT_USING_DFS_ELMFAT
  81. /* use long file name feature */
  82. #define RT_DFS_ELM_USE_LFN 2
  83. #define RT_DFS_ELM_REENTRANT
  84. /* define OEM code page */
  85. #define RT_DFS_ELM_CODE_PAGE 936
  86. /* Using OEM code page file */
  87. // #define RT_DFS_ELM_CODE_PAGE_FILE
  88. /* the max number of file length */
  89. #define RT_DFS_ELM_MAX_LFN 128
  90. /* #define RT_USING_DFS_YAFFS2 */
  91. #define RT_USING_DFS_DEVFS
  92. #define RT_USING_DFS_NFS
  93. #define RT_NFS_HOST_EXPORT "192.168.1.5:/"
  94. #define DFS_USING_WORKDIR
  95. /* the max number of mounted filesystem */
  96. #define DFS_FILESYSTEMS_MAX 4
  97. /* the max number of opened files */
  98. #define DFS_FD_MAX 16
  99. /* the max number of cached sector */
  100. #define DFS_CACHE_MAX_NUM 4
  101. /* Enable freemodbus protocol stack*/
  102. /* #define RT_USING_MODBUS */
  103. /* USING CPU FFS */
  104. #define RT_USING_CPU_FFS
  105. /* MMU pte item size defined */
  106. #define RT_MMU_PTE_SIZE 4096
  107. #define RT_USING_GPIO
  108. #define RT_USING_I2C
  109. #define RT_USING_SPI
  110. #define RT_USING_SDIO
  111. #define RT_MMCSD_DBG
  112. /* SECTION: lwip, a lightweight TCP/IP protocol stack */
  113. /* Using lightweight TCP/IP protocol stack */
  114. #define RT_USING_LWIP
  115. /* Trace LwIP protocol */
  116. /* #define RT_LWIP_DEBUG */
  117. //#define RT_LWIP_REASSEMBLY_FRAG
  118. #define SO_REUSE 1
  119. #define RT_LWIP_DNS
  120. /* Enable ICMP protocol */
  121. #define RT_LWIP_ICMP
  122. /* Enable IGMP protocol */
  123. #define RT_LWIP_IGMP
  124. /* Enable UDP protocol */
  125. #define RT_LWIP_UDP
  126. /* Enable TCP protocol */
  127. #define RT_LWIP_TCP
  128. /* the number of simulatenously active TCP connections*/
  129. #define RT_LWIP_TCP_PCB_NUM 32
  130. /* TCP sender buffer space */
  131. #define RT_LWIP_TCP_SND_BUF 1460*10
  132. /* TCP receive window. */
  133. #define RT_LWIP_TCP_WND 1460*8
  134. /* Enable SNMP protocol */
  135. /* #define RT_LWIP_SNMP */
  136. /* Using DHCP */
  137. /* #define RT_LWIP_DHCP */
  138. /* ip address of target */
  139. #define RT_LWIP_IPADDR "192.168.1.30"
  140. /* gateway address of target */
  141. #define RT_LWIP_GWADDR "192.168.1.1"
  142. /* mask address of target */
  143. #define RT_LWIP_MSKADDR "255.255.255.0"
  144. /* the number of blocks for pbuf */
  145. #define RT_LWIP_PBUF_NUM 16
  146. /* the number of simultaneously queued TCP */
  147. #define RT_LWIP_TCP_SEG_NUM 40
  148. /* thread priority of tcpip thread */
  149. #define RT_LWIP_TCPTHREAD_PRIORITY 128
  150. /* mail box size of tcpip thread to wait for */
  151. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 32
  152. /* thread stack size of tcpip thread */
  153. #define RT_LWIP_TCPTHREAD_STACKSIZE 4096
  154. /* thread priority of ethnetif thread */
  155. #define RT_LWIP_ETHTHREAD_PRIORITY 144
  156. /* mail box size of ethnetif thread to wait for */
  157. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 32
  158. /* thread stack size of ethnetif thread */
  159. #define RT_LWIP_ETHTHREAD_STACKSIZE 1024
  160. /* SECTION: RTGUI support */
  161. /* using RTGUI support */
  162. /* #define RT_USING_RTGUI */
  163. /* name length of RTGUI object */
  164. //#define RTGUI_NAME_MAX 16
  165. /* support 16 weight font */
  166. //#define RTGUI_USING_FONT16
  167. /* support 16 weight font */
  168. //#define RTGUI_USING_FONT12
  169. /* support Chinese font */
  170. //#define RTGUI_USING_FONTHZ
  171. /* use DFS as file interface */
  172. //#define RTGUI_USING_DFS_FILERW
  173. /* use font file as Chinese font */
  174. /* #define RTGUI_USING_HZ_FILE */
  175. /* use Chinese bitmap font */
  176. //#define RTGUI_USING_HZ_BMP
  177. /* use small size in RTGUI */
  178. /* #define RTGUI_USING_SMALL_SIZE */
  179. /* use mouse cursor */
  180. /* #define RTGUI_USING_MOUSE_CURSOR */
  181. /* SECTION: FTK support */
  182. /* using FTK support */
  183. /* #define RT_USING_FTK */
  184. /*
  185. * Note on FTK:
  186. *
  187. * FTK depends :
  188. * #define RT_USING_NEWLIB
  189. * #define DFS_USING_WORKDIR
  190. *
  191. * And the maximal length must great than 64
  192. * #define RT_DFS_ELM_MAX_LFN 128
  193. */
  194. #define RT_USING_COMPONENTS_INIT
  195. #define RT_USING_USER_MAIN
  196. #endif