rtconfig.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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_DEBUG_INIT 1
  16. #define RT_USING_OVERFLOW_CHECK
  17. /* Using Hook */
  18. /* #define RT_USING_HOOK */
  19. /* Using Software Timer */
  20. /* #define RT_USING_TIMER_SOFT */
  21. #define RT_TIMER_THREAD_PRIO 4
  22. #define RT_TIMER_THREAD_STACK_SIZE 512
  23. #define RT_TIMER_TICK_PER_SECOND 10
  24. /* SECTION: IPC */
  25. /* Using Semaphore*/
  26. #define RT_USING_SEMAPHORE
  27. /* Using Mutex */
  28. /* #define RT_USING_MUTEX */
  29. /* Using Event */
  30. /* #define RT_USING_EVENT */
  31. /* Using MailBox */
  32. /* #define RT_USING_MAILBOX */
  33. /* Using Message Queue */
  34. /* #define RT_USING_MESSAGEQUEUE */
  35. /* SECTION: Memory Management */
  36. /* Using Memory Pool Management*/
  37. /* #define RT_USING_MEMPOOL */
  38. /* Using Dynamic Heap Management */
  39. #define RT_USING_HEAP
  40. /* Using Small MM */
  41. #define RT_USING_SMALL_MEM
  42. #define RT_USING_TINY_SIZE
  43. // <bool name="RT_USING_COMPONENTS_INIT" description="Using RT-Thread components initialization" default="true" />
  44. #define RT_USING_COMPONENTS_INIT
  45. /* SECTION: Device System */
  46. /* Using Device System */
  47. #define RT_USING_DEVICE
  48. // <bool name="RT_USING_DEVICE_IPC" description="Using device communication" default="true" />
  49. #define RT_USING_DEVICE_IPC
  50. // <bool name="RT_USING_SERIAL" description="Using Serial" default="true" />
  51. #define RT_USING_SERIAL
  52. /* SECTION: Console options */
  53. #define RT_USING_CONSOLE
  54. /* the buffer size of console*/
  55. #define RT_CONSOLEBUF_SIZE 128
  56. // <string name="RT_CONSOLE_DEVICE_NAME" description="The device name for console" default="uart1" />
  57. #define RT_CONSOLE_DEVICE_NAME "uart1"
  58. /* SECTION: finsh, a C-Express shell */
  59. #define RT_USING_FINSH
  60. /* configure finsh parameters */
  61. #define FINSH_THREAD_PRIORITY 25
  62. #define FINSH_THREAD_STACK_SIZE 1024
  63. #define FINSH_HISTORY_LINES 1
  64. /* Using symbol table */
  65. #define FINSH_USING_SYMTAB
  66. #define FINSH_USING_DESCRIPTION
  67. /* SECTION: libc management */
  68. #define RT_USING_LIBC
  69. /* SECTION: device filesystem */
  70. /* #define RT_USING_DFS */
  71. //#define RT_USING_DFS_ELMFAT
  72. #define RT_DFS_ELM_WORD_ACCESS
  73. /* Reentrancy (thread safe) of the FatFs module. */
  74. #define RT_DFS_ELM_REENTRANT
  75. /* Number of volumes (logical drives) to be used. */
  76. #define RT_DFS_ELM_DRIVES 2
  77. /* #define RT_DFS_ELM_USE_LFN 1 */
  78. #define RT_DFS_ELM_MAX_LFN 255
  79. /* Maximum sector size to be handled. */
  80. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  81. #define RT_USING_DFS_ROMFS
  82. /* the max number of mounted filesystem */
  83. #define DFS_FILESYSTEMS_MAX 2
  84. /* the max number of opened files */
  85. #define DFS_FD_MAX 4
  86. #endif