rtconfig.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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 100
  12. /* SECTION: RT_DEBUG */
  13. /* Thread Debug */
  14. #define RT_DEBUG
  15. #define RT_THREAD_DEBUG
  16. #define RT_USING_OVERFLOW_CHECK
  17. /* Using Hook */
  18. #define RT_USING_HOOK
  19. /* Using Software Timer */
  20. /* #define RT_USING_TIMER_SOFT */
  21. #define RT_TIMER_THREAD_PRIO 4
  22. #define RT_TIMER_THREAD_STACK_SIZE 512
  23. #define RT_TIMER_TICK_PER_SECOND 10
  24. /* SECTION: IPC */
  25. /* Using Semaphore*/
  26. #define RT_USING_SEMAPHORE
  27. /* Using Mutex */
  28. #define RT_USING_MUTEX
  29. /* Using Event */
  30. #define RT_USING_EVENT
  31. /* Using MailBox */
  32. #define RT_USING_MAILBOX
  33. /* Using Message Queue */
  34. #define RT_USING_MESSAGEQUEUE
  35. /* SECTION: Memory Management */
  36. /* Using Memory Pool Management*/
  37. #define RT_USING_MEMPOOL
  38. /* Using Dynamic Heap Management */
  39. #define RT_USING_HEAP
  40. /* Using Small MM */
  41. #define RT_USING_SMALL_MEM
  42. // <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
  43. #define RT_USING_COMPONENTS_INIT
  44. /* SECTION: Device System */
  45. /* Using Device System */
  46. #define RT_USING_DEVICE
  47. // <bool name="RT_USING_DEVICE_IPC" description="Using device communication" default="true" />
  48. #define RT_USING_DEVICE_IPC
  49. // <bool name="RT_USING_SERIAL" description="Using Serial" default="true" />
  50. #define RT_USING_SERIAL
  51. #define RT_SERIAL_USING_DMA
  52. /* SECTION: Console options */
  53. #define RT_USING_CONSOLE
  54. /* the buffer size of console*/
  55. #define RT_CONSOLEBUF_SIZE 128
  56. // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" />
  57. #define RT_CONSOLE_DEVICE_NAME "uart0"
  58. /* SECTION: finsh, a C-Express shell */
  59. #define RT_USING_FINSH
  60. /* Using symbol table */
  61. #define FINSH_USING_SYMTAB
  62. #define FINSH_USING_DESCRIPTION
  63. /* Using finsh msh model */
  64. #define FINSH_USING_MSH
  65. #define FINSH_USING_MSH_ONLY
  66. //#define RT_USING_PIN
  67. //#define RT_USING_CAN
  68. //#define RT_CAN_USING_BUS_HOOK
  69. //#define RT_CAN_USING_HDR
  70. /* SECTION: device filesystem */
  71. /* #define RT_USING_DFS */
  72. //#define RT_USING_DFS_ELMFAT
  73. /* Reentrancy (thread safe) of the FatFs module. */
  74. #define RT_DFS_ELM_REENTRANT
  75. /* Number of volumes (logical drives) to be used. */
  76. #define RT_DFS_ELM_DRIVES 2
  77. /* #define RT_DFS_ELM_USE_LFN 1 */
  78. /* #define RT_DFS_ELM_CODE_PAGE 936 */
  79. #define RT_DFS_ELM_MAX_LFN 255
  80. /* Maximum sector size to be handled. */
  81. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  82. /* the max number of mounted filesystem */
  83. #define DFS_FILESYSTEMS_MAX 2
  84. /* the max number of opened files */
  85. #define DFS_FD_MAX 4
  86. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  87. #define RT_USING_LWIP
  88. /* Enable ICMP protocol*/
  89. #define RT_LWIP_ICMP
  90. /* Enable UDP protocol*/
  91. #define RT_LWIP_UDP
  92. /* Enable TCP protocol*/
  93. #define RT_LWIP_TCP
  94. /* Enable DNS */
  95. #define RT_LWIP_DNS
  96. /* the number of simulatenously active TCP connections*/
  97. #define RT_LWIP_TCP_PCB_NUM 5
  98. /* Using DHCP */
  99. /* #define RT_LWIP_DHCP */
  100. /* ip address of target */
  101. #define RT_LWIP_IPADDR "192.168.1.37"
  102. /* gateway address of target */
  103. #define RT_LWIP_GWADDR "192.168.1.1"
  104. /* mask address of target */
  105. #define RT_LWIP_MSKADDR "255.255.255.0"
  106. /* tcp thread options */
  107. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  108. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10
  109. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  110. /* ethernet if thread options */
  111. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  112. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
  113. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  114. /* TCP sender buffer space */
  115. #define RT_LWIP_TCP_SND_BUF 8192
  116. /* TCP receive window. */
  117. #define RT_LWIP_TCP_WND 8192
  118. /* SECTION: RT-Thread/GUI */
  119. /* #define RT_USING_RTGUI */
  120. /* name length of RTGUI object */
  121. #define RTGUI_NAME_MAX 12
  122. /* support 16 weight font */
  123. #define RTGUI_USING_FONT16
  124. /* support Chinese font */
  125. #define RTGUI_USING_FONTHZ
  126. /* use DFS as file interface */
  127. #define RTGUI_USING_DFS_FILERW
  128. /* use font file as Chinese font */
  129. #define RTGUI_USING_HZ_FILE
  130. /* use Chinese bitmap font */
  131. #define RTGUI_USING_HZ_BMP
  132. /* use small size in RTGUI */
  133. #define RTGUI_USING_SMALL_SIZE
  134. /* use mouse cursor */
  135. /* #define RTGUI_USING_MOUSE_CURSOR */
  136. /* default font size in RTGUI */
  137. #define RTGUI_DEFAULT_FONT_SIZE 16
  138. /* image support */
  139. /* #define RTGUI_IMAGE_XPM */
  140. /* #define RTGUI_IMAGE_BMP */
  141. // <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
  142. // #define RT_USING_CMSIS_OS
  143. // <bool name="RT_USING_RTT_CMSIS" description="Using CMSIS in RTT" default="true" />
  144. // #define RT_USING_RTT_CMSIS
  145. // <bool name="RT_USING_BSP_CMSIS" description="Using CMSIS in BSP" default="true" />
  146. // #define RT_USING_BSP_CMSIS
  147. /* nanopb support */
  148. /* #define RT_USING_NANOPB */
  149. #define RT_USING_CPU_FFS
  150. //#define RT_USING_NEWLIB
  151. #define RT_USING_USER_MAIN
  152. #define RT_USING_UART0
  153. #endif