rtconfig.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 20
  5. #define RT_USING_SMART
  6. #define RT_CPUS_NR 1
  7. #define RT_ALIGN_SIZE 8
  8. #define RT_THREAD_PRIORITY_32
  9. #define RT_THREAD_PRIORITY_MAX 32
  10. #define RT_TICK_PER_SECOND 1000
  11. #define RT_USING_HOOK
  12. #define RT_HOOK_USING_FUNC_PTR
  13. #define RT_USING_IDLE_HOOK
  14. #define RT_IDLE_HOOK_LIST_SIZE 4
  15. #define IDLE_THREAD_STACK_SIZE 16384
  16. #define RT_USING_TIMER_SOFT
  17. #define RT_TIMER_THREAD_PRIO 4
  18. #define RT_TIMER_THREAD_STACK_SIZE 16384
  19. #define RT_USING_CPU_USAGE_TRACER
  20. /* kservice optimization */
  21. /* end of kservice optimization */
  22. /* klibc optimization */
  23. #define RT_KLIBC_USING_VSNPRINTF_LONGLONG
  24. /* end of klibc optimization */
  25. #define RT_USING_DEBUG
  26. #define RT_DEBUGING_ASSERT
  27. #define RT_DEBUGING_COLOR
  28. #define RT_DEBUGING_CONTEXT
  29. #define RT_USING_OVERFLOW_CHECK
  30. /* Inter-Thread communication */
  31. #define RT_USING_SEMAPHORE
  32. #define RT_USING_MUTEX
  33. #define RT_USING_EVENT
  34. #define RT_USING_MAILBOX
  35. #define RT_USING_MESSAGEQUEUE
  36. /* end of Inter-Thread communication */
  37. /* Memory Management */
  38. #define RT_PAGE_MAX_ORDER 11
  39. #define RT_USING_MEMPOOL
  40. #define RT_USING_SMALL_MEM
  41. #define RT_USING_SMALL_MEM_AS_HEAP
  42. #define RT_USING_MEMTRACE
  43. #define RT_USING_HEAP
  44. /* end of Memory Management */
  45. #define RT_USING_DEVICE
  46. #define RT_USING_DEVICE_OPS
  47. #define RT_USING_SCHED_THREAD_CTX
  48. #define RT_USING_CONSOLE
  49. #define RT_CONSOLEBUF_SIZE 256
  50. #define RT_CONSOLE_DEVICE_NAME "uart3"
  51. #define RT_VER_NUM 0x50200
  52. #define RT_USING_STDC_ATOMIC
  53. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  54. /* end of RT-Thread Kernel */
  55. #define ARCH_CPU_64BIT
  56. #define RT_USING_CACHE
  57. #define ARCH_MM_MMU
  58. #define KERNEL_VADDR_START 0x50000000
  59. #define ARCH_RISCV
  60. #define ARCH_RISCV_FPU
  61. #define ARCH_RISCV_FPU_D
  62. #define ARCH_RISCV64
  63. /* RT-Thread Components */
  64. #define RT_USING_COMPONENTS_INIT
  65. #define RT_USING_USER_MAIN
  66. #define RT_MAIN_THREAD_STACK_SIZE 16384
  67. #define RT_MAIN_THREAD_PRIORITY 10
  68. #define RT_USING_MSH
  69. #define RT_USING_FINSH
  70. #define FINSH_USING_MSH
  71. #define FINSH_THREAD_NAME "tshell"
  72. #define FINSH_THREAD_PRIORITY 20
  73. #define FINSH_THREAD_STACK_SIZE 8192
  74. #define FINSH_USING_HISTORY
  75. #define FINSH_HISTORY_LINES 5
  76. #define FINSH_USING_SYMTAB
  77. #define FINSH_CMD_SIZE 80
  78. #define MSH_USING_BUILT_IN_COMMANDS
  79. #define FINSH_USING_DESCRIPTION
  80. #define FINSH_ARG_MAX 10
  81. #define FINSH_USING_OPTION_COMPLETION
  82. /* DFS: device virtual file system */
  83. #define RT_USING_DFS
  84. #define DFS_USING_POSIX
  85. #define DFS_USING_WORKDIR
  86. #define DFS_FD_MAX 16
  87. #define RT_USING_DFS_V2
  88. #define RT_USING_DFS_DEVFS
  89. #define RT_USING_DFS_PTYFS
  90. #define RT_USING_PAGECACHE
  91. /* page cache config */
  92. #define RT_PAGECACHE_COUNT 4096
  93. #define RT_PAGECACHE_ASPACE_COUNT 1024
  94. #define RT_PAGECACHE_PRELOAD 4
  95. #define RT_PAGECACHE_HASH_NR 1024
  96. #define RT_PAGECACHE_GC_WORK_LEVEL 90
  97. #define RT_PAGECACHE_GC_STOP_LEVEL 70
  98. /* end of page cache config */
  99. /* end of DFS: device virtual file system */
  100. /* Device Drivers */
  101. #define RT_USING_DEVICE_IPC
  102. #define RT_UNAMED_PIPE_NUMBER 64
  103. #define RT_USING_SYSTEM_WORKQUEUE
  104. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 2048
  105. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  106. #define RT_USING_SERIAL
  107. #define RT_USING_SERIAL_V1
  108. #define RT_SERIAL_USING_DMA
  109. #define RT_SERIAL_RB_BUFSZ 64
  110. #define RT_USING_I2C
  111. #define RT_USING_I2C_BITOPS
  112. #define RT_USING_NULL
  113. #define RT_USING_ZERO
  114. #define RT_USING_RANDOM
  115. #define RT_USING_RTC
  116. #define RT_USING_SPI
  117. #define RT_USING_PIN
  118. #define RT_USING_KTIME
  119. /* end of Device Drivers */
  120. /* C/C++ and POSIX layer */
  121. /* ISO-ANSI C layer */
  122. /* Timezone and Daylight Saving Time */
  123. #define RT_LIBC_USING_LIGHT_TZ_DST
  124. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  125. #define RT_LIBC_TZ_DEFAULT_MIN 0
  126. #define RT_LIBC_TZ_DEFAULT_SEC 0
  127. /* end of Timezone and Daylight Saving Time */
  128. /* end of ISO-ANSI C layer */
  129. /* POSIX (Portable Operating System Interface) layer */
  130. #define RT_USING_POSIX_FS
  131. #define RT_USING_POSIX_DEVIO
  132. #define RT_USING_POSIX_STDIO
  133. #define RT_USING_POSIX_POLL
  134. #define RT_USING_POSIX_SELECT
  135. #define RT_USING_POSIX_TERMIOS
  136. #define RT_USING_POSIX_DELAY
  137. #define RT_USING_POSIX_CLOCK
  138. #define RT_USING_POSIX_TIMER
  139. /* Interprocess Communication (IPC) */
  140. #define RT_USING_POSIX_PIPE
  141. #define RT_USING_POSIX_PIPE_SIZE 512
  142. /* Socket is in the 'Network' category */
  143. /* end of Interprocess Communication (IPC) */
  144. /* end of POSIX (Portable Operating System Interface) layer */
  145. /* end of C/C++ and POSIX layer */
  146. /* Network */
  147. /* end of Network */
  148. /* Memory protection */
  149. /* end of Memory protection */
  150. /* Utilities */
  151. #define RT_USING_RESOURCE_ID
  152. #define RT_USING_ADT
  153. #define RT_USING_ADT_AVL
  154. #define RT_USING_ADT_BITMAP
  155. #define RT_USING_ADT_HASHMAP
  156. #define RT_USING_ADT_REF
  157. /* end of Utilities */
  158. #define RT_USING_LWP
  159. #define RT_LWP_MAX_NR 30
  160. #define LWP_TASK_STACK_SIZE 16384
  161. #define RT_CH_MSG_MAX_NR 1024
  162. #define LWP_CONSOLE_INPUT_BUFFER_SIZE 1024
  163. #define LWP_TID_MAX_NR 64
  164. #define RT_LWP_SHM_MAX_NR 64
  165. #define RT_USING_LDSO
  166. #define LWP_USING_TERMINAL
  167. #define LWP_PTY_MAX_PARIS_LIMIT 64
  168. /* Memory management */
  169. /* end of Memory management */
  170. /* Using USB legacy version */
  171. /* end of Using USB legacy version */
  172. /* end of RT-Thread Components */
  173. /* RT-Thread Utestcases */
  174. /* end of RT-Thread Utestcases */
  175. /* RT-Thread online packages */
  176. /* IoT - internet of things */
  177. /* Wi-Fi */
  178. /* Marvell WiFi */
  179. /* end of Marvell WiFi */
  180. /* Wiced WiFi */
  181. /* end of Wiced WiFi */
  182. /* CYW43012 WiFi */
  183. /* end of CYW43012 WiFi */
  184. /* BL808 WiFi */
  185. /* end of BL808 WiFi */
  186. /* CYW43439 WiFi */
  187. /* end of CYW43439 WiFi */
  188. /* end of Wi-Fi */
  189. /* IoT Cloud */
  190. /* end of IoT Cloud */
  191. /* end of IoT - internet of things */
  192. /* security packages */
  193. /* end of security packages */
  194. /* language packages */
  195. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  196. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  197. /* XML: Extensible Markup Language */
  198. /* end of XML: Extensible Markup Language */
  199. /* end of language packages */
  200. /* multimedia packages */
  201. /* LVGL: powerful and easy-to-use embedded GUI library */
  202. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  203. /* u8g2: a monochrome graphic library */
  204. /* end of u8g2: a monochrome graphic library */
  205. /* end of multimedia packages */
  206. /* tools packages */
  207. /* end of tools packages */
  208. /* system packages */
  209. /* enhanced kernel services */
  210. /* end of enhanced kernel services */
  211. /* acceleration: Assembly language or algorithmic acceleration packages */
  212. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  213. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  214. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  215. /* Micrium: Micrium software products porting for RT-Thread */
  216. /* end of Micrium: Micrium software products porting for RT-Thread */
  217. /* end of system packages */
  218. /* peripheral libraries and drivers */
  219. /* HAL & SDK Drivers */
  220. /* STM32 HAL & SDK Drivers */
  221. /* end of STM32 HAL & SDK Drivers */
  222. /* Kendryte SDK */
  223. /* end of Kendryte SDK */
  224. /* end of HAL & SDK Drivers */
  225. /* sensors drivers */
  226. /* end of sensors drivers */
  227. /* touch drivers */
  228. /* end of touch drivers */
  229. /* end of peripheral libraries and drivers */
  230. /* AI packages */
  231. /* end of AI packages */
  232. /* Signal Processing and Control Algorithm Packages */
  233. /* end of Signal Processing and Control Algorithm Packages */
  234. /* miscellaneous packages */
  235. /* project laboratory */
  236. /* end of project laboratory */
  237. /* samples: kernel and components samples */
  238. /* end of samples: kernel and components samples */
  239. /* entertainment: terminal games and other interesting software packages */
  240. /* end of entertainment: terminal games and other interesting software packages */
  241. /* end of miscellaneous packages */
  242. /* Arduino libraries */
  243. /* Projects and Demos */
  244. /* end of Projects and Demos */
  245. /* Sensors */
  246. /* end of Sensors */
  247. /* Display */
  248. /* end of Display */
  249. /* Timing */
  250. /* end of Timing */
  251. /* Data Processing */
  252. /* end of Data Processing */
  253. /* Data Storage */
  254. /* Communication */
  255. /* end of Communication */
  256. /* Device Control */
  257. /* end of Device Control */
  258. /* Other */
  259. /* end of Other */
  260. /* Signal IO */
  261. /* end of Signal IO */
  262. /* Uncategorized */
  263. /* end of Arduino libraries */
  264. /* end of RT-Thread online packages */
  265. #define BSP_USING_BL808
  266. #define BL808_CORE_D0
  267. #define C906_PLIC_PHY_ADDR 0xe0000000
  268. #define IRQ_MAX_NR 64
  269. #define TIMER_CLK_FREQ 1000000
  270. /* General Drivers Configuration */
  271. #define BSP_USING_UART3
  272. #define UART3_TX_USING_GPIO16
  273. #define UART3_RX_USING_GPIO17
  274. /* end of General Drivers Configuration */
  275. #define __STACKSIZE__ 16384
  276. #endif