rtconfig.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  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 16
  46. #define RT_USING_SMART
  47. #define RT_CPUS_NR 1
  48. #define RT_ALIGN_SIZE 8
  49. #define RT_THREAD_PRIORITY_32
  50. #define RT_THREAD_PRIORITY_MAX 32
  51. #define RT_TICK_PER_SECOND 1000
  52. #define RT_USING_OVERFLOW_CHECK
  53. #define RT_USING_HOOK
  54. #define RT_HOOK_USING_FUNC_PTR
  55. #define RT_USING_HOOKLIST
  56. #define RT_USING_IDLE_HOOK
  57. #define RT_IDLE_HOOK_LIST_SIZE 4
  58. #define IDLE_THREAD_STACK_SIZE 8192
  59. #define RT_USING_TIMER_SOFT
  60. #define RT_TIMER_THREAD_PRIO 4
  61. #define RT_TIMER_THREAD_STACK_SIZE 8192
  62. #define RT_USING_CPU_USAGE_TRACER
  63. /* kservice options */
  64. /* end of kservice options */
  65. #define RT_USING_DEBUG
  66. #define RT_DEBUGING_ASSERT
  67. #define RT_DEBUGING_COLOR
  68. #define RT_DEBUGING_CONTEXT
  69. /* Inter-Thread communication */
  70. #define RT_USING_SEMAPHORE
  71. #define RT_USING_MUTEX
  72. #define RT_USING_EVENT
  73. #define RT_USING_MAILBOX
  74. #define RT_USING_MESSAGEQUEUE
  75. /* end of Inter-Thread communication */
  76. /* Memory Management */
  77. #define RT_USING_MEMPOOL
  78. #define RT_USING_SLAB
  79. #define RT_USING_SLAB_AS_HEAP
  80. #define RT_USING_HEAP
  81. /* end of Memory Management */
  82. #define RT_USING_DEVICE
  83. #define RT_USING_DEVICE_OPS
  84. #define RT_USING_CONSOLE
  85. #define RT_CONSOLEBUF_SIZE 256
  86. #define RT_CONSOLE_DEVICE_NAME "uart0"
  87. #define RT_VER_NUM 0x50201
  88. #define RT_USING_STDC_ATOMIC
  89. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  90. /* end of RT-Thread Kernel */
  91. #define ARCH_CPU_64BIT
  92. #define RT_USING_CACHE
  93. #define ARCH_MM_MMU
  94. #define KERNEL_VADDR_START 0xffffffc000000000
  95. #define ARCH_RISCV
  96. #define ARCH_RISCV_FPU
  97. #define ARCH_RISCV_VECTOR
  98. #define ARCH_VECTOR_VLEN_128
  99. #define ARCH_RISCV_FPU_D
  100. #define ARCH_RISCV64
  101. #define ARCH_USING_NEW_CTX_SWITCH
  102. #define ARCH_REMAP_KERNEL
  103. /* RT-Thread Components */
  104. #define RT_USING_COMPONENTS_INIT
  105. #define RT_USING_USER_MAIN
  106. #define RT_MAIN_THREAD_STACK_SIZE 8192
  107. #define RT_MAIN_THREAD_PRIORITY 10
  108. #define RT_USING_MSH
  109. #define RT_USING_FINSH
  110. #define FINSH_USING_MSH
  111. #define FINSH_THREAD_NAME "tshell"
  112. #define FINSH_THREAD_PRIORITY 20
  113. #define FINSH_THREAD_STACK_SIZE 8192
  114. #define FINSH_USING_HISTORY
  115. #define FINSH_HISTORY_LINES 5
  116. #define FINSH_USING_SYMTAB
  117. #define FINSH_CMD_SIZE 80
  118. #define MSH_USING_BUILT_IN_COMMANDS
  119. #define FINSH_USING_DESCRIPTION
  120. #define FINSH_ARG_MAX 10
  121. #define FINSH_USING_OPTION_COMPLETION
  122. /* DFS: device virtual file system */
  123. #define RT_USING_DFS
  124. #define DFS_USING_POSIX
  125. #define DFS_USING_WORKDIR
  126. #define DFS_FD_MAX 16
  127. #define RT_USING_DFS_V2
  128. #define RT_USING_DFS_ELMFAT
  129. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  130. #define RT_DFS_ELM_CODE_PAGE 437
  131. #define RT_DFS_ELM_WORD_ACCESS
  132. #define RT_DFS_ELM_USE_LFN_3
  133. #define RT_DFS_ELM_USE_LFN 3
  134. #define RT_DFS_ELM_LFN_UNICODE_0
  135. #define RT_DFS_ELM_LFN_UNICODE 0
  136. #define RT_DFS_ELM_MAX_LFN 255
  137. #define RT_DFS_ELM_DRIVES 2
  138. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  139. #define RT_DFS_ELM_REENTRANT
  140. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  141. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  142. #define RT_USING_DFS_DEVFS
  143. #define RT_USING_DFS_PTYFS
  144. #define RT_USING_DFS_CROMFS
  145. #define RT_USING_DFS_TMPFS
  146. #define RT_USING_PAGECACHE
  147. /* page cache config */
  148. #define RT_PAGECACHE_COUNT 4096
  149. #define RT_PAGECACHE_ASPACE_COUNT 1024
  150. #define RT_PAGECACHE_PRELOAD 4
  151. #define RT_PAGECACHE_HASH_NR 1024
  152. #define RT_PAGECACHE_GC_WORK_LEVEL 90
  153. #define RT_PAGECACHE_GC_STOP_LEVEL 70
  154. /* end of page cache config */
  155. /* end of DFS: device virtual file system */
  156. /* Device Drivers */
  157. #define RT_USING_DEVICE_IPC
  158. #define RT_UNAMED_PIPE_NUMBER 64
  159. #define RT_USING_SYSTEM_WORKQUEUE
  160. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 8192
  161. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  162. #define RT_USING_SERIAL
  163. #define RT_USING_SERIAL_V1
  164. #define RT_SERIAL_USING_DMA
  165. #define RT_SERIAL_RB_BUFSZ 64
  166. #define RT_USING_SERIAL_BYPASS
  167. #define RT_USING_CPUTIME
  168. #define RT_USING_CPUTIME_RISCV
  169. #define CPUTIME_TIMER_FREQ 25000000
  170. #define RT_USING_NULL
  171. #define RT_USING_ZERO
  172. #define RT_USING_RANDOM
  173. #define RT_USING_RTC
  174. #define RT_USING_SDIO
  175. #define RT_SDIO_STACK_SIZE 8192
  176. #define RT_SDIO_THREAD_PRIORITY 15
  177. #define RT_MMCSD_STACK_SIZE 8192
  178. #define RT_MMCSD_THREAD_PRIORITY 22
  179. #define RT_MMCSD_MAX_PARTITION 16
  180. #define RT_USING_BLK
  181. /* Partition Types */
  182. #define RT_BLK_PARTITION_DFS
  183. #define RT_BLK_PARTITION_EFI
  184. /* end of Partition Types */
  185. #define RT_USING_PIN
  186. #define RT_USING_KTIME
  187. /* end of Device Drivers */
  188. /* C/C++ and POSIX layer */
  189. /* ISO-ANSI C layer */
  190. /* Timezone and Daylight Saving Time */
  191. #define RT_LIBC_USING_LIGHT_TZ_DST
  192. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  193. #define RT_LIBC_TZ_DEFAULT_MIN 0
  194. #define RT_LIBC_TZ_DEFAULT_SEC 0
  195. /* end of Timezone and Daylight Saving Time */
  196. /* end of ISO-ANSI C layer */
  197. /* POSIX (Portable Operating System Interface) layer */
  198. #define RT_USING_POSIX_FS
  199. #define RT_USING_POSIX_DEVIO
  200. #define RT_USING_POSIX_STDIO
  201. #define RT_USING_POSIX_POLL
  202. #define RT_USING_POSIX_SELECT
  203. #define RT_USING_POSIX_EPOLL
  204. #define RT_USING_POSIX_SIGNALFD
  205. #define RT_SIGNALFD_MAX_NUM 10
  206. #define RT_USING_POSIX_SOCKET
  207. #define RT_USING_POSIX_TERMIOS
  208. #define RT_USING_POSIX_DELAY
  209. #define RT_USING_POSIX_CLOCK
  210. #define RT_USING_POSIX_TIMER
  211. /* Interprocess Communication (IPC) */
  212. /* Socket is in the 'Network' category */
  213. /* end of Interprocess Communication (IPC) */
  214. /* end of POSIX (Portable Operating System Interface) layer */
  215. /* end of C/C++ and POSIX layer */
  216. /* Network */
  217. #define RT_USING_SAL
  218. #define SAL_INTERNET_CHECK
  219. #define SOCKET_TABLE_STEP_LEN 4
  220. /* Docking with protocol stacks */
  221. #define SAL_USING_LWIP
  222. /* end of Docking with protocol stacks */
  223. #define SAL_USING_POSIX
  224. #define RT_USING_NETDEV
  225. #define NETDEV_USING_IFCONFIG
  226. #define NETDEV_USING_PING
  227. #define NETDEV_USING_NETSTAT
  228. #define NETDEV_USING_AUTO_DEFAULT
  229. #define NETDEV_IPV4 1
  230. #define NETDEV_IPV6 0
  231. #define RT_USING_LWIP
  232. #define RT_USING_LWIP212
  233. #define RT_USING_LWIP_VER_NUM 0x20102
  234. #define RT_LWIP_MEM_ALIGNMENT 8
  235. #define RT_LWIP_IGMP
  236. #define RT_LWIP_ICMP
  237. #define RT_LWIP_DNS
  238. #define RT_LWIP_DHCP
  239. #define IP_SOF_BROADCAST 1
  240. #define IP_SOF_BROADCAST_RECV 1
  241. /* Static IPv4 Address */
  242. #define RT_LWIP_IPADDR "192.168.1.30"
  243. #define RT_LWIP_GWADDR "192.168.1.1"
  244. #define RT_LWIP_MSKADDR "255.255.255.0"
  245. /* end of Static IPv4 Address */
  246. #define RT_LWIP_UDP
  247. #define RT_LWIP_TCP
  248. #define RT_LWIP_RAW
  249. #define RT_MEMP_NUM_NETCONN 8
  250. #define RT_LWIP_PBUF_NUM 16
  251. #define RT_LWIP_RAW_PCB_NUM 4
  252. #define RT_LWIP_UDP_PCB_NUM 4
  253. #define RT_LWIP_TCP_PCB_NUM 4
  254. #define RT_LWIP_TCP_SEG_NUM 40
  255. #define RT_LWIP_TCP_SND_BUF 8196
  256. #define RT_LWIP_TCP_WND 8196
  257. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  258. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  259. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  260. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  261. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  262. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  263. #define LWIP_NETIF_STATUS_CALLBACK 1
  264. #define LWIP_NETIF_LINK_CALLBACK 1
  265. #define RT_LWIP_NETIF_NAMESIZE 6
  266. #define SO_REUSE 1
  267. #define LWIP_SO_RCVTIMEO 1
  268. #define LWIP_SO_SNDTIMEO 1
  269. #define LWIP_SO_RCVBUF 1
  270. #define LWIP_SO_LINGER 0
  271. #define LWIP_NETIF_LOOPBACK 0
  272. #define RT_LWIP_USING_PING
  273. /* end of Network */
  274. /* Memory protection */
  275. /* end of Memory protection */
  276. /* Utilities */
  277. #define RT_USING_RESOURCE_ID
  278. #define RT_USING_ADT
  279. #define RT_USING_ADT_AVL
  280. #define RT_USING_ADT_BITMAP
  281. #define RT_USING_ADT_HASHMAP
  282. #define RT_USING_ADT_REF
  283. /* end of Utilities */
  284. /* Memory management */
  285. #define RT_PAGE_AFFINITY_BLOCK_SIZE 0x1000
  286. #define RT_PAGE_MAX_ORDER 11
  287. /* Debugging */
  288. /* end of Debugging */
  289. /* end of Memory management */
  290. #define RT_USING_LWP
  291. #define LWP_DEBUG
  292. #define LWP_DEBUG_INIT
  293. #define LWP_USING_RUNTIME
  294. #define RT_LWP_MAX_NR 30
  295. #define LWP_TASK_STACK_SIZE 16384
  296. #define RT_CH_MSG_MAX_NR 1024
  297. #define LWP_TID_MAX_NR 64
  298. #define RT_LWP_SHM_MAX_NR 64
  299. #define RT_USING_LDSO
  300. #define LWP_USING_TERMINAL
  301. #define LWP_PTY_MAX_PARIS_LIMIT 64
  302. #define RT_USING_VDSO
  303. /* Using USB legacy version */
  304. /* end of Using USB legacy version */
  305. /* end of RT-Thread Components */
  306. /* RT-Thread Utestcases */
  307. /* end of RT-Thread Utestcases */
  308. /* RT-Thread online packages */
  309. /* IoT - internet of things */
  310. /* Wi-Fi */
  311. /* Marvell WiFi */
  312. /* end of Marvell WiFi */
  313. /* Wiced WiFi */
  314. /* end of Wiced WiFi */
  315. /* CYW43012 WiFi */
  316. /* end of CYW43012 WiFi */
  317. /* BL808 WiFi */
  318. /* end of BL808 WiFi */
  319. /* CYW43439 WiFi */
  320. /* end of CYW43439 WiFi */
  321. /* end of Wi-Fi */
  322. /* IoT Cloud */
  323. /* end of IoT Cloud */
  324. /* end of IoT - internet of things */
  325. /* security packages */
  326. /* end of security packages */
  327. /* language packages */
  328. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  329. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  330. /* XML: Extensible Markup Language */
  331. /* end of XML: Extensible Markup Language */
  332. /* end of language packages */
  333. /* multimedia packages */
  334. /* LVGL: powerful and easy-to-use embedded GUI library */
  335. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  336. /* u8g2: a monochrome graphic library */
  337. /* end of u8g2: a monochrome graphic library */
  338. /* end of multimedia packages */
  339. /* tools packages */
  340. /* end of tools packages */
  341. /* system packages */
  342. /* enhanced kernel services */
  343. /* end of enhanced kernel services */
  344. /* acceleration: Assembly language or algorithmic acceleration packages */
  345. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  346. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  347. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  348. /* Micrium: Micrium software products porting for RT-Thread */
  349. /* end of Micrium: Micrium software products porting for RT-Thread */
  350. /* end of system packages */
  351. /* peripheral libraries and drivers */
  352. /* HAL & SDK Drivers */
  353. /* STM32 HAL & SDK Drivers */
  354. /* end of STM32 HAL & SDK Drivers */
  355. /* Infineon HAL Packages */
  356. /* end of Infineon HAL Packages */
  357. /* Kendryte SDK */
  358. /* end of Kendryte SDK */
  359. /* WCH HAL & SDK Drivers */
  360. /* end of WCH HAL & SDK Drivers */
  361. /* AT32 HAL & SDK Drivers */
  362. /* end of AT32 HAL & SDK Drivers */
  363. /* HC32 DDL Drivers */
  364. /* end of HC32 DDL Drivers */
  365. /* NXP HAL & SDK Drivers */
  366. /* end of NXP HAL & SDK Drivers */
  367. /* NUVOTON Drivers */
  368. /* end of NUVOTON Drivers */
  369. /* GD32 Drivers */
  370. /* end of GD32 Drivers */
  371. /* end of HAL & SDK Drivers */
  372. /* sensors drivers */
  373. /* end of sensors drivers */
  374. /* touch drivers */
  375. /* end of touch drivers */
  376. /* end of peripheral libraries and drivers */
  377. /* AI packages */
  378. /* end of AI packages */
  379. /* Signal Processing and Control Algorithm Packages */
  380. /* end of Signal Processing and Control Algorithm Packages */
  381. /* miscellaneous packages */
  382. /* project laboratory */
  383. /* end of project laboratory */
  384. /* samples: kernel and components samples */
  385. /* end of samples: kernel and components samples */
  386. /* entertainment: terminal games and other interesting software packages */
  387. /* end of entertainment: terminal games and other interesting software packages */
  388. #define PKG_USING_ZLIB
  389. #define PKG_USING_ZLIB_LATEST_VERSION
  390. /* end of miscellaneous packages */
  391. /* Arduino libraries */
  392. /* Projects and Demos */
  393. /* end of Projects and Demos */
  394. /* Sensors */
  395. /* end of Sensors */
  396. /* Display */
  397. /* end of Display */
  398. /* Timing */
  399. /* end of Timing */
  400. /* Data Processing */
  401. /* end of Data Processing */
  402. /* Data Storage */
  403. /* Communication */
  404. /* end of Communication */
  405. /* Device Control */
  406. /* end of Device Control */
  407. /* Other */
  408. /* end of Other */
  409. /* Signal IO */
  410. /* end of Signal IO */
  411. /* Uncategorized */
  412. /* end of Arduino libraries */
  413. /* end of RT-Thread online packages */
  414. /* Drivers Configuration */
  415. #define BSP_USING_UART
  416. #define BSP_UART_USING_DMA
  417. #define BSP_USING_UART0
  418. #define BSP_USING_HARDLOCK
  419. #define BSP_USING_SDIO
  420. #define BSP_USING_SDIO0
  421. #define BSP_SD_MNT_DEVNAME "sd0p1"
  422. /* end of Drivers Configuration */
  423. #define BOARD_C908
  424. #define __STACKSIZE__ 65536
  425. #define BSP_ROOTFS_TYPE_ELMFAT
  426. #define BSP_RISCV_FPU_D
  427. #endif