rtconfig.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. /* Using serial framework */
  52. #define RT_USING_SERIAL
  53. #define RT_USING_UART1
  54. #define RT_USING_UART2
  55. #define RT_USING_UART3
  56. /* Using GPIO pin framework */
  57. //#define RT_USING_PIN
  58. /* Using Hardware Timer framework */
  59. //#define RT_USING_HWTIMER
  60. /* SECTION: Console options */
  61. #define RT_USING_CONSOLE
  62. /* the buffer size of console*/
  63. #define RT_CONSOLEBUF_SIZE 128
  64. /* SECTION: finsh, a C-Express shell */
  65. #define RT_USING_FINSH
  66. /* Using symbol table */
  67. #define FINSH_USING_SYMTAB
  68. #define FINSH_USING_DESCRIPTION
  69. //#define FINSH_USING_MSH
  70. #define RT_USING_RTC
  71. #ifdef RT_USING_RTC
  72. #define RT_RTC_NAME "rtc"
  73. #endif
  74. // <bool name="RT_USING_MTD_NAND" description="Using MTD nand driver framework" default="true" />
  75. #define RT_USING_MTD_NAND
  76. // <bool name="RT_MTD_NAND_DEBUG" description="Enable MTD nand debug" default="false" />
  77. #define RT_MTD_NAND_DEBUG
  78. // </section>
  79. // <section name="LIBC" description="C Runtime library setting" default="always" >
  80. // <bool name="RT_USING_LIBC" description="Using libc library" default="true" />
  81. #define RT_USING_LIBC
  82. // <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
  83. //#define RT_USING_PTHREADS
  84. // </section>
  85. /* SECTION: device filesystem */
  86. /* Using Device file system */
  87. #define RT_USING_DFS /**/
  88. // <bool name="RT_USING_DFS_DEVFS" description="Using devfs for device objects" default="true" />
  89. #define RT_USING_DFS_DEVFS
  90. // <integer name="DFS_FILESYSTEM_TYPES_MAX" description="The maximal number of the supported file system type" default="4" />
  91. #define DFS_FILESYSTEM_TYPES_MAX 4
  92. /* the max number of mounted filesystem */
  93. #define DFS_FILESYSTEMS_MAX 4
  94. /* the max number of opened files */
  95. #define DFS_FD_MAX 16
  96. //#define DFS_USING_WORKDIR
  97. /* Using ELM FATFS */
  98. #define RT_USING_DFS_ELMFAT
  99. #define RT_DFS_ELM_WORD_ACCESS
  100. /* Reentrancy (thread safe) of the FatFs module. */
  101. #define RT_DFS_ELM_REENTRANT
  102. /* Number of volumes (logical drives) to be used. */
  103. #define RT_DFS_ELM_DRIVES 2
  104. #define RT_DFS_ELM_USE_LFN 3 /* */
  105. #define RT_DFS_ELM_CODE_PAGE 437
  106. #define RT_DFS_ELM_MAX_LFN 255
  107. /* Maximum sector size to be handled. */
  108. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  109. /* DFS: UFFS nand file system options */
  110. #define RT_USING_DFS_UFFS
  111. /* configuration for uffs, more to see dfs_uffs.h and uffs_config.h */
  112. #define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_HW_AUTO
  113. //UFFS_ECC_SOFT
  114. //UFFS_ECC_HW_AUTO
  115. /* enable this ,you need provide a mark_badblock/check_block function */
  116. /* #define RT_UFFS_USE_CHECK_MARK_FUNCITON */
  117. /* Using ROM file system */
  118. // #define RT_USING_DFS_ROMFS
  119. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  120. /* #define RT_USING_LWIP */
  121. /* LwIP uses RT-Thread Memory Management */
  122. #define RT_LWIP_USING_RT_MEM
  123. /* Enable ICMP protocol*/
  124. #define RT_LWIP_ICMP
  125. /* Enable UDP protocol*/
  126. #define RT_LWIP_UDP
  127. /* Enable TCP protocol*/
  128. #define RT_LWIP_TCP
  129. /* Enable DNS */
  130. #define RT_LWIP_DNS
  131. /* the number of simulatenously active TCP connections*/
  132. #define RT_LWIP_TCP_PCB_NUM 5
  133. /* ip address of target*/
  134. #define RT_LWIP_IPADDR0 192
  135. #define RT_LWIP_IPADDR1 168
  136. #define RT_LWIP_IPADDR2 1
  137. #define RT_LWIP_IPADDR3 201
  138. /* gateway address of target*/
  139. #define RT_LWIP_GWADDR0 192
  140. #define RT_LWIP_GWADDR1 168
  141. #define RT_LWIP_GWADDR2 1
  142. #define RT_LWIP_GWADDR3 1
  143. /* mask address of target*/
  144. #define RT_LWIP_MSKADDR0 255
  145. #define RT_LWIP_MSKADDR1 255
  146. #define RT_LWIP_MSKADDR2 255
  147. #define RT_LWIP_MSKADDR3 0
  148. /* tcp thread options */
  149. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  150. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  151. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  152. /* ethernet if thread options */
  153. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  154. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  155. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  156. /* TCP sender buffer space */
  157. #define RT_LWIP_TCP_SND_BUF 8192
  158. /* TCP receive window. */
  159. #define RT_LWIP_TCP_WND 8192
  160. #define CHECKSUM_CHECK_TCP 0
  161. #define CHECKSUM_CHECK_IP 0
  162. #define CHECKSUM_CHECK_UDP 0
  163. #define CHECKSUM_GEN_TCP 0
  164. #define CHECKSUM_GEN_IP 0
  165. #define CHECKSUM_GEN_UDP 0
  166. /* RT_GDB_STUB */
  167. //#define RT_USING_GDB
  168. #endif