rtconfig.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. /* Using Small MM */
  44. #define RT_USING_SMALL_MEM
  45. #define RT_USING_COMPONENTS_INIT
  46. #define RT_USING_EXT_SDRAM
  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_UART1
  75. #define RT_USING_UART2
  76. #define RT_USING_UART3
  77. /* Using GPIO pin framework */
  78. //#define RT_USING_PIN
  79. /* Using Hardware Timer framework */
  80. //#define RT_USING_HWTIMER
  81. /* SECTION: Console options */
  82. #define RT_USING_CONSOLE
  83. /* the buffer size of console*/
  84. #define RT_CONSOLEBUF_SIZE 128
  85. /* SECTION: finsh, a C-Express shell */
  86. #define RT_USING_FINSH
  87. /* Using symbol table */
  88. #define FINSH_USING_SYMTAB
  89. #define FINSH_USING_DESCRIPTION
  90. //#define FINSH_USING_MSH
  91. #define RT_USING_RTC
  92. #ifdef RT_USING_RTC
  93. #define RT_RTC_NAME "rtc"
  94. #endif
  95. // <bool name="RT_USING_MTD_NAND" description="Using MTD nand driver framework" default="true" />
  96. #define RT_USING_MTD_NAND
  97. // <bool name="RT_MTD_NAND_DEBUG" description="Enable MTD nand debug" default="false" />
  98. #define RT_MTD_NAND_DEBUG
  99. // </section>
  100. // <section name="LIBC" description="C Runtime library setting" default="always" >
  101. // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
  102. #define RT_USING_LIBC
  103. // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
  104. //#define RT_USING_PTHREADS
  105. // </section>
  106. /* SECTION: device filesystem */
  107. /* Using Device file system */
  108. #define RT_USING_DFS /**/
  109. // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
  110. #define RT_USING_DFS_DEVFS
  111. // <integer name="DFS_FILESYSTEM_TYPES_MAX" description="The maximal number of the supported file system type" default="4" />
  112. #define DFS_FILESYSTEM_TYPES_MAX 4
  113. /* the max number of mounted filesystem */
  114. #define DFS_FILESYSTEMS_MAX 4
  115. /* the max number of opened files */
  116. #define DFS_FD_MAX 16
  117. //#define DFS_USING_WORKDIR
  118. /* Using ELM FATFS */
  119. #define RT_USING_DFS_ELMFAT
  120. #define RT_DFS_ELM_WORD_ACCESS
  121. /* Reentrancy (thread safe) of the FatFs module. */
  122. #define RT_DFS_ELM_REENTRANT
  123. /* Number of volumes (logical drives) to be used. */
  124. #define RT_DFS_ELM_DRIVES 2
  125. #define RT_DFS_ELM_USE_LFN 3 /* */
  126. #define RT_DFS_ELM_CODE_PAGE 437
  127. #define RT_DFS_ELM_MAX_LFN 255
  128. /* Maximum sector size to be handled. */
  129. #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
  130. /* DFS: UFFS nand file system options */
  131. #define RT_USING_DFS_UFFS
  132. /* configuration for uffs, more to see dfs_uffs.h and uffs_config.h */
  133. #define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_HW_AUTO
  134. //UFFS_ECC_SOFT
  135. //UFFS_ECC_HW_AUTO
  136. /* enable this ,you need provide a mark_badblock/check_block function */
  137. /* #define RT_UFFS_USE_CHECK_MARK_FUNCITON */
  138. /* Using ROM file system */
  139. // #define RT_USING_DFS_ROMFS
  140. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  141. #define RT_USING_LWIP
  142. /* LwIP uses RT-Thread Memory Management */
  143. #define RT_LWIP_USING_RT_MEM
  144. /* Enable ICMP protocol*/
  145. #define RT_LWIP_ICMP
  146. /* Enable UDP protocol*/
  147. #define RT_LWIP_UDP
  148. /* Enable TCP protocol*/
  149. #define RT_LWIP_TCP
  150. /* Enable DNS */
  151. #define RT_LWIP_DNS
  152. /* Enable DHCP */
  153. #define RT_LWIP_DHCP
  154. /* Enable DEBUG */
  155. //#define RT_LWIP_DEBUG
  156. /* the number of simulatenously active TCP connections*/
  157. #define RT_LWIP_TCP_PCB_NUM 5
  158. /* ip address of target*/
  159. #define RT_LWIP_IPADDR0 192
  160. #define RT_LWIP_IPADDR1 168
  161. #define RT_LWIP_IPADDR2 1
  162. #define RT_LWIP_IPADDR3 201
  163. /* gateway address of target*/
  164. #define RT_LWIP_GWADDR0 192
  165. #define RT_LWIP_GWADDR1 168
  166. #define RT_LWIP_GWADDR2 1
  167. #define RT_LWIP_GWADDR3 1
  168. /* mask address of target*/
  169. #define RT_LWIP_MSKADDR0 255
  170. #define RT_LWIP_MSKADDR1 255
  171. #define RT_LWIP_MSKADDR2 255
  172. #define RT_LWIP_MSKADDR3 0
  173. /* tcp thread options */
  174. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  175. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  176. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  177. /* ethernet if thread options */
  178. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  179. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  180. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  181. /* TCP sender buffer space */
  182. #define RT_LWIP_TCP_SND_BUF 8192
  183. /* TCP receive window. */
  184. #define RT_LWIP_TCP_WND 8192
  185. #define CHECKSUM_CHECK_TCP 0
  186. #define CHECKSUM_CHECK_IP 0
  187. #define CHECKSUM_CHECK_UDP 0
  188. //#define CHECKSUM_GEN_TCP 0
  189. //#define CHECKSUM_GEN_IP 0
  190. //#define CHECKSUM_GEN_UDP 0
  191. /* RT_GDB_STUB */
  192. //#define RT_USING_GDB
  193. /* spi driver */
  194. #define RT_USING_SPI
  195. #define RT_USING_SPI5
  196. /* Serial Flash Universal Driver */
  197. #define RT_USING_SFUD
  198. /* Enable SFUD debug output */
  199. //#define RT_DEBUG_SFUD 1
  200. /* serial flash discoverable parameters by JEDEC standard */
  201. #define RT_SFUD_USING_SFDP
  202. #define RT_USING_I2C
  203. #define RT_USING_I2C_BITOPS
  204. #endif