rtconfig.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 24
  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 100
  10. #define RT_USING_HOOK
  11. #define RT_HOOK_USING_FUNC_PTR
  12. #define RT_USING_IDLE_HOOK
  13. #define RT_IDLE_HOOK_LIST_SIZE 4
  14. #define IDLE_THREAD_STACK_SIZE 16384
  15. #define RT_USING_TIMER_SOFT
  16. #define RT_TIMER_THREAD_PRIO 4
  17. #define RT_TIMER_THREAD_STACK_SIZE 16384
  18. #define RT_USING_CPU_USAGE_TRACER
  19. /* kservice optimization */
  20. /* end of kservice optimization */
  21. /* klibc optimization */
  22. #define RT_KLIBC_USING_VSNPRINTF_LONGLONG
  23. /* end of klibc optimization */
  24. #define RT_USING_DEBUG
  25. #define RT_DEBUGING_ASSERT
  26. #define RT_DEBUGING_COLOR
  27. #define RT_DEBUGING_CONTEXT
  28. #define RT_USING_OVERFLOW_CHECK
  29. /* Inter-Thread communication */
  30. #define RT_USING_SEMAPHORE
  31. #define RT_USING_MUTEX
  32. #define RT_USING_EVENT
  33. #define RT_USING_MAILBOX
  34. #define RT_USING_MESSAGEQUEUE
  35. #define RT_USING_SIGNALS
  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_SLAB
  41. #define RT_USING_SLAB_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 "uart0"
  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 RT_USING_HW_ATOMIC
  58. #define ARCH_MM_MMU
  59. #define ARCH_RISCV
  60. #define ARCH_RISCV64
  61. #define ARCH_USING_RISCV_COMMON64
  62. #define ARCH_REMAP_KERNEL
  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 16384
  74. #define FINSH_USING_HISTORY
  75. #define FINSH_HISTORY_LINES 10
  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 32
  87. #define RT_USING_DFS_V2
  88. #define RT_USING_DFS_ELMFAT
  89. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  90. #define RT_DFS_ELM_CODE_PAGE 437
  91. #define RT_DFS_ELM_WORD_ACCESS
  92. #define RT_DFS_ELM_USE_LFN_3
  93. #define RT_DFS_ELM_USE_LFN 3
  94. #define RT_DFS_ELM_LFN_UNICODE_0
  95. #define RT_DFS_ELM_LFN_UNICODE 0
  96. #define RT_DFS_ELM_MAX_LFN 255
  97. #define RT_DFS_ELM_DRIVES 2
  98. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  99. #define RT_DFS_ELM_REENTRANT
  100. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  101. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  102. #define RT_USING_DFS_DEVFS
  103. #define RT_USING_DFS_ROMFS
  104. /* end of DFS: device virtual file system */
  105. /* Device Drivers */
  106. #define RT_USING_DEVICE_IPC
  107. #define RT_UNAMED_PIPE_NUMBER 64
  108. #define RT_USING_SYSTEM_WORKQUEUE
  109. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  110. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  111. #define RT_USING_SERIAL
  112. #define RT_USING_SERIAL_V1
  113. #define RT_SERIAL_USING_DMA
  114. #define RT_SERIAL_RB_BUFSZ 64
  115. #define RT_USING_CPUTIME
  116. #define RT_USING_CPUTIME_RISCV
  117. #define CPUTIME_TIMER_FREQ 10000000
  118. #define RT_USING_NULL
  119. #define RT_USING_ZERO
  120. #define RT_USING_RANDOM
  121. #define RT_USING_RTC
  122. #define RT_USING_SOFT_RTC
  123. #define RT_USING_VIRTIO
  124. #define RT_USING_VIRTIO10
  125. #define RT_USING_VIRTIO_BLK
  126. #define RT_USING_VIRTIO_NET
  127. #define RT_USING_VIRTIO_CONSOLE
  128. #define RT_USING_VIRTIO_CONSOLE_PORT_MAX_NR 4
  129. #define RT_USING_PIN
  130. #define RT_USING_KTIME
  131. /* end of Device Drivers */
  132. /* C/C++ and POSIX layer */
  133. /* ISO-ANSI C layer */
  134. /* Timezone and Daylight Saving Time */
  135. #define RT_LIBC_USING_LIGHT_TZ_DST
  136. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  137. #define RT_LIBC_TZ_DEFAULT_MIN 0
  138. #define RT_LIBC_TZ_DEFAULT_SEC 0
  139. /* end of Timezone and Daylight Saving Time */
  140. /* end of ISO-ANSI C layer */
  141. /* POSIX (Portable Operating System Interface) layer */
  142. #define RT_USING_POSIX_FS
  143. #define RT_USING_POSIX_DEVIO
  144. #define RT_USING_POSIX_STDIO
  145. #define RT_USING_POSIX_POLL
  146. #define RT_USING_POSIX_SELECT
  147. #define RT_USING_POSIX_TERMIOS
  148. #define RT_USING_POSIX_AIO
  149. #define RT_USING_POSIX_DELAY
  150. #define RT_USING_POSIX_CLOCK
  151. #define RT_USING_POSIX_TIMER
  152. /* Interprocess Communication (IPC) */
  153. #define RT_USING_POSIX_PIPE
  154. #define RT_USING_POSIX_PIPE_SIZE 512
  155. /* Socket is in the 'Network' category */
  156. /* end of Interprocess Communication (IPC) */
  157. /* end of POSIX (Portable Operating System Interface) layer */
  158. /* end of C/C++ and POSIX layer */
  159. /* Network */
  160. #define RT_USING_SAL
  161. #define SAL_INTERNET_CHECK
  162. /* Docking with protocol stacks */
  163. #define SAL_USING_LWIP
  164. /* end of Docking with protocol stacks */
  165. #define SAL_USING_POSIX
  166. #define RT_USING_NETDEV
  167. #define NETDEV_USING_IFCONFIG
  168. #define NETDEV_USING_PING
  169. #define NETDEV_USING_NETSTAT
  170. #define NETDEV_USING_AUTO_DEFAULT
  171. #define NETDEV_IPV4 1
  172. #define NETDEV_IPV6 0
  173. #define RT_USING_LWIP
  174. #define RT_USING_LWIP203
  175. #define RT_USING_LWIP_VER_NUM 0x20003
  176. #define RT_LWIP_MEM_ALIGNMENT 4
  177. #define RT_LWIP_IGMP
  178. #define RT_LWIP_ICMP
  179. #define RT_LWIP_DNS
  180. #define RT_LWIP_DHCP
  181. #define IP_SOF_BROADCAST 1
  182. #define IP_SOF_BROADCAST_RECV 1
  183. /* Static IPv4 Address */
  184. #define RT_LWIP_IPADDR "192.168.1.30"
  185. #define RT_LWIP_GWADDR "192.168.1.1"
  186. #define RT_LWIP_MSKADDR "255.255.255.0"
  187. /* end of Static IPv4 Address */
  188. #define RT_LWIP_UDP
  189. #define RT_LWIP_TCP
  190. #define RT_LWIP_RAW
  191. #define RT_MEMP_NUM_NETCONN 8
  192. #define RT_LWIP_PBUF_NUM 16
  193. #define RT_LWIP_RAW_PCB_NUM 4
  194. #define RT_LWIP_UDP_PCB_NUM 4
  195. #define RT_LWIP_TCP_PCB_NUM 4
  196. #define RT_LWIP_TCP_SEG_NUM 40
  197. #define RT_LWIP_TCP_SND_BUF 8196
  198. #define RT_LWIP_TCP_WND 8196
  199. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  200. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  201. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  202. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  203. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  204. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  205. #define LWIP_NETIF_STATUS_CALLBACK 1
  206. #define LWIP_NETIF_LINK_CALLBACK 1
  207. #define RT_LWIP_NETIF_NAMESIZE 6
  208. #define SO_REUSE 1
  209. #define LWIP_SO_RCVTIMEO 1
  210. #define LWIP_SO_SNDTIMEO 1
  211. #define LWIP_SO_RCVBUF 1
  212. #define LWIP_SO_LINGER 0
  213. #define LWIP_NETIF_LOOPBACK 0
  214. #define RT_LWIP_USING_PING
  215. /* end of Network */
  216. /* Memory protection */
  217. /* end of Memory protection */
  218. /* Utilities */
  219. #define RT_USING_UTEST
  220. #define UTEST_THR_STACK_SIZE 4096
  221. #define UTEST_THR_PRIORITY 20
  222. #define RT_USING_RESOURCE_ID
  223. #define RT_USING_ADT
  224. #define RT_USING_ADT_AVL
  225. #define RT_USING_ADT_BITMAP
  226. #define RT_USING_ADT_HASHMAP
  227. #define RT_USING_ADT_REF
  228. /* end of Utilities */
  229. /* Using USB legacy version */
  230. /* end of Using USB legacy version */
  231. /* end of RT-Thread Components */
  232. /* RT-Thread Utestcases */
  233. /* end of RT-Thread Utestcases */
  234. /* RT-Thread online packages */
  235. /* IoT - internet of things */
  236. /* Wi-Fi */
  237. /* Marvell WiFi */
  238. /* end of Marvell WiFi */
  239. /* Wiced WiFi */
  240. /* end of Wiced WiFi */
  241. /* CYW43012 WiFi */
  242. /* end of CYW43012 WiFi */
  243. /* BL808 WiFi */
  244. /* end of BL808 WiFi */
  245. /* CYW43439 WiFi */
  246. /* end of CYW43439 WiFi */
  247. /* end of Wi-Fi */
  248. /* IoT Cloud */
  249. /* end of IoT Cloud */
  250. /* end of IoT - internet of things */
  251. /* security packages */
  252. /* end of security packages */
  253. /* language packages */
  254. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  255. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  256. /* XML: Extensible Markup Language */
  257. /* end of XML: Extensible Markup Language */
  258. /* end of language packages */
  259. /* multimedia packages */
  260. /* LVGL: powerful and easy-to-use embedded GUI library */
  261. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  262. /* u8g2: a monochrome graphic library */
  263. /* end of u8g2: a monochrome graphic library */
  264. /* end of multimedia packages */
  265. /* tools packages */
  266. /* end of tools packages */
  267. /* system packages */
  268. /* enhanced kernel services */
  269. /* end of enhanced kernel services */
  270. /* acceleration: Assembly language or algorithmic acceleration packages */
  271. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  272. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  273. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  274. /* Micrium: Micrium software products porting for RT-Thread */
  275. /* end of Micrium: Micrium software products porting for RT-Thread */
  276. /* end of system packages */
  277. /* peripheral libraries and drivers */
  278. /* HAL & SDK Drivers */
  279. /* STM32 HAL & SDK Drivers */
  280. /* end of STM32 HAL & SDK Drivers */
  281. /* Infineon HAL Packages */
  282. /* end of Infineon HAL Packages */
  283. /* Kendryte SDK */
  284. /* end of Kendryte SDK */
  285. /* end of HAL & SDK Drivers */
  286. /* sensors drivers */
  287. /* end of sensors drivers */
  288. /* touch drivers */
  289. /* end of touch drivers */
  290. /* end of peripheral libraries and drivers */
  291. /* AI packages */
  292. /* end of AI packages */
  293. /* Signal Processing and Control Algorithm Packages */
  294. /* end of Signal Processing and Control Algorithm Packages */
  295. /* miscellaneous packages */
  296. /* project laboratory */
  297. /* end of project laboratory */
  298. /* samples: kernel and components samples */
  299. /* end of samples: kernel and components samples */
  300. /* entertainment: terminal games and other interesting software packages */
  301. /* end of entertainment: terminal games and other interesting software packages */
  302. /* end of miscellaneous packages */
  303. /* Arduino libraries */
  304. /* Projects and Demos */
  305. /* end of Projects and Demos */
  306. /* Sensors */
  307. /* end of Sensors */
  308. /* Display */
  309. /* end of Display */
  310. /* Timing */
  311. /* end of Timing */
  312. /* Data Processing */
  313. /* end of Data Processing */
  314. /* Data Storage */
  315. /* Communication */
  316. /* end of Communication */
  317. /* Device Control */
  318. /* end of Device Control */
  319. /* Other */
  320. /* end of Other */
  321. /* Signal IO */
  322. /* end of Signal IO */
  323. /* Uncategorized */
  324. /* end of Arduino libraries */
  325. /* end of RT-Thread online packages */
  326. /* Privated Packages of RealThread */
  327. /* Network Utilities */
  328. /* end of Network Utilities */
  329. /* RT-Thread Smart */
  330. /* end of RT-Thread Smart */
  331. /* end of Privated Packages of RealThread */
  332. /* RISC-V QEMU virt64 configs */
  333. #define RISCV_S_MODE
  334. #define BSP_USING_VIRTIO_BLK
  335. #define BSP_USING_VIRTIO_NET
  336. #define BSP_USING_VIRTIO_CONSOLE
  337. /* end of RISC-V QEMU virt64 configs */
  338. #define BOARD_QEMU_VIRT_RV64
  339. #define ENABLE_FPU
  340. #define ARCH_USING_NEW_CTX_SWITCH
  341. #define __STACKSIZE__ 16384
  342. #endif