rtconfig.h 5.6 KB

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