rtconfig.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /* RT-Thread config file */
  2. #ifndef __RTTHREAD_CFG_H__
  3. #define __RTTHREAD_CFG_H__
  4. #define RT_USING_NEWLIB
  5. //#define RT_USING_PTHREADS
  6. #define RT_USING_DFS_DEVFS
  7. /* RT_NAME_MAX*/
  8. #define RT_NAME_MAX 8
  9. /* RT_ALIGN_SIZE*/
  10. #define RT_ALIGN_SIZE 8
  11. /* PRIORITY_MAX */
  12. #define RT_THREAD_PRIORITY_MAX 32
  13. /* Tick per Second */
  14. #define RT_TICK_PER_SECOND 1000
  15. /* SECTION: RT_DEBUG */
  16. /* Thread Debug */
  17. #define RT_DEBUG
  18. #define RT_THREAD_DEBUG
  19. #define RT_USING_OVERFLOW_CHECK
  20. /* Using Hook */
  21. #define RT_USING_HOOK
  22. /* Using Software Timer */
  23. /* #define RT_USING_TIMER_SOFT */
  24. #define RT_TIMER_THREAD_PRIO 4
  25. #define RT_TIMER_THREAD_STACK_SIZE 512
  26. #define RT_TIMER_TICK_PER_SECOND 10
  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. /* Using Small MM */
  44. #define RT_USING_SMALL_MEM
  45. /* SECTION: Device System */
  46. /* Using Device System */
  47. #define RT_USING_DEVICE
  48. /* SECTION: Console options */
  49. #define RT_USING_CONSOLE
  50. /* the buffer size of console*/
  51. #define RT_CONSOLEBUF_SIZE 128
  52. #define IDLE_THREAD_STACK_SIZE 1024 /* idle stack 1K */
  53. /* SECTION: finsh, a C-Express shell */
  54. #define RT_USING_FINSH
  55. /* Using symbol table */
  56. #define FINSH_USING_SYMTAB
  57. #define FINSH_USING_DESCRIPTION
  58. /* SECTION: device filesystem */
  59. #define RT_USING_DFS
  60. #define RT_USING_DFS_ELMFAT
  61. #define RT_DFS_ELM_WORD_ACCESS
  62. /* Reentrancy (thread safe) of the FatFs module. */
  63. #define RT_DFS_ELM_REENTRANT
  64. /* Number of volumes (logical drives) to be used. */
  65. #define RT_DFS_ELM_DRIVES 2
  66. /* #define RT_DFS_ELM_USE_LFN 1 */
  67. #define RT_DFS_ELM_MAX_LFN 255
  68. /* Maximum sector size to be handled. */
  69. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  70. /* the max number of mounted filesystem */
  71. #define DFS_FILESYSTEMS_MAX 2
  72. /* the max number of opened files */
  73. #define DFS_FD_MAX 4
  74. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  75. //#define RT_USING_LWIP
  76. /* LwIP uses RT-Thread Memory Management */
  77. #define RT_LWIP_USING_RT_MEM
  78. /* Enable ICMP protocol*/
  79. #define RT_LWIP_ICMP
  80. /* Enable UDP protocol*/
  81. #define RT_LWIP_UDP
  82. /* Enable TCP protocol*/
  83. #define RT_LWIP_TCP
  84. /* Enable DNS */
  85. #define RT_LWIP_DNS
  86. /* the number of simulatenously active TCP connections*/
  87. #define RT_LWIP_TCP_PCB_NUM 5
  88. /* Using DHCP */
  89. /* #define RT_LWIP_DHCP */
  90. /* ip address of target*/
  91. #define RT_LWIP_IPADDR0 192
  92. #define RT_LWIP_IPADDR1 168
  93. #define RT_LWIP_IPADDR2 1
  94. #define RT_LWIP_IPADDR3 30
  95. /* gateway address of target*/
  96. #define RT_LWIP_GWADDR0 192
  97. #define RT_LWIP_GWADDR1 168
  98. #define RT_LWIP_GWADDR2 1
  99. #define RT_LWIP_GWADDR3 1
  100. /* mask address of target*/
  101. #define RT_LWIP_MSKADDR0 255
  102. #define RT_LWIP_MSKADDR1 255
  103. #define RT_LWIP_MSKADDR2 255
  104. #define RT_LWIP_MSKADDR3 0
  105. /* tcp thread options */
  106. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  107. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10
  108. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  109. /* ethernet if thread options */
  110. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  111. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
  112. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  113. /* TCP sender buffer space */
  114. #define RT_LWIP_TCP_SND_BUF 8192
  115. /* TCP receive window. */
  116. #define RT_LWIP_TCP_WND 8192
  117. /* SECTION: RT-Thread/GUI */
  118. /* #define RT_USING_RTGUI */
  119. /* name length of RTGUI object */
  120. #define RTGUI_NAME_MAX 12
  121. /* support 16 weight font */
  122. #define RTGUI_USING_FONT16
  123. /* support Chinese font */
  124. #define RTGUI_USING_FONTHZ
  125. /* use DFS as file interface */
  126. #define RTGUI_USING_DFS_FILERW
  127. /* use font file as Chinese font */
  128. #define RTGUI_USING_HZ_FILE
  129. /* use Chinese bitmap font */
  130. #define RTGUI_USING_HZ_BMP
  131. /* use small size in RTGUI */
  132. #define RTGUI_USING_SMALL_SIZE
  133. /* use mouse cursor */
  134. /* #define RTGUI_USING_MOUSE_CURSOR */
  135. /* default font size in RTGUI */
  136. #define RTGUI_DEFAULT_FONT_SIZE 16
  137. /* image support */
  138. /* #define RTGUI_IMAGE_XPM */
  139. /* #define RTGUI_IMAGE_BMP */
  140. #endif