rtconfig.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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 IDLE_THREAD_STACK_SIZE 1024
  20. /* Using Software Timer */
  21. /* #define RT_USING_TIMER_SOFT */
  22. #define RT_TIMER_THREAD_PRIO 4
  23. #define RT_TIMER_THREAD_STACK_SIZE 512
  24. // <bool name="RT_USING_MODULE" description="Using Application Module" default="true" />
  25. //#define RT_USING_MODULE
  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. #define RT_USING_MEMHEAP
  43. #define RT_USING_MEMHEAP_AS_HEAP
  44. /* Using Small MM */
  45. #define RT_USING_SMALL_MEM
  46. #define RT_USING_COMPONENTS_INIT
  47. #define RT_USING_EXT_SDRAM
  48. /* SECTION: Device System */
  49. /* Using Device System */
  50. #define RT_USING_DEVICE
  51. #define RT_USING_DEVICE_IPC
  52. /* SECTION: RTGUI support */
  53. /* using RTGUI support */
  54. #define RT_USING_GUIENGINE
  55. /* name length of RTGUI object */
  56. #define RTGUI_NAME_MAX 16
  57. /* support 16 weight font */
  58. #define RTGUI_USING_FONT16
  59. /* support 16 weight font */
  60. #define RTGUI_USING_FONT12
  61. /* support Chinese font */
  62. #define RTGUI_USING_FONTHZ
  63. /* use DFS as file interface */
  64. #define RTGUI_USING_DFS_FILERW
  65. /* use font file as Chinese font */
  66. /* #define RTGUI_USING_HZ_FILE */
  67. /* use Chinese bitmap font */
  68. #define RTGUI_USING_HZ_BMP
  69. /* use small size in RTGUI */
  70. /* #define RTGUI_USING_SMALL_SIZE */
  71. /* use mouse cursor */
  72. /* #define RTGUI_USING_MOUSE_CURSOR */
  73. #define RT_USING_I2C
  74. #define RT_USING_I2C_BITOPS
  75. //#define RT_I2C_DEBUG
  76. #define RT_USING_FM24CLXX
  77. /* Using serial framework */
  78. #define RT_USING_SERIAL
  79. #define RT_USING_UART1
  80. //#define RT_USING_UART2
  81. //#define RT_USING_UART3
  82. /* Using GPIO pin framework */
  83. //#define RT_USING_PIN
  84. #define RT_USING_RTC
  85. #define RT_USING_SPI
  86. #define RT_USING_SPI1
  87. #define RT_USING_W25QXX
  88. #define FLASH_DEBUG
  89. //#define RT_USING_SFUD
  90. //#define RT_DEBUG_SFUD 1
  91. //#define RT_SFUD_USING_SFDP
  92. /* Using Hardware Timer framework */
  93. //#define RT_USING_HWTIMER
  94. /* SECTION: Console options */
  95. #define RT_USING_CONSOLE
  96. /* the buffer size of console*/
  97. #define RT_CONSOLEBUF_SIZE 128
  98. /* SECTION: finsh, a C-Express shell */
  99. #define RT_USING_FINSH
  100. /* Using symbol table */
  101. #define FINSH_USING_SYMTAB
  102. #define FINSH_USING_DESCRIPTION
  103. #define FINSH_USING_MSH
  104. // <bool name="RT_USING_MTD_NAND" description="Using MTD nand driver framework" default="true" />
  105. //#define RT_USING_MTD_NAND
  106. // <bool name="RT_MTD_NAND_DEBUG" description="Enable MTD nand debug" default="false" />
  107. //#define RT_MTD_NAND_DEBUG
  108. // </section>
  109. // <section name="LIBC" description="C Runtime library setting" default="always" >
  110. // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
  111. //#define RT_USING_LIBC
  112. // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
  113. //#define RT_USING_PTHREADS
  114. // </section>
  115. /* SECTION: device filesystem */
  116. /* Using Device file system */
  117. #define RT_USING_DFS
  118. //#define DFS_DEBUG
  119. // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
  120. #define RT_USING_DFS_DEVFS
  121. // <integer name="DFS_FILESYSTEM_TYPES_MAX" description="The maximal number of the supported file system type" default="4" />
  122. #define DFS_FILESYSTEM_TYPES_MAX 4
  123. /* the max number of mounted filesystem */
  124. #define DFS_FILESYSTEMS_MAX 4
  125. /* the max number of opened files */
  126. #define DFS_FD_MAX 16
  127. //#define DFS_USING_WORKDIR
  128. /* Using ELM FATFS */
  129. #define RT_USING_DFS_ELMFAT
  130. //#define RT_DFS_ELM_WORD_ACCESS
  131. /* Reentrancy (thread safe) of the FatFs module. */
  132. #define RT_DFS_ELM_REENTRANT
  133. /* Number of volumes (logical drives) to be used. */
  134. #define RT_DFS_ELM_DRIVES 2
  135. #define RT_DFS_ELM_USE_LFN 3 /* */
  136. #define RT_DFS_ELM_CODE_PAGE 437
  137. #define RT_DFS_ELM_MAX_LFN 255
  138. /* Maximum sector size to be handled. */
  139. #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
  140. /* DFS: UFFS nand file system options */
  141. //#define RT_USING_DFS_UFFS
  142. /* configuration for uffs, more to see dfs_uffs.h and uffs_config.h */
  143. #define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_HW_AUTO
  144. //UFFS_ECC_SOFT
  145. //UFFS_ECC_HW_AUTO
  146. /* enable this ,you need provide a mark_badblock/check_block function */
  147. /* #define RT_UFFS_USE_CHECK_MARK_FUNCITON */
  148. /* Using ROM file system */
  149. // #define RT_USING_DFS_ROMFS
  150. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  151. #define RT_USING_LWIP
  152. #define RT_USING_LWIP202
  153. /* LwIP uses RT-Thread Memory Management */
  154. #define RT_LWIP_USING_RT_MEM
  155. /* Enable ICMP protocol*/
  156. #define RT_LWIP_ICMP
  157. /* Enable UDP protocol*/
  158. #define RT_LWIP_UDP
  159. /* Enable TCP protocol*/
  160. #define RT_LWIP_TCP
  161. /* Enable DNS */
  162. #define RT_LWIP_DNS
  163. /* Enable DHCP */
  164. #define RT_LWIP_DHCP
  165. /* Enable DEBUG */
  166. //#define RT_LWIP_DEBUG
  167. /* the number of simulatenously active TCP connections*/
  168. #define RT_LWIP_TCP_PCB_NUM 5
  169. /* ip address of target*/
  170. #define RT_LWIP_IPADDR0 192
  171. #define RT_LWIP_IPADDR1 168
  172. #define RT_LWIP_IPADDR2 10
  173. #define RT_LWIP_IPADDR3 86
  174. /* gateway address of target*/
  175. #define RT_LWIP_GWADDR0 192
  176. #define RT_LWIP_GWADDR1 168
  177. #define RT_LWIP_GWADDR2 10
  178. #define RT_LWIP_GWADDR3 1
  179. /* mask address of target*/
  180. #define RT_LWIP_MSKADDR0 255
  181. #define RT_LWIP_MSKADDR1 255
  182. #define RT_LWIP_MSKADDR2 255
  183. #define RT_LWIP_MSKADDR3 0
  184. /* tcp thread options */
  185. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  186. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  187. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  188. /* ethernet if thread options */
  189. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  190. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  191. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  192. /* TCP sender buffer space */
  193. #define RT_LWIP_TCP_SND_BUF 8192
  194. /* TCP receive window. */
  195. #define RT_LWIP_TCP_WND 8192
  196. #define CHECKSUM_CHECK_TCP 0
  197. #define CHECKSUM_CHECK_IP 0
  198. #define CHECKSUM_CHECK_UDP 0
  199. //#define CHECKSUM_GEN_TCP 0
  200. //#define CHECKSUM_GEN_IP 0
  201. //#define CHECKSUM_GEN_UDP 0
  202. /* RT_GDB_STUB */
  203. //#define RT_USING_GDB
  204. #endif