rtconfig.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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_USING_OVERFLOW_CHECK
  16. /* Using Hook */
  17. #define RT_USING_HOOK
  18. /* SECTION: IPC */
  19. /* Using Semaphore*/
  20. #define RT_USING_SEMAPHORE
  21. /* Using Mutex */
  22. #define RT_USING_MUTEX
  23. /* Using Event */
  24. #define RT_USING_EVENT
  25. /* Using MailBox */
  26. #define RT_USING_MAILBOX
  27. /* Using Message Queue */
  28. #define RT_USING_MESSAGEQUEUE
  29. /* SECTION: Memory Management */
  30. /* Using Memory Pool Management*/
  31. #define RT_USING_MEMPOOL
  32. /* Using Dynamic Heap Management */
  33. #define RT_USING_HEAP
  34. /* Using Small MM */
  35. #define RT_USING_SMALL_MEM
  36. #define RT_USING_COMPONENTS_INIT
  37. /* SECTION: Device System */
  38. /* Using Device System */
  39. #define RT_USING_DEVICE
  40. #define RT_USING_DEVICE_IPC
  41. #define RT_USING_SERIAL
  42. #define RT_SERIAL_USING_DMA
  43. /* SECTION: Console options */
  44. #define RT_USING_CONSOLE
  45. /* the buffer size of console*/
  46. #define RT_CONSOLEBUF_SIZE 128
  47. #define RT_CONSOLE_DEVICE_NAME "uart2"
  48. /* SECTION: finsh, a C-Express shell */
  49. #define RT_USING_FINSH
  50. /* Using symbol table */
  51. #define FINSH_USING_SYMTAB
  52. #define FINSH_USING_DESCRIPTION
  53. #define FINSH_USING_MSH
  54. //#define FINSH_USING_MSH_ONLY
  55. #define RT_USING_LIBC
  56. /* SECTION: device filesystem */
  57. /* #define RT_USING_DFS */
  58. #define RT_USING_DFS_ELMFAT
  59. #define RT_DFS_ELM_REENTRANT
  60. #define RT_DFS_ELM_WORD_ACCESS
  61. #define RT_DFS_ELM_DRIVES 1
  62. #define RT_DFS_ELM_USE_LFN 2
  63. #define RT_DFS_ELM_MAX_LFN 255
  64. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  65. /* the max number of mounted filesystem */
  66. #define DFS_FILESYSTEMS_MAX 2
  67. /* the max number of opened files */
  68. #define DFS_FD_MAX 4
  69. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  70. #define RT_USING_LWIP
  71. /* Enable ICMP protocol*/
  72. #define RT_LWIP_ICMP
  73. /* Enable UDP protocol*/
  74. #define RT_LWIP_UDP
  75. /* Enable TCP protocol*/
  76. #define RT_LWIP_TCP
  77. /* Enable DNS */
  78. #define RT_LWIP_DNS
  79. /* Enable DHCP */
  80. // #define RT_LWIP_DHCP
  81. #define RT_MEMP_NUM_NETCONN 12
  82. #define RT_LWIP_PBUF_NUM 3
  83. #define RT_LWIP_RAW_PCB_NUM 2
  84. #define RT_LWIP_UDP_PCB_NUM 4
  85. #define RT_LWIP_TCP_PCB_NUM 8
  86. #define RT_LWIP_TCP_SEG_NUM 40
  87. #define RT_LWIP_TCP_SND_BUF 4380
  88. #define RT_LWIP_TCP_WND 4380
  89. /* ip address of target */
  90. #define RT_LWIP_IPADDR "192.168.1.30"
  91. /* gateway address of target */
  92. #define RT_LWIP_GWADDR "192.168.1.1"
  93. /* mask address of target */
  94. #define RT_LWIP_MSKADDR "255.255.255.0"
  95. /* tcp thread options */
  96. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  97. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  98. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  99. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  100. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  101. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  102. // <bool name="RT_USING_CMSIS_OS" description="Using CMSIS OS API" default="true" />
  103. // #define RT_USING_CMSIS_OS
  104. // <bool name="RT_USING_RTT_CMSIS" description="Using CMSIS in RTT" default="true" />
  105. #define RT_USING_RTT_CMSIS
  106. #endif