rtconfig.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 8
  5. #define RT_CPUS_NR 1
  6. #define RT_ALIGN_SIZE 8
  7. #define RT_THREAD_PRIORITY_32
  8. #define RT_THREAD_PRIORITY_MAX 32
  9. #define RT_TICK_PER_SECOND 1000
  10. #define RT_USING_HOOK
  11. #define RT_HOOK_USING_FUNC_PTR
  12. #define RT_USING_HOOKLIST
  13. #define RT_USING_IDLE_HOOK
  14. #define RT_IDLE_HOOK_LIST_SIZE 4
  15. #define IDLE_THREAD_STACK_SIZE 8192
  16. #define RT_USING_TIMER_SOFT
  17. #define RT_TIMER_THREAD_PRIO 4
  18. #define RT_TIMER_THREAD_STACK_SIZE 8192
  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_HEAP
  43. /* end of Memory Management */
  44. #define RT_USING_DEVICE
  45. #define RT_USING_DEVICE_OPS
  46. #define RT_USING_SCHED_THREAD_CTX
  47. #define RT_USING_CONSOLE
  48. #define RT_CONSOLEBUF_SIZE 256
  49. #define RT_CONSOLE_DEVICE_NAME "uart0"
  50. #define RT_VER_NUM 0x50200
  51. #define RT_USING_STDC_ATOMIC
  52. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  53. /* end of RT-Thread Kernel */
  54. #define ARCH_CPU_64BIT
  55. #define RT_USING_CACHE
  56. #define ARCH_MM_MMU
  57. #define ARCH_RISCV
  58. #define ARCH_RISCV_FPU
  59. #define ARCH_RISCV_FPU_D
  60. #define ARCH_RISCV64
  61. #define ARCH_USING_RISCV_COMMON64
  62. /* RT-Thread Components */
  63. #define RT_USING_COMPONENTS_INIT
  64. #define RT_USING_USER_MAIN
  65. #define RT_MAIN_THREAD_STACK_SIZE 8192
  66. #define RT_MAIN_THREAD_PRIORITY 10
  67. #define RT_USING_MSH
  68. #define RT_USING_FINSH
  69. #define FINSH_USING_MSH
  70. #define FINSH_THREAD_NAME "tshell"
  71. #define FINSH_THREAD_PRIORITY 20
  72. #define FINSH_THREAD_STACK_SIZE 8192
  73. #define FINSH_USING_HISTORY
  74. #define FINSH_HISTORY_LINES 5
  75. #define FINSH_USING_SYMTAB
  76. #define FINSH_CMD_SIZE 80
  77. #define MSH_USING_BUILT_IN_COMMANDS
  78. #define FINSH_USING_DESCRIPTION
  79. #define FINSH_ARG_MAX 10
  80. #define FINSH_USING_OPTION_COMPLETION
  81. /* DFS: device virtual file system */
  82. #define RT_USING_DFS
  83. #define DFS_USING_POSIX
  84. #define DFS_USING_WORKDIR
  85. #define DFS_FD_MAX 16
  86. #define RT_USING_DFS_V2
  87. #define RT_USING_DFS_ELMFAT
  88. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  89. #define RT_DFS_ELM_CODE_PAGE 437
  90. #define RT_DFS_ELM_WORD_ACCESS
  91. #define RT_DFS_ELM_USE_LFN_3
  92. #define RT_DFS_ELM_USE_LFN 3
  93. #define RT_DFS_ELM_LFN_UNICODE_0
  94. #define RT_DFS_ELM_LFN_UNICODE 0
  95. #define RT_DFS_ELM_MAX_LFN 255
  96. #define RT_DFS_ELM_DRIVES 2
  97. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  98. #define RT_DFS_ELM_REENTRANT
  99. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  100. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  101. #define RT_USING_DFS_DEVFS
  102. #define RT_USING_DFS_ROMFS
  103. /* end of DFS: device virtual file system */
  104. /* Device Drivers */
  105. #define RT_USING_DEVICE_IPC
  106. #define RT_UNAMED_PIPE_NUMBER 64
  107. #define RT_USING_SYSTEM_WORKQUEUE
  108. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  109. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  110. #define RT_USING_SERIAL
  111. #define RT_USING_SERIAL_V1
  112. #define RT_SERIAL_USING_DMA
  113. #define RT_SERIAL_RB_BUFSZ 64
  114. #define RT_USING_CPUTIME
  115. #define RT_USING_CPUTIME_RISCV
  116. #define CPUTIME_TIMER_FREQ 25000000
  117. #define RT_USING_NULL
  118. #define RT_USING_ZERO
  119. #define RT_USING_RANDOM
  120. #define RT_USING_RTC
  121. #define RT_USING_SDIO
  122. #define RT_SDIO_STACK_SIZE 8192
  123. #define RT_SDIO_THREAD_PRIORITY 15
  124. #define RT_MMCSD_STACK_SIZE 8192
  125. #define RT_MMCSD_THREAD_PREORITY 22
  126. #define RT_MMCSD_MAX_PARTITION 16
  127. #define RT_USING_PIN
  128. #define RT_USING_KTIME
  129. /* end of Device Drivers */
  130. /* C/C++ and POSIX layer */
  131. /* ISO-ANSI C layer */
  132. /* Timezone and Daylight Saving Time */
  133. #define RT_LIBC_USING_LIGHT_TZ_DST
  134. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  135. #define RT_LIBC_TZ_DEFAULT_MIN 0
  136. #define RT_LIBC_TZ_DEFAULT_SEC 0
  137. /* end of Timezone and Daylight Saving Time */
  138. /* end of ISO-ANSI C layer */
  139. /* POSIX (Portable Operating System Interface) layer */
  140. #define RT_USING_POSIX_FS
  141. #define RT_USING_POSIX_DEVIO
  142. #define RT_USING_POSIX_STDIO
  143. #define RT_USING_POSIX_POLL
  144. #define RT_USING_POSIX_SELECT
  145. #define RT_USING_POSIX_SOCKET
  146. #define RT_USING_POSIX_TERMIOS
  147. #define RT_USING_POSIX_DELAY
  148. #define RT_USING_POSIX_CLOCK
  149. #define RT_USING_POSIX_TIMER
  150. /* Interprocess Communication (IPC) */
  151. /* Socket is in the 'Network' category */
  152. /* end of Interprocess Communication (IPC) */
  153. /* end of POSIX (Portable Operating System Interface) layer */
  154. /* end of C/C++ and POSIX layer */
  155. /* Network */
  156. #define RT_USING_SAL
  157. #define SAL_INTERNET_CHECK
  158. /* Docking with protocol stacks */
  159. #define SAL_USING_LWIP
  160. /* end of Docking with protocol stacks */
  161. #define SAL_USING_POSIX
  162. #define RT_USING_NETDEV
  163. #define NETDEV_USING_IFCONFIG
  164. #define NETDEV_USING_PING
  165. #define NETDEV_USING_NETSTAT
  166. #define NETDEV_USING_AUTO_DEFAULT
  167. #define NETDEV_IPV4 1
  168. #define NETDEV_IPV6 0
  169. #define RT_USING_LWIP
  170. #define RT_USING_LWIP212
  171. #define RT_USING_LWIP_VER_NUM 0x20102
  172. #define RT_LWIP_MEM_ALIGNMENT 8
  173. #define RT_LWIP_IGMP
  174. #define RT_LWIP_ICMP
  175. #define RT_LWIP_DNS
  176. #define RT_LWIP_DHCP
  177. #define IP_SOF_BROADCAST 1
  178. #define IP_SOF_BROADCAST_RECV 1
  179. /* Static IPv4 Address */
  180. #define RT_LWIP_IPADDR "192.168.1.30"
  181. #define RT_LWIP_GWADDR "192.168.1.1"
  182. #define RT_LWIP_MSKADDR "255.255.255.0"
  183. /* end of Static IPv4 Address */
  184. #define RT_LWIP_UDP
  185. #define RT_LWIP_TCP
  186. #define RT_LWIP_RAW
  187. #define RT_MEMP_NUM_NETCONN 8
  188. #define RT_LWIP_PBUF_NUM 16
  189. #define RT_LWIP_RAW_PCB_NUM 4
  190. #define RT_LWIP_UDP_PCB_NUM 4
  191. #define RT_LWIP_TCP_PCB_NUM 4
  192. #define RT_LWIP_TCP_SEG_NUM 40
  193. #define RT_LWIP_TCP_SND_BUF 8196
  194. #define RT_LWIP_TCP_WND 8196
  195. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  196. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  197. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  198. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  199. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  200. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  201. #define LWIP_NETIF_STATUS_CALLBACK 1
  202. #define LWIP_NETIF_LINK_CALLBACK 1
  203. #define RT_LWIP_NETIF_NAMESIZE 6
  204. #define SO_REUSE 1
  205. #define LWIP_SO_RCVTIMEO 1
  206. #define LWIP_SO_SNDTIMEO 1
  207. #define LWIP_SO_RCVBUF 1
  208. #define LWIP_SO_LINGER 0
  209. #define LWIP_NETIF_LOOPBACK 0
  210. #define RT_LWIP_USING_PING
  211. /* end of Network */
  212. /* Memory protection */
  213. /* end of Memory protection */
  214. /* Utilities */
  215. #define RT_USING_RESOURCE_ID
  216. #define RT_USING_ADT
  217. #define RT_USING_ADT_AVL
  218. #define RT_USING_ADT_BITMAP
  219. #define RT_USING_ADT_HASHMAP
  220. #define RT_USING_ADT_REF
  221. /* end of Utilities */
  222. /* Using USB legacy version */
  223. /* end of Using USB legacy version */
  224. /* end of RT-Thread Components */
  225. /* RT-Thread Utestcases */
  226. /* end of RT-Thread Utestcases */
  227. /* RT-Thread online packages */
  228. /* IoT - internet of things */
  229. /* Wi-Fi */
  230. /* Marvell WiFi */
  231. /* end of Marvell WiFi */
  232. /* Wiced WiFi */
  233. /* end of Wiced WiFi */
  234. /* CYW43012 WiFi */
  235. /* end of CYW43012 WiFi */
  236. /* BL808 WiFi */
  237. /* end of BL808 WiFi */
  238. /* CYW43439 WiFi */
  239. /* end of CYW43439 WiFi */
  240. /* end of Wi-Fi */
  241. /* IoT Cloud */
  242. /* end of IoT Cloud */
  243. /* end of IoT - internet of things */
  244. /* security packages */
  245. /* end of security packages */
  246. /* language packages */
  247. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  248. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  249. /* XML: Extensible Markup Language */
  250. /* end of XML: Extensible Markup Language */
  251. /* end of language packages */
  252. /* multimedia packages */
  253. /* LVGL: powerful and easy-to-use embedded GUI library */
  254. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  255. /* u8g2: a monochrome graphic library */
  256. /* end of u8g2: a monochrome graphic library */
  257. /* end of multimedia packages */
  258. /* tools packages */
  259. /* end of tools packages */
  260. /* system packages */
  261. /* enhanced kernel services */
  262. /* end of enhanced kernel services */
  263. /* acceleration: Assembly language or algorithmic acceleration packages */
  264. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  265. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  266. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  267. /* Micrium: Micrium software products porting for RT-Thread */
  268. /* end of Micrium: Micrium software products porting for RT-Thread */
  269. /* end of system packages */
  270. /* peripheral libraries and drivers */
  271. /* HAL & SDK Drivers */
  272. /* STM32 HAL & SDK Drivers */
  273. /* end of STM32 HAL & SDK Drivers */
  274. /* Kendryte SDK */
  275. /* end of Kendryte SDK */
  276. /* end of HAL & SDK Drivers */
  277. /* sensors drivers */
  278. /* end of sensors drivers */
  279. /* touch drivers */
  280. /* end of touch drivers */
  281. /* end of peripheral libraries and drivers */
  282. /* AI packages */
  283. /* end of AI packages */
  284. /* Signal Processing and Control Algorithm Packages */
  285. /* end of Signal Processing and Control Algorithm Packages */
  286. /* miscellaneous packages */
  287. /* project laboratory */
  288. /* end of project laboratory */
  289. /* samples: kernel and components samples */
  290. /* end of samples: kernel and components samples */
  291. /* entertainment: terminal games and other interesting software packages */
  292. /* end of entertainment: terminal games and other interesting software packages */
  293. /* end of miscellaneous packages */
  294. /* Arduino libraries */
  295. /* Projects and Demos */
  296. /* end of Projects and Demos */
  297. /* Sensors */
  298. /* end of Sensors */
  299. /* Display */
  300. /* end of Display */
  301. /* Timing */
  302. /* end of Timing */
  303. /* Data Processing */
  304. /* end of Data Processing */
  305. /* Data Storage */
  306. /* Communication */
  307. /* end of Communication */
  308. /* Device Control */
  309. /* end of Device Control */
  310. /* Other */
  311. /* end of Other */
  312. /* Signal IO */
  313. /* end of Signal IO */
  314. /* Uncategorized */
  315. /* end of Arduino libraries */
  316. /* end of RT-Thread online packages */
  317. /* General Drivers Configuration */
  318. #define BSP_USING_UART
  319. #define BSP_USING_UART0
  320. #define BSP_UART0_RX_PINNAME "UART0_RX"
  321. #define BSP_UART0_TX_PINNAME "UART0_TX"
  322. #define BSP_UART_IRQ_BASE 44
  323. /* end of General Drivers Configuration */
  324. #define BSP_USING_CV18XX
  325. #define C906_PLIC_PHY_ADDR 0x70000000
  326. #define IRQ_MAX_NR 101
  327. #define BSP_GPIO_IRQ_BASE 60
  328. #define BSP_SYS_GPIO_IRQ_BASE 70
  329. #define __STACKSIZE__ 8192
  330. #define SOC_TYPE_SG2002
  331. #define BOARD_TYPE_MILKV_DUO256M
  332. #define BSP_ROOTFS_TYPE_ROMFS
  333. #endif