rtconfig.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* system.h - SOPC Builder system and BSP software package information */
  2. #include "system.h"
  3. /* RT-Thread config file */
  4. #ifndef __RTTHREAD_CFG_H__
  5. #define __RTTHREAD_CFG_H__
  6. /* RT_NAME_MAX*/
  7. #define RT_NAME_MAX 8
  8. /* RT_ALIGN_SIZE*/
  9. #define RT_ALIGN_SIZE 4
  10. /* PRIORITY_MAX */
  11. #define RT_THREAD_PRIORITY_MAX 32
  12. /* Tick per Second */
  13. /* TIMER_TICKS_PER_SEC define in system.h */
  14. #define RT_TICK_PER_SECOND TIMER_TICKS_PER_SEC
  15. /* SECTION: RT_DEBUG */
  16. /* Thread Debug */
  17. #define RT_DEBUG
  18. #define RT_DEBUG_COLOR
  19. //#define THREAD_DEBUG
  20. //#define SCHEDULER_DEBUG
  21. //#define IRQ_DEBUG
  22. #define IDLE_THREAD_STACK_SIZE 1024
  23. #define RT_USING_OVERFLOW_CHECK
  24. /* Using Hook */
  25. #define RT_USING_HOOK
  26. /* Using Software Timer */
  27. /* #define RT_USING_TIMER_SOFT */
  28. #define RT_TIMER_THREAD_PRIO 4
  29. #define RT_TIMER_THREAD_STACK_SIZE 512
  30. #define RT_TIMER_TICK_PER_SECOND 10
  31. /* SECTION: IPC */
  32. /* Using Semaphore*/
  33. #define RT_USING_SEMAPHORE
  34. /* Using Mutex */
  35. #define RT_USING_MUTEX
  36. /* Using Event */
  37. #define RT_USING_EVENT
  38. /* Using MailBox */
  39. #define RT_USING_MAILBOX
  40. /* Using Message Queue */
  41. #define RT_USING_MESSAGEQUEUE
  42. /* SECTION: Memory Management */
  43. /* Using Memory Pool Management*/
  44. #define RT_USING_MEMPOOL
  45. /* Using Dynamic Heap Management */
  46. #define RT_USING_HEAP
  47. /* Using Small MM */
  48. #define RT_USING_SMALL_MEM
  49. /* SECTION: Device System */
  50. /* Using Device System */
  51. #define RT_USING_DEVICE
  52. #define RT_USING_UART1
  53. /* SECTION: Console options */
  54. #define RT_USING_CONSOLE
  55. /* the buffer size of console*/
  56. #define RT_CONSOLEBUF_SIZE 128
  57. #define RT_USING_NEWLIB
  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. #define __fsymtab_start _alt_partition_FSymTab_start
  64. #define __fsymtab_end _alt_partition_FSymTab_end
  65. #define __vsymtab_start _alt_partition_VSymTab_start
  66. #define __vsymtab_end _alt_partition_VSymTab_end
  67. /* SECTION: device filesystem */
  68. //#define RT_USING_DFS
  69. #define RT_USING_DFS_ELMFAT
  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. /* the max number of cached sector */
  75. #define DFS_CACHE_MAX_NUM 4
  76. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  77. //#define RT_USING_LWIP
  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 4
  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 4
  112. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  113. #endif