rtconfig.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. #define IDLE_THREAD_STACK_SIZE 1024
  11. /* Tick per Second*/
  12. #define RT_TICK_PER_SECOND 100
  13. /* CPU Frequency 200MHz */
  14. #define RT_CPU_FREQ 200
  15. /* SECTION: RT_DEBUG */
  16. /* open debug for system assert */
  17. // #define RT_DEBUG
  18. /* Thread Debug*/
  19. /* #define RT_THREAD_DEBUG */
  20. /* #define RT_SCHEDULER_DEBUG */
  21. /* Using Hook*/
  22. #define RT_USING_HOOK
  23. /* SECTION: IPC */
  24. /* Using Semaphore*/
  25. #define RT_USING_SEMAPHORE
  26. /* Using Mutex*/
  27. #define RT_USING_MUTEX
  28. /* Using Event*/
  29. #define RT_USING_EVENT
  30. /* Using MailBox*/
  31. #define RT_USING_MAILBOX
  32. /* Using Message Queue*/
  33. #define RT_USING_MESSAGEQUEUE
  34. /* SECTION: Memory Management */
  35. /* Using Memory Pool Management*/
  36. #define RT_USING_MEMPOOL
  37. /* Using Dynamic Heap Management*/
  38. #define RT_USING_HEAP
  39. /* Using Small MM*/
  40. #define RT_USING_SMALL_MEM
  41. // #define RT_USING_NOLIBC
  42. #define RT_TINY_SIZE
  43. /* SECTION: Device System */
  44. /* Using Device System*/
  45. #define RT_USING_DEVICE
  46. #define RT_USING_UART1
  47. #define RT_UART_RX_BUFFER_SIZE 64
  48. /* SECTION: Console options */
  49. #define RT_USING_CONSOLE
  50. /* the buffer size of console*/
  51. #define RT_CONSOLEBUF_SIZE 128
  52. /* SECTION: FinSH shell options */
  53. /* Using FinSH as Shell*/
  54. #define RT_USING_FINSH
  55. /* Using symbol table */
  56. #define FINSH_USING_SYMTAB
  57. #define FINSH_USING_DESCRIPTION
  58. /* SECTION: lwip, a lighwight TCP/IP protocol stack */
  59. /* #define RT_USING_LWIP */
  60. /* LwIP uses RT-Thread Memory Management */
  61. #define RT_LWIP_USING_RT_MEM
  62. /* Enable ICMP protocol*/
  63. #define RT_LWIP_ICMP
  64. /* Enable UDP protocol*/
  65. #define RT_LWIP_UDP
  66. /* Enable TCP protocol*/
  67. #define RT_LWIP_TCP
  68. /* Enable DNS */
  69. #define RT_LWIP_DNS
  70. /* the number of simulatenously active TCP connections*/
  71. #define RT_LWIP_TCP_PCB_NUM 5
  72. /* ip address of target*/
  73. #define RT_LWIP_IPADDR0 192
  74. #define RT_LWIP_IPADDR1 168
  75. #define RT_LWIP_IPADDR2 1
  76. #define RT_LWIP_IPADDR3 30
  77. /* gateway address of target*/
  78. #define RT_LWIP_GWADDR0 192
  79. #define RT_LWIP_GWADDR1 168
  80. #define RT_LWIP_GWADDR2 1
  81. #define RT_LWIP_GWADDR3 1
  82. /* mask address of target*/
  83. #define RT_LWIP_MSKADDR0 255
  84. #define RT_LWIP_MSKADDR1 255
  85. #define RT_LWIP_MSKADDR2 255
  86. #define RT_LWIP_MSKADDR3 0
  87. /* tcp thread options */
  88. #define RT_LWIP_TCPTHREAD_PRIORITY 12
  89. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 4
  90. #define RT_LWIP_TCPTHREAD_STACKSIZE 1024
  91. /* ethernet if thread options */
  92. #define RT_LWIP_ETHTHREAD_PRIORITY 15
  93. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
  94. #define RT_LWIP_ETHTHREAD_STACKSIZE 512
  95. #endif