rtconfig.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. /* RT-Thread config file */
  2. #ifndef __RTTHREAD_CFG_H__
  3. #define __RTTHREAD_CFG_H__
  4. #ifdef _MSC_VER
  5. #undef RT_USING_NEWLIB
  6. #undef RT_USING_MINILIBC
  7. #define NORESOURCE //RT_VESRION in winuser.h
  8. #define _CRT_ERRNO_DEFINED //errno macro redefinition
  9. #endif
  10. #define RT_USING_COMPONENTS_INIT
  11. #define RT_USING_MTD_NAND
  12. #define RT_USING_MTD_NOR
  13. //#define RT_USING_DFS_UFFS
  14. /* configration for uffs, more to see dfs_uffs.h and uffs_config.h */
  15. #define RT_USING_DFS_UFFS
  16. /* use ecc soft, the uffs will do all the things about ecc */
  17. #define RT_CONFIG_UFFS_ECC_MODE UFFS_ECC_SOFT
  18. /* enable this ,you need provide a mark_badblock/check_block funciton */
  19. #define RT_UFFS_USE_CHECK_MARK_FUNCITON
  20. #define RT_USING_DFS_JFFS2
  21. #define RT_USING_DFS_WINSHAREDIR
  22. /* RT_NAME_MAX*/
  23. #define RT_NAME_MAX 8
  24. /* RT_ALIGN_SIZE*/
  25. #define RT_ALIGN_SIZE 4
  26. /* PRIORITY_MAX */
  27. #define RT_THREAD_PRIORITY_MAX 32
  28. /* Tick per Second */
  29. #define RT_TICK_PER_SECOND 1000
  30. /* SECTION: RT_DEBUG */
  31. /* Thread Debug */
  32. #define RT_DEBUG
  33. #define RT_THREAD_DEBUG
  34. #define RT_USING_OVERFLOW_CHECK
  35. /* Using Hook */
  36. #define RT_USING_HOOK
  37. /* Using Software Timer */
  38. /* #define RT_USING_TIMER_SOFT */
  39. //#define RT_TIMER_THREAD_PRIO 4
  40. //#define RT_TIMER_THREAD_STACK_SIZE 512
  41. //#define RT_TIMER_TICK_PER_SECOND 10
  42. /* SECTION: IPC */
  43. /* Using Semaphore*/
  44. #define RT_USING_SEMAPHORE
  45. /* Using Mutex */
  46. #define RT_USING_MUTEX
  47. /* Using Event */
  48. #define RT_USING_EVENT
  49. /* Using MailBox */
  50. #define RT_USING_MAILBOX
  51. /* Using Message Queue */
  52. #define RT_USING_MESSAGEQUEUE
  53. /* SECTION: Memory Management */
  54. /* Using Memory Pool Management*/
  55. //#define RT_USING_MEMPOOL
  56. /* Using Dynamic Heap Management */
  57. #define RT_USING_HEAP
  58. /* Using Small MM */
  59. #define RT_USING_SMALL_MEM
  60. //#define RT_TINY_SIZE
  61. /* SECTION: Device System */
  62. /* Using Device System */
  63. #define RT_USING_DEVICE
  64. //#define RT_USING_SERIAL
  65. //#define RT_USING_UART1
  66. /* SECTION: Console options */
  67. #define RT_USING_CONSOLE
  68. /* the buffer size of console*/
  69. #define RT_CONSOLEBUF_SIZE 128
  70. #define RT_CONSOLE_DEVICE_NAME "sci0"
  71. /* SECTION: finsh, a C-Express shell */
  72. #define RT_USING_FINSH
  73. /* Using symbol table */
  74. #define FINSH_USING_SYMTAB
  75. #define FINSH_USING_DESCRIPTION
  76. /* SECTION: device filesystem */
  77. #define RT_USING_DFS
  78. #define RT_USING_DFS_ELMFAT
  79. #define RT_DFS_ELM_WORD_ACCESS
  80. /* Reentrancy (thread safe) of the FatFs module. */
  81. #define RT_DFS_ELM_REENTRANT
  82. /* Number of volumes (logical drives) to be used. */
  83. #define RT_DFS_ELM_DRIVES 2
  84. /* #define RT_DFS_ELM_USE_LFN 1 */
  85. #define RT_DFS_ELM_MAX_LFN 255
  86. /* Maximum sector size to be handled. */
  87. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  88. /* the max number of mounted filesystem */
  89. #define DFS_FILESYSTEMS_MAX 4
  90. /* the max number of opened files */
  91. #define DFS_FD_MAX 4
  92. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  93. //#define RT_USING_LWIP
  94. /* LwIP uses RT-Thread Memory Management */
  95. #define RT_LWIP_USING_RT_MEM
  96. /* Enable ICMP protocol*/
  97. #define RT_LWIP_ICMP
  98. /* Enable UDP protocol*/
  99. #define RT_LWIP_UDP
  100. /* Enable TCP protocol*/
  101. #define RT_LWIP_TCP
  102. /* Enable DNS */
  103. #define RT_LWIP_DNS
  104. /* the number of simulatenously active TCP connections*/
  105. #define RT_LWIP_TCP_PCB_NUM 5
  106. /* Using DHCP */
  107. /* #define RT_LWIP_DHCP */
  108. /* ip address of target*/
  109. #define RT_LWIP_IPADDR0 192
  110. #define RT_LWIP_IPADDR1 168
  111. #define RT_LWIP_IPADDR2 1
  112. #define RT_LWIP_IPADDR3 30
  113. /* gateway address of target*/
  114. #define RT_LWIP_GWADDR0 192
  115. #define RT_LWIP_GWADDR1 168
  116. #define RT_LWIP_GWADDR2 1
  117. #define RT_LWIP_GWADDR3 1
  118. /* mask address of target*/
  119. #define RT_LWIP_MSKADDR0 255
  120. #define RT_LWIP_MSKADDR1 255
  121. #define RT_LWIP_MSKADDR2 255
  122. #define RT_LWIP_MSKADDR3 0
  123. /* tcp thread options */
  124. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  125. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10
  126. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  127. /* ethernet if thread options */
  128. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  129. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
  130. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  131. /* TCP sender buffer space */
  132. #define RT_LWIP_TCP_SND_BUF 8192
  133. /* TCP receive window. */
  134. #define RT_LWIP_TCP_WND 8192
  135. /* SECTION: RT-Thread/GUI */
  136. #define RT_USING_RTGUI
  137. /* name length of RTGUI object */
  138. #define RTGUI_NAME_MAX 12
  139. /* support 16 weight font */
  140. #define RTGUI_USING_FONT16
  141. /* support Chinese font */
  142. #define RTGUI_USING_FONTHZ
  143. /* use DFS as file interface */
  144. #define RTGUI_USING_DFS_FILERW
  145. /* use font file as Chinese font */
  146. //#define RTGUI_USING_HZ_FILE
  147. /* use Chinese bitmap font */
  148. #define RTGUI_USING_HZ_BMP
  149. /* use small size in RTGUI */
  150. #define RTGUI_USING_SMALL_SIZE
  151. /* use mouse cursor */
  152. /* #define RTGUI_USING_MOUSE_CURSOR */
  153. /* default font size in RTGUI */
  154. #define RTGUI_DEFAULT_FONT_SIZE 16
  155. /* image support */
  156. #define RTGUI_IMAGE_XPM
  157. #define RTGUI_IMAGE_BMP
  158. //#define RTGUI_IMAGE_JPEG
  159. //#define RTGUI_IMAGE_PNG
  160. #define RTGUI_USING_NOTEBOOK_IMAGE
  161. #endif