rtconfig.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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 THREAD_DEBUG
  19. //#define SCHEDULER_DEBUG
  20. //#define IRQ_DEBUG
  21. #define IDLE_THREAD_STACK_SIZE 1024
  22. #define RT_USING_OVERFLOW_CHECK
  23. /* Using Hook */
  24. #define RT_USING_HOOK
  25. /* Using Software Timer */
  26. /* #define RT_USING_TIMER_SOFT */
  27. #define RT_TIMER_THREAD_PRIO 4
  28. #define RT_TIMER_THREAD_STACK_SIZE 512
  29. #define RT_TIMER_TICK_PER_SECOND 10
  30. /* SECTION: IPC */
  31. /* Using Semaphore*/
  32. #define RT_USING_SEMAPHORE
  33. /* Using Mutex */
  34. #define RT_USING_MUTEX
  35. /* Using Event */
  36. #define RT_USING_EVENT
  37. /* Using MailBox */
  38. #define RT_USING_MAILBOX
  39. /* Using Message Queue */
  40. #define RT_USING_MESSAGEQUEUE
  41. /* SECTION: Memory Management */
  42. /* Using Memory Pool Management*/
  43. #define RT_USING_MEMPOOL
  44. /* Using Dynamic Heap Management */
  45. #define RT_USING_HEAP
  46. /* Using Small MM */
  47. #define RT_USING_SMALL_MEM
  48. /* SECTION: Device System */
  49. /* Using Device System */
  50. #define RT_USING_DEVICE
  51. #define RT_USING_UART1
  52. /* SECTION: Console options */
  53. #define RT_USING_CONSOLE
  54. /* the buffer size of console*/
  55. #define RT_CONSOLEBUF_SIZE 128
  56. #define RT_USING_NEWLIB
  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. #define __fsymtab_start _alt_partition_FSymTab_start
  63. #define __fsymtab_end _alt_partition_FSymTab_end
  64. #define __vsymtab_start _alt_partition_VSymTab_start
  65. #define __vsymtab_end _alt_partition_VSymTab_end
  66. /* SECTION: device filesystem */
  67. //#define RT_USING_DFS
  68. #define RT_USING_DFS_ELMFAT
  69. /* the max number of mounted filesystem */
  70. #define DFS_FILESYSTEMS_MAX 2
  71. /* the max number of opened files */
  72. #define DFS_FD_MAX 4
  73. /* the max number of cached sector */
  74. #define DFS_CACHE_MAX_NUM 4
  75. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  76. //#define RT_USING_LWIP
  77. /* Enable ICMP protocol*/
  78. #define RT_LWIP_ICMP
  79. /* Enable UDP protocol*/
  80. #define RT_LWIP_UDP
  81. /* Enable TCP protocol*/
  82. #define RT_LWIP_TCP
  83. /* Enable DNS */
  84. #define RT_LWIP_DNS
  85. /* the number of simulatenously active TCP connections*/
  86. #define RT_LWIP_TCP_PCB_NUM 5
  87. /* Using DHCP */
  88. //#define RT_LWIP_DHCP
  89. /* ip address of target*/
  90. #define RT_LWIP_IPADDR0 192
  91. #define RT_LWIP_IPADDR1 168
  92. #define RT_LWIP_IPADDR2 1
  93. #define RT_LWIP_IPADDR3 30
  94. /* gateway address of target*/
  95. #define RT_LWIP_GWADDR0 192
  96. #define RT_LWIP_GWADDR1 168
  97. #define RT_LWIP_GWADDR2 1
  98. #define RT_LWIP_GWADDR3 1
  99. /* mask address of target*/
  100. #define RT_LWIP_MSKADDR0 255
  101. #define RT_LWIP_MSKADDR1 255
  102. #define RT_LWIP_MSKADDR2 255
  103. #define RT_LWIP_MSKADDR3 0
  104. /* tcp thread options */
  105. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  106. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  107. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  108. /* ethernet if thread options */
  109. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  110. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  111. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  112. #endif