rtconfig.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 8
  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_DEBUG_COLOR
  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. #define RT_TIMER_TICK_PER_SECOND 10
  25. /* SECTION: IPC */
  26. /* Using Semaphore*/
  27. #define RT_USING_SEMAPHORE
  28. /* Using Mutex */
  29. #define RT_USING_MUTEX
  30. /* Using Event */
  31. #define RT_USING_EVENT
  32. /* Using MailBox */
  33. #define RT_USING_MAILBOX
  34. /* Using Message Queue */
  35. #define RT_USING_MESSAGEQUEUE
  36. /* SECTION: Memory Management */
  37. /* Using Memory Pool Management*/
  38. #define RT_USING_MEMPOOL
  39. /* Using Dynamic Heap Management */
  40. #define RT_USING_HEAP
  41. /* Using Small MM */
  42. #define RT_USING_SMALL_MEM
  43. /* "Using Device Driver Framework" default="true" */
  44. #define RT_USING_DEVICE
  45. /* Using IPC in Device Driver Framework" default="true" */
  46. #define RT_USING_DEVICE_IPC
  47. /* Using Serial Device Driver Framework" default="true" */
  48. #define RT_USING_SERIAL
  49. #define RT_SERIAL_USING_DMA
  50. // <section name="RT_USING_COMPONENTS_INIT" description="Using components init" default="false" >
  51. #define RT_USING_COMPONENTS_INIT
  52. // </section>
  53. /* SECTION: Console options */
  54. #define RT_USING_CONSOLE
  55. /* the buffer size of console*/
  56. #define RT_CONSOLEBUF_SIZE 128
  57. /* SECTION: finsh, a C-Express shell */
  58. #define RT_USING_FINSH
  59. /* Using symbol table */
  60. #define FINSH_USING_SYMTAB
  61. #define FINSH_USING_DESCRIPTION
  62. /* SECTION: device filesystem */
  63. /* #define RT_USING_DFS */
  64. //#define RT_USING_DFS_ELMFAT
  65. #define RT_DFS_ELM_WORD_ACCESS
  66. /* Reentrancy (thread safe) of the FatFs module. */
  67. #define RT_DFS_ELM_REENTRANT
  68. /* Number of volumes (logical drives) to be used. */
  69. #define RT_DFS_ELM_DRIVES 2
  70. /* #define RT_DFS_ELM_USE_LFN 1 */
  71. #define RT_DFS_ELM_MAX_LFN 255
  72. /* Maximum sector size to be handled. */
  73. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  74. #define RT_USING_DFS_ROMFS
  75. /* the max number of mounted filesystem */
  76. #define DFS_FILESYSTEMS_MAX 2
  77. /* the max number of opened files */
  78. #define DFS_FD_MAX 4
  79. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  80. #define RT_USING_LWIP
  81. /* Enable LwIP debug output */
  82. //#define RT_LWIP_DEBUG
  83. /* Enable ICMP protocol*/
  84. #define RT_LWIP_ICMP
  85. /* Enable UDP protocol*/
  86. #define RT_LWIP_UDP
  87. /* Enable TCP protocol*/
  88. #define RT_LWIP_TCP
  89. /* Enable DNS */
  90. #define RT_LWIP_DNS
  91. /* the number of simulatenously active TCP connections*/
  92. #define RT_LWIP_TCP_PCB_NUM 5
  93. /* ip address of target */
  94. #define RT_LWIP_IPADDR "192.168.1.201"
  95. /* gateway address of target */
  96. #define RT_LWIP_GWADDR "192.168.1.1"
  97. /* mask address of target */
  98. #define RT_LWIP_MSKADDR "255.255.255.0"
  99. /* tcp thread options */
  100. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  101. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  102. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  103. /* ethernet if thread options */
  104. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  105. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  106. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  107. /* TCP sender buffer space */
  108. #define RT_LWIP_TCP_SND_BUF 8192
  109. /* TCP receive window. */
  110. #define RT_LWIP_TCP_WND 8192
  111. #define CHECKSUM_CHECK_TCP 0
  112. #define CHECKSUM_CHECK_IP 0
  113. #define CHECKSUM_CHECK_UDP 0
  114. #define CHECKSUM_GEN_TCP 1
  115. #define CHECKSUM_GEN_IP 1
  116. #define CHECKSUM_GEN_UDP 1
  117. #endif