rtconfig.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. /* RT-Thread config file */
  2. #ifndef __RTTHREAD_CFG_H__
  3. #define __RTTHREAD_CFG_H__
  4. /* RT_NAME_MAX*/
  5. #define RT_NAME_MAX 8
  6. /* RT_ALIGN_SIZE*/
  7. #define RT_ALIGN_SIZE 4
  8. /* PRIORITY_MAX */
  9. #define RT_THREAD_PRIORITY_MAX 32
  10. /* Tick per Second */
  11. #define RT_TICK_PER_SECOND (100)
  12. /* SECTION: RT_DEBUG */
  13. /* Thread Debug */
  14. #define RT_DEBUG
  15. #define RT_THREAD_DEBUG
  16. #define RT_USING_OVERFLOW_CHECK
  17. /* Using Hook */
  18. #define RT_USING_HOOK
  19. /* Using Software Timer */
  20. /* #define RT_USING_TIMER_SOFT */
  21. #define RT_TIMER_THREAD_PRIO 4
  22. #define RT_TIMER_THREAD_STACK_SIZE 512
  23. #define RT_TIMER_TICK_PER_SECOND 10
  24. //#define RT_PRINTF_LONGLONG
  25. /* SECTION: IPC */
  26. /* Using Semaphore*/
  27. #define RT_USING_SEMAPHORE
  28. /* Using Mutex */
  29. #define RT_USING_MUTEX
  30. /* Using Event */
  31. #define RT_USING_EVENT
  32. /* Using MailBox */
  33. #define RT_USING_MAILBOX
  34. /* Using Message Queue */
  35. #define RT_USING_MESSAGEQUEUE
  36. /* SECTION: Memory Management */
  37. /* Using Memory Pool Management*/
  38. //#define RT_USING_MEMPOOL
  39. /* Using Dynamic Heap Management */
  40. #define RT_USING_HEAP
  41. /* Using Small MM */
  42. #define RT_USING_SMALL_MEM
  43. // <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
  44. #define RT_USING_COMPONENTS_INIT
  45. /* SECTION: Device System */
  46. /* Using Device System */
  47. #define RT_USING_DEVICE
  48. // <bool name="RT_USING_DEVICE_IPC" description="Using device communication" default="true" />
  49. #define RT_USING_DEVICE_IPC
  50. // <bool name="RT_USING_SERIAL" description="Using Serial" default="true" />
  51. #define RT_USING_SERIAL
  52. /* SECTION: Console options */
  53. #define RT_USING_CONSOLE
  54. //#define RT_KPRINTF
  55. /* the buffer size of console*/
  56. #define RT_CONSOLEBUF_SIZE 260
  57. // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" />
  58. #define RT_CONSOLE_DEVICE_NAME "uart02"
  59. /* SECTION: finsh, a C-Express shell */
  60. #define RT_USING_FINSH
  61. /* Using symbol table */
  62. #define FINSH_USING_SYMTAB
  63. #define FINSH_USING_DESCRIPTION
  64. /* SECTION: MSH, a bash shell */
  65. #define FINSH_USING_MSH
  66. #define FINSH_USING_MSH_DEFAULT
  67. /* SECTION: MXCLI, modified base-on MSH */
  68. //#define FINSH_USING_MXCLI
  69. /* SECTION: device filesystem */
  70. //#define RT_USING_DFS
  71. //#define DFS_USING_WORKDIR
  72. //#define RT_USING_DFS_DEVFS
  73. //#define RT_USING_DFS_JFFS2
  74. /* Reentrancy (thread safe) of the FatFs module. */
  75. #define RT_DFS_ELM_REENTRANT
  76. /* Number of volumes (logical drives) to be used. */
  77. #define RT_DFS_ELM_DRIVES 2
  78. /* #define RT_DFS_ELM_USE_LFN 1 */
  79. /* #define RT_DFS_ELM_CODE_PAGE 936 */
  80. #define RT_DFS_ELM_MAX_LFN 255
  81. /* Maximum sector size to be handled. */
  82. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  83. /* the max number of mounted filesystem */
  84. #define DFS_FILESYSTEMS_MAX 2
  85. /* the max number of opened files */
  86. #define DFS_FD_MAX 4
  87. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  88. /* #define RT_USING_LWIP */
  89. /* LwIP uses RT-Thread Memory Management */
  90. #define RT_LWIP_USING_RT_MEM
  91. /* Enable ICMP protocol*/
  92. #define RT_LWIP_ICMP
  93. /* Enable UDP protocol*/
  94. #define RT_LWIP_UDP
  95. /* Enable TCP protocol*/
  96. #define RT_LWIP_TCP
  97. /* Enable DNS */
  98. #define RT_LWIP_DNS
  99. /* the number of simulatenously active TCP connections*/
  100. #define RT_LWIP_TCP_PCB_NUM 5
  101. /* Using DHCP */
  102. /* #define RT_LWIP_DHCP */
  103. /* ip address of target*/
  104. #define RT_LWIP_IPADDR0 192
  105. #define RT_LWIP_IPADDR1 168
  106. #define RT_LWIP_IPADDR2 1
  107. #define RT_LWIP_IPADDR3 30
  108. /* gateway address of target*/
  109. #define RT_LWIP_GWADDR0 192
  110. #define RT_LWIP_GWADDR1 168
  111. #define RT_LWIP_GWADDR2 1
  112. #define RT_LWIP_GWADDR3 1
  113. /* mask address of target*/
  114. #define RT_LWIP_MSKADDR0 255
  115. #define RT_LWIP_MSKADDR1 255
  116. #define RT_LWIP_MSKADDR2 255
  117. #define RT_LWIP_MSKADDR3 0
  118. /* tcp thread options */
  119. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  120. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10
  121. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  122. /* ethernet if thread options */
  123. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  124. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
  125. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  126. /* TCP sender buffer space */
  127. #define RT_LWIP_TCP_SND_BUF 8192
  128. /* TCP receive window. */
  129. #define RT_LWIP_TCP_WND 8192
  130. /* SECTION: RT-Thread/GUI */
  131. /* #define RT_USING_RTGUI */
  132. /* name length of RTGUI object */
  133. #define RTGUI_NAME_MAX 12
  134. /* support 16 weight font */
  135. #define RTGUI_USING_FONT16
  136. /* support Chinese font */
  137. #define RTGUI_USING_FONTHZ
  138. /* use DFS as file interface */
  139. #define RTGUI_USING_DFS_FILERW
  140. /* use font file as Chinese font */
  141. #define RTGUI_USING_HZ_FILE
  142. /* use Chinese bitmap font */
  143. #define RTGUI_USING_HZ_BMP
  144. /* use small size in RTGUI */
  145. #define RTGUI_USING_SMALL_SIZE
  146. /* use mouse cursor */
  147. /* #define RTGUI_USING_MOUSE_CURSOR */
  148. /* default font size in RTGUI */
  149. #define RTGUI_DEFAULT_FONT_SIZE 16
  150. /* image support */
  151. /* #define RTGUI_IMAGE_XPM */
  152. /* #define RTGUI_IMAGE_BMP */
  153. // <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
  154. // #define RT_USING_CMSIS_OS
  155. // <bool name="RT_USING_RTT_CMSIS" description="Using CMSIS in RTT" default="true" />
  156. #define RT_USING_RTT_CMSIS
  157. // <bool name="RT_USING_BSP_CMSIS" description="Using CMSIS in BSP" default="true" />
  158. // #define RT_USING_BSP_CMSIS
  159. #endif