rtconfig.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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 1000
  12. /* SECTION: RT_DEBUG */
  13. /* Thread Debug */
  14. #define RT_DEBUG
  15. #define RT_DEBUG_INIT 1
  16. #define RT_USING_OVERFLOW_CHECK
  17. /* Using Hook */
  18. #define RT_USING_HOOK
  19. #define RT_USING_TRACE
  20. #define IDLE_THREAD_STACK_SIZE 1024
  21. /* Using Software Timer */
  22. /* #define RT_USING_TIMER_SOFT */
  23. #define RT_TIMER_THREAD_PRIO 4
  24. #define RT_TIMER_THREAD_STACK_SIZE 512
  25. // <bool name="RT_USING_MODULE" description="Using Application Module" default="true" />
  26. #define RT_USING_MODULE
  27. /* SECTION: IPC */
  28. /* Using Semaphore*/
  29. #define RT_USING_SEMAPHORE
  30. /* Using Mutex */
  31. #define RT_USING_MUTEX
  32. /* Using Event */
  33. #define RT_USING_EVENT
  34. /* Using MailBox */
  35. #define RT_USING_MAILBOX
  36. /* Using Message Queue */
  37. #define RT_USING_MESSAGEQUEUE
  38. /* SECTION: Memory Management */
  39. /* Using Memory Pool Management*/
  40. #define RT_USING_MEMPOOL
  41. /* Using Dynamic Heap Management */
  42. #define RT_USING_HEAP
  43. #define RT_USING_MEMHEAP
  44. /* Using Small MM */
  45. #define RT_USING_SMALL_MEM
  46. #define RT_USING_COMPONENTS_INIT
  47. /* SECTION: Device System */
  48. /* Using Device System */
  49. #define RT_USING_DEVICE
  50. #define RT_USING_DEVICE_IPC
  51. /* SECTION: RTGUI support */
  52. /* using RTGUI support */
  53. //#define RT_USING_GUIENGINE
  54. /* name length of RTGUI object */
  55. #define RTGUI_NAME_MAX 16
  56. /* support 16 weight font */
  57. #define RTGUI_USING_FONT16
  58. /* support 16 weight font */
  59. #define RTGUI_USING_FONT12
  60. /* support Chinese font */
  61. #define RTGUI_USING_FONTHZ
  62. /* use DFS as file interface */
  63. #define RTGUI_USING_DFS_FILERW
  64. /* use font file as Chinese font */
  65. /* #define RTGUI_USING_HZ_FILE */
  66. /* use Chinese bitmap font */
  67. #define RTGUI_USING_HZ_BMP
  68. /* use small size in RTGUI */
  69. /* #define RTGUI_USING_SMALL_SIZE */
  70. /* use mouse cursor */
  71. /* #define RTGUI_USING_MOUSE_CURSOR */
  72. /* Using serial framework */
  73. #define RT_USING_SERIAL
  74. #define RT_USING_USART0
  75. #define RT_USING_USART1
  76. #define RT_USING_USART2
  77. #define RT_USING_UART3
  78. #define RT_USING_UART4
  79. #define RT_USING_USART5
  80. #define RT_USING_UART6
  81. #define RT_USING_UART7
  82. /* Using GPIO pin framework */
  83. //#define RT_USING_PIN
  84. /* Using Hardware Timer framework */
  85. //#define RT_USING_HWTIMER
  86. #define RT_USING_EXT_SDRAM
  87. /* SECTION: Console options */
  88. #define RT_USING_CONSOLE
  89. /* the buffer size of console*/
  90. #define RT_CONSOLEBUF_SIZE 128
  91. /* SECTION: finsh, a C-Express shell */
  92. #define RT_USING_FINSH
  93. /* Using symbol table */
  94. #define FINSH_USING_SYMTAB
  95. #define FINSH_USING_DESCRIPTION
  96. //#define FINSH_USING_MSH
  97. #define RT_USING_RTC
  98. #ifdef RT_USING_RTC
  99. #define RT_RTC_NAME "rtc"
  100. #endif
  101. // <section name="LIBC" description="C Runtime library setting" default="always" >
  102. // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
  103. #define RT_USING_LIBC
  104. /* SECTION: device filesystem */
  105. /* Using Device file system */
  106. #define RT_USING_DFS /**/
  107. // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
  108. #define RT_USING_DFS_DEVFS
  109. //// <integer name="DFS_FILESYSTEM_TYPES_MAX" description="The maximal number of the supported file system type" default="4" />
  110. //#define DFS_FILESYSTEM_TYPES_MAX 2
  111. /* the max number of mounted filesystem */
  112. #define DFS_FILESYSTEMS_MAX 2
  113. /* the max number of opened files */
  114. #define DFS_FD_MAX 4
  115. //#define DFS_USING_WORKDIR
  116. /* Using ELM FATFS */
  117. #define RT_USING_DFS_ELMFAT
  118. ////#define RT_DFS_ELM_WORD_ACCESS
  119. ///* Reentrancy (thread safe) of the FatFs module. */
  120. //#define RT_DFS_ELM_REENTRANT
  121. ///* Number of volumes (logical drives) to be used. */
  122. #define RT_DFS_ELM_DRIVES 2
  123. //#define RT_DFS_ELM_USE_LFN 3 /* */
  124. #define RT_DFS_ELM_MAX_LFN 255
  125. ///* Maximum sector size to be handled. */
  126. #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
  127. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  128. #define RT_USING_LWIP
  129. /* LwIP uses RT-Thread Memory Management */
  130. #define RT_LWIP_USING_RT_MEM
  131. /* Enable ICMP protocol*/
  132. #define RT_LWIP_ICMP
  133. /* Enable UDP protocol*/
  134. #define RT_LWIP_UDP
  135. /* Enable TCP protocol*/
  136. #define RT_LWIP_TCP
  137. /* Enable DNS */
  138. #define RT_LWIP_DNS
  139. /* Enable DHCP */
  140. #define RT_LWIP_DHCP
  141. /* Enable DEBUG */
  142. #define RT_LWIP_DEBUG
  143. /* the number of simulatenously active TCP connections*/
  144. #define RT_LWIP_TCP_PCB_NUM 5
  145. /* ip address of target*/
  146. #define RT_LWIP_IPADDR0 192
  147. #define RT_LWIP_IPADDR1 168
  148. #define RT_LWIP_IPADDR2 10
  149. #define RT_LWIP_IPADDR3 241
  150. /* gateway address of target*/
  151. #define RT_LWIP_GWADDR0 192
  152. #define RT_LWIP_GWADDR1 168
  153. #define RT_LWIP_GWADDR2 10
  154. #define RT_LWIP_GWADDR3 1
  155. /* mask address of target*/
  156. #define RT_LWIP_MSKADDR0 255
  157. #define RT_LWIP_MSKADDR1 255
  158. #define RT_LWIP_MSKADDR2 255
  159. #define RT_LWIP_MSKADDR3 0
  160. /* tcp thread options */
  161. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  162. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  163. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  164. /* ethernet if thread options */
  165. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  166. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  167. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  168. /* TCP sender buffer space */
  169. #define RT_LWIP_TCP_SND_BUF 8192
  170. /* TCP receive window. */
  171. #define RT_LWIP_TCP_WND 8192
  172. #define CHECKSUM_CHECK_TCP 0
  173. #define CHECKSUM_CHECK_IP 0
  174. #define CHECKSUM_CHECK_UDP 0
  175. //#define CHECKSUM_GEN_TCP 0
  176. //#define CHECKSUM_GEN_IP 0
  177. //#define CHECKSUM_GEN_UDP 0
  178. /* RT_GDB_STUB */
  179. //#define RT_USING_GDB
  180. /* spi driver */
  181. #define RT_USING_SPI
  182. #define RT_USING_SPI0
  183. #define RT_USING_SPI1
  184. #define RT_USING_SPI2
  185. #define RT_USING_SPI3
  186. #define RT_USING_SPI4
  187. #define RT_USING_SPI5
  188. //#define RT_USING_W25QXX
  189. //#define FLASH_DEBUG
  190. #define RT_USING_SFUD
  191. //#define RT_SFUD_USING_SFDP
  192. #define RT_SFUD_USING_FLASH_INFO_TABLE
  193. #define RT_USING_I2C
  194. #define RT_USING_I2C_BITOPS
  195. //#define RT_USING_CPU_FFS
  196. #endif