rtconfig.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. /* klibc options */
  5. /* rt_vsnprintf options */
  6. #define RT_KLIBC_USING_VSNPRINTF_LONGLONG
  7. #define RT_KLIBC_USING_VSNPRINTF_STANDARD
  8. #define RT_KLIBC_USING_VSNPRINTF_DECIMAL_SPECIFIERS
  9. #define RT_KLIBC_USING_VSNPRINTF_EXPONENTIAL_SPECIFIERS
  10. #define RT_KLIBC_USING_VSNPRINTF_WRITEBACK_SPECIFIER
  11. #define RT_KLIBC_USING_VSNPRINTF_CHECK_NUL_IN_FORMAT_SPECIFIER
  12. #define RT_KLIBC_USING_VSNPRINTF_INTEGER_BUFFER_SIZE 32
  13. #define RT_KLIBC_USING_VSNPRINTF_DECIMAL_BUFFER_SIZE 32
  14. #define RT_KLIBC_USING_VSNPRINTF_FLOAT_PRECISION 6
  15. #define RT_KLIBC_USING_VSNPRINTF_MAX_INTEGRAL_DIGITS_FOR_DECIMAL 9
  16. #define RT_KLIBC_USING_VSNPRINTF_LOG10_TAYLOR_TERMS 4
  17. /* end of rt_vsnprintf options */
  18. /* rt_vsscanf options */
  19. /* end of rt_vsscanf options */
  20. /* rt_memset options */
  21. /* end of rt_memset options */
  22. /* rt_memcpy options */
  23. /* end of rt_memcpy options */
  24. /* rt_memmove options */
  25. /* end of rt_memmove options */
  26. /* rt_memcmp options */
  27. /* end of rt_memcmp options */
  28. /* rt_strstr options */
  29. /* end of rt_strstr options */
  30. /* rt_strcasecmp options */
  31. /* end of rt_strcasecmp options */
  32. /* rt_strncpy options */
  33. /* end of rt_strncpy options */
  34. /* rt_strcpy options */
  35. /* end of rt_strcpy options */
  36. /* rt_strncmp options */
  37. /* end of rt_strncmp options */
  38. /* rt_strcmp options */
  39. /* end of rt_strcmp options */
  40. /* rt_strlen options */
  41. /* end of rt_strlen options */
  42. /* rt_strnlen options */
  43. /* end of rt_strnlen options */
  44. /* end of klibc options */
  45. #define RT_NAME_MAX 24
  46. #define RT_CPUS_NR 1
  47. #define RT_ALIGN_SIZE 8
  48. #define RT_THREAD_PRIORITY_32
  49. #define RT_THREAD_PRIORITY_MAX 32
  50. #define RT_TICK_PER_SECOND 100
  51. #define RT_USING_OVERFLOW_CHECK
  52. #define RT_USING_HOOK
  53. #define RT_HOOK_USING_FUNC_PTR
  54. #define RT_USING_IDLE_HOOK
  55. #define RT_IDLE_HOOK_LIST_SIZE 4
  56. #define IDLE_THREAD_STACK_SIZE 16384
  57. #define RT_USING_TIMER_SOFT
  58. #define RT_TIMER_THREAD_PRIO 4
  59. #define RT_TIMER_THREAD_STACK_SIZE 16384
  60. #define RT_USING_CPU_USAGE_TRACER
  61. /* kservice options */
  62. /* end of kservice options */
  63. #define RT_USING_DEBUG
  64. #define RT_DEBUGING_ASSERT
  65. #define RT_DEBUGING_COLOR
  66. #define RT_DEBUGING_CONTEXT
  67. /* Inter-Thread communication */
  68. #define RT_USING_SEMAPHORE
  69. #define RT_USING_MUTEX
  70. #define RT_USING_EVENT
  71. #define RT_USING_MAILBOX
  72. #define RT_USING_MESSAGEQUEUE
  73. #define RT_USING_SIGNALS
  74. /* end of Inter-Thread communication */
  75. /* Memory Management */
  76. #define RT_PAGE_MAX_ORDER 11
  77. #define RT_USING_MEMPOOL
  78. #define RT_USING_SLAB
  79. #define RT_USING_SLAB_AS_HEAP
  80. #define RT_USING_MEMTRACE
  81. #define RT_USING_HEAP
  82. /* end of Memory Management */
  83. #define RT_USING_DEVICE
  84. #define RT_USING_DEVICE_OPS
  85. #define RT_USING_CONSOLE
  86. #define RT_CONSOLEBUF_SIZE 256
  87. #define RT_CONSOLE_DEVICE_NAME "uart0"
  88. #define RT_VER_NUM 0x50200
  89. #define RT_USING_STDC_ATOMIC
  90. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  91. /* end of RT-Thread Kernel */
  92. #define ARCH_CPU_64BIT
  93. #define RT_USING_CACHE
  94. #define ARCH_MM_MMU
  95. #define ARCH_RISCV
  96. #define ARCH_RISCV_FPU
  97. #define ARCH_RISCV64
  98. #define ARCH_USING_NEW_CTX_SWITCH
  99. #define ARCH_USING_RISCV_COMMON64
  100. #define ARCH_REMAP_KERNEL
  101. /* RT-Thread Components */
  102. #define RT_USING_COMPONENTS_INIT
  103. #define RT_USING_USER_MAIN
  104. #define RT_MAIN_THREAD_STACK_SIZE 16384
  105. #define RT_MAIN_THREAD_PRIORITY 10
  106. #define RT_USING_MSH
  107. #define RT_USING_FINSH
  108. #define FINSH_USING_MSH
  109. #define FINSH_THREAD_NAME "tshell"
  110. #define FINSH_THREAD_PRIORITY 20
  111. #define FINSH_THREAD_STACK_SIZE 16384
  112. #define FINSH_USING_HISTORY
  113. #define FINSH_HISTORY_LINES 10
  114. #define FINSH_USING_SYMTAB
  115. #define FINSH_CMD_SIZE 80
  116. #define MSH_USING_BUILT_IN_COMMANDS
  117. #define FINSH_USING_DESCRIPTION
  118. #define FINSH_ARG_MAX 10
  119. #define FINSH_USING_OPTION_COMPLETION
  120. /* DFS: device virtual file system */
  121. #define RT_USING_DFS
  122. #define DFS_USING_POSIX
  123. #define DFS_USING_WORKDIR
  124. #define DFS_FD_MAX 32
  125. #define RT_USING_DFS_V2
  126. #define RT_USING_DFS_ELMFAT
  127. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  128. #define RT_DFS_ELM_CODE_PAGE 437
  129. #define RT_DFS_ELM_WORD_ACCESS
  130. #define RT_DFS_ELM_USE_LFN_3
  131. #define RT_DFS_ELM_USE_LFN 3
  132. #define RT_DFS_ELM_LFN_UNICODE_0
  133. #define RT_DFS_ELM_LFN_UNICODE 0
  134. #define RT_DFS_ELM_MAX_LFN 255
  135. #define RT_DFS_ELM_DRIVES 2
  136. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  137. #define RT_DFS_ELM_REENTRANT
  138. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  139. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  140. #define RT_USING_DFS_DEVFS
  141. #define RT_USING_DFS_ROMFS
  142. /* end of DFS: device virtual file system */
  143. /* Device Drivers */
  144. #define RT_USING_DEVICE_IPC
  145. #define RT_UNAMED_PIPE_NUMBER 64
  146. #define RT_USING_SYSTEM_WORKQUEUE
  147. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  148. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  149. #define RT_USING_SERIAL
  150. #define RT_USING_SERIAL_V1
  151. #define RT_SERIAL_USING_DMA
  152. #define RT_SERIAL_RB_BUFSZ 64
  153. #define RT_USING_CPUTIME
  154. #define RT_USING_CPUTIME_RISCV
  155. #define CPUTIME_TIMER_FREQ 10000000
  156. #define RT_USING_NULL
  157. #define RT_USING_ZERO
  158. #define RT_USING_RANDOM
  159. #define RT_USING_RTC
  160. #define RT_USING_SOFT_RTC
  161. #define RT_USING_VIRTIO
  162. #define RT_USING_VIRTIO10
  163. #define RT_USING_VIRTIO_BLK
  164. #define RT_USING_VIRTIO_NET
  165. #define RT_USING_VIRTIO_CONSOLE
  166. #define RT_USING_VIRTIO_CONSOLE_PORT_MAX_NR 4
  167. #define RT_USING_VIRTIO_GPU
  168. #define RT_USING_VIRTIO_INPUT
  169. #define RT_USING_PIN
  170. #define RT_USING_KTIME
  171. /* end of Device Drivers */
  172. /* C/C++ and POSIX layer */
  173. /* ISO-ANSI C layer */
  174. /* Timezone and Daylight Saving Time */
  175. #define RT_LIBC_USING_LIGHT_TZ_DST
  176. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  177. #define RT_LIBC_TZ_DEFAULT_MIN 0
  178. #define RT_LIBC_TZ_DEFAULT_SEC 0
  179. /* end of Timezone and Daylight Saving Time */
  180. /* end of ISO-ANSI C layer */
  181. /* POSIX (Portable Operating System Interface) layer */
  182. #define RT_USING_POSIX_FS
  183. #define RT_USING_POSIX_DEVIO
  184. #define RT_USING_POSIX_STDIO
  185. #define RT_USING_POSIX_POLL
  186. #define RT_USING_POSIX_SELECT
  187. #define RT_USING_POSIX_TERMIOS
  188. #define RT_USING_POSIX_AIO
  189. #define RT_USING_POSIX_DELAY
  190. #define RT_USING_POSIX_CLOCK
  191. #define RT_USING_POSIX_TIMER
  192. /* Interprocess Communication (IPC) */
  193. #define RT_USING_POSIX_PIPE
  194. #define RT_USING_POSIX_PIPE_SIZE 512
  195. /* Socket is in the 'Network' category */
  196. /* end of Interprocess Communication (IPC) */
  197. /* end of POSIX (Portable Operating System Interface) layer */
  198. /* end of C/C++ and POSIX layer */
  199. /* Network */
  200. #define RT_USING_SAL
  201. #define SAL_INTERNET_CHECK
  202. /* Docking with protocol stacks */
  203. #define SAL_USING_LWIP
  204. /* end of Docking with protocol stacks */
  205. #define SAL_USING_POSIX
  206. #define RT_USING_NETDEV
  207. #define NETDEV_USING_IFCONFIG
  208. #define NETDEV_USING_PING
  209. #define NETDEV_USING_NETSTAT
  210. #define NETDEV_USING_AUTO_DEFAULT
  211. #define NETDEV_IPV4 1
  212. #define NETDEV_IPV6 0
  213. #define RT_USING_LWIP
  214. #define RT_USING_LWIP203
  215. #define RT_USING_LWIP_VER_NUM 0x20003
  216. #define RT_LWIP_MEM_ALIGNMENT 4
  217. #define RT_LWIP_IGMP
  218. #define RT_LWIP_ICMP
  219. #define RT_LWIP_DNS
  220. #define RT_LWIP_DHCP
  221. #define IP_SOF_BROADCAST 1
  222. #define IP_SOF_BROADCAST_RECV 1
  223. /* Static IPv4 Address */
  224. #define RT_LWIP_IPADDR "192.168.1.30"
  225. #define RT_LWIP_GWADDR "192.168.1.1"
  226. #define RT_LWIP_MSKADDR "255.255.255.0"
  227. /* end of Static IPv4 Address */
  228. #define RT_LWIP_UDP
  229. #define RT_LWIP_TCP
  230. #define RT_LWIP_RAW
  231. #define RT_MEMP_NUM_NETCONN 8
  232. #define RT_LWIP_PBUF_NUM 16
  233. #define RT_LWIP_RAW_PCB_NUM 4
  234. #define RT_LWIP_UDP_PCB_NUM 4
  235. #define RT_LWIP_TCP_PCB_NUM 4
  236. #define RT_LWIP_TCP_SEG_NUM 40
  237. #define RT_LWIP_TCP_SND_BUF 8196
  238. #define RT_LWIP_TCP_WND 8196
  239. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  240. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  241. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  242. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  243. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  244. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  245. #define LWIP_NETIF_STATUS_CALLBACK 1
  246. #define LWIP_NETIF_LINK_CALLBACK 1
  247. #define RT_LWIP_NETIF_NAMESIZE 6
  248. #define SO_REUSE 1
  249. #define LWIP_SO_RCVTIMEO 1
  250. #define LWIP_SO_SNDTIMEO 1
  251. #define LWIP_SO_RCVBUF 1
  252. #define LWIP_SO_LINGER 0
  253. #define LWIP_NETIF_LOOPBACK 0
  254. #define RT_LWIP_USING_PING
  255. /* end of Network */
  256. /* Memory protection */
  257. /* end of Memory protection */
  258. /* Utilities */
  259. #define RT_USING_UTEST
  260. #define UTEST_THR_STACK_SIZE 4096
  261. #define UTEST_THR_PRIORITY 20
  262. #define RT_USING_RESOURCE_ID
  263. #define RT_USING_ADT
  264. #define RT_USING_ADT_AVL
  265. #define RT_USING_ADT_BITMAP
  266. #define RT_USING_ADT_HASHMAP
  267. #define RT_USING_ADT_REF
  268. /* end of Utilities */
  269. /* Using USB legacy version */
  270. /* end of Using USB legacy version */
  271. /* end of RT-Thread Components */
  272. /* RT-Thread Utestcases */
  273. /* end of RT-Thread Utestcases */
  274. /* RT-Thread online packages */
  275. /* IoT - internet of things */
  276. /* Wi-Fi */
  277. /* Marvell WiFi */
  278. /* end of Marvell WiFi */
  279. /* Wiced WiFi */
  280. /* end of Wiced WiFi */
  281. /* CYW43012 WiFi */
  282. /* end of CYW43012 WiFi */
  283. /* BL808 WiFi */
  284. /* end of BL808 WiFi */
  285. /* CYW43439 WiFi */
  286. /* end of CYW43439 WiFi */
  287. /* end of Wi-Fi */
  288. /* IoT Cloud */
  289. /* end of IoT Cloud */
  290. /* end of IoT - internet of things */
  291. /* security packages */
  292. /* end of security packages */
  293. /* language packages */
  294. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  295. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  296. /* XML: Extensible Markup Language */
  297. /* end of XML: Extensible Markup Language */
  298. /* end of language packages */
  299. /* multimedia packages */
  300. /* LVGL: powerful and easy-to-use embedded GUI library */
  301. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  302. /* u8g2: a monochrome graphic library */
  303. /* end of u8g2: a monochrome graphic library */
  304. /* end of multimedia packages */
  305. /* tools packages */
  306. /* end of tools packages */
  307. /* system packages */
  308. /* enhanced kernel services */
  309. /* end of enhanced kernel services */
  310. /* acceleration: Assembly language or algorithmic acceleration packages */
  311. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  312. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  313. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  314. /* Micrium: Micrium software products porting for RT-Thread */
  315. /* end of Micrium: Micrium software products porting for RT-Thread */
  316. /* end of system packages */
  317. /* peripheral libraries and drivers */
  318. /* HAL & SDK Drivers */
  319. /* STM32 HAL & SDK Drivers */
  320. /* end of STM32 HAL & SDK Drivers */
  321. /* Infineon HAL Packages */
  322. /* end of Infineon HAL Packages */
  323. /* Kendryte SDK */
  324. /* end of Kendryte SDK */
  325. /* end of HAL & SDK Drivers */
  326. /* sensors drivers */
  327. /* end of sensors drivers */
  328. /* touch drivers */
  329. /* end of touch drivers */
  330. /* end of peripheral libraries and drivers */
  331. /* AI packages */
  332. /* end of AI packages */
  333. /* Signal Processing and Control Algorithm Packages */
  334. /* end of Signal Processing and Control Algorithm Packages */
  335. /* miscellaneous packages */
  336. /* project laboratory */
  337. /* end of project laboratory */
  338. /* samples: kernel and components samples */
  339. /* end of samples: kernel and components samples */
  340. /* entertainment: terminal games and other interesting software packages */
  341. /* end of entertainment: terminal games and other interesting software packages */
  342. /* end of miscellaneous packages */
  343. /* Arduino libraries */
  344. /* Projects and Demos */
  345. /* end of Projects and Demos */
  346. /* Sensors */
  347. /* end of Sensors */
  348. /* Display */
  349. /* end of Display */
  350. /* Timing */
  351. /* end of Timing */
  352. /* Data Processing */
  353. /* end of Data Processing */
  354. /* Data Storage */
  355. /* Communication */
  356. /* end of Communication */
  357. /* Device Control */
  358. /* end of Device Control */
  359. /* Other */
  360. /* end of Other */
  361. /* Signal IO */
  362. /* end of Signal IO */
  363. /* Uncategorized */
  364. /* end of Arduino libraries */
  365. /* end of RT-Thread online packages */
  366. /* RISC-V QEMU virt64 configs */
  367. #define BSP_USING_VIRTIO
  368. #define BSP_USING_VIRTIO_BLK
  369. #define BSP_USING_VIRTIO_NET
  370. #define BSP_USING_VIRTIO_CONSOLE
  371. #define BSP_USING_VIRTIO_GPU
  372. #define BSP_USING_VIRTIO_INPUT
  373. /* end of RISC-V QEMU virt64 configs */
  374. #define BOARD_QEMU_VIRT_RV64
  375. #define ENABLE_FPU
  376. #define __STACKSIZE__ 16384
  377. #endif