rtconfig.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. #ifndef RT_CONFIG_H__
  2. #define RT_CONFIG_H__
  3. /* RT-Thread Kernel */
  4. #define RT_NAME_MAX 8
  5. #define RT_USING_SMART
  6. #define RT_USING_SMP
  7. #define RT_CPUS_NR 4
  8. #define RT_ALIGN_SIZE 8
  9. #define RT_THREAD_PRIORITY_32
  10. #define RT_THREAD_PRIORITY_MAX 32
  11. #define RT_TICK_PER_SECOND 1000
  12. #define RT_USING_HOOK
  13. #define RT_HOOK_USING_FUNC_PTR
  14. #define RT_USING_HOOKLIST
  15. #define RT_USING_IDLE_HOOK
  16. #define RT_IDLE_HOOK_LIST_SIZE 4
  17. #define IDLE_THREAD_STACK_SIZE 16384
  18. #define SYSTEM_THREAD_STACK_SIZE 16384
  19. #define RT_USING_TIMER_SOFT
  20. #define RT_TIMER_THREAD_PRIO 4
  21. #define RT_TIMER_THREAD_STACK_SIZE 32768
  22. #define RT_USING_TIMER_ALL_SOFT
  23. #define RT_USING_CPU_USAGE_TRACER
  24. /* kservice optimization */
  25. /* end of kservice optimization */
  26. /* klibc optimization */
  27. #define RT_KLIBC_USING_VSNPRINTF_LONGLONG
  28. /* end of klibc optimization */
  29. #define RT_USING_DEBUG
  30. #define RT_DEBUGING_COLOR
  31. /* Inter-Thread communication */
  32. #define RT_USING_SEMAPHORE
  33. #define RT_USING_MUTEX
  34. #define RT_USING_EVENT
  35. #define RT_USING_MAILBOX
  36. #define RT_USING_MESSAGEQUEUE
  37. #define RT_USING_MESSAGEQUEUE_PRIORITY
  38. /* end of Inter-Thread communication */
  39. /* Memory Management */
  40. #define RT_PAGE_MAX_ORDER 11
  41. #define RT_USING_SLAB
  42. #define RT_USING_MEMHEAP
  43. #define RT_MEMHEAP_FAST_MODE
  44. #define RT_USING_MEMHEAP_AS_HEAP
  45. #define RT_USING_MEMHEAP_AUTO_BINDING
  46. #define RT_USING_HEAP
  47. /* end of Memory Management */
  48. #define RT_USING_DEVICE
  49. #define RT_USING_DEVICE_OPS
  50. #define RT_USING_THREADSAFE_PRINTF
  51. #define RT_USING_CONSOLE
  52. #define RT_CONSOLEBUF_SIZE 1024
  53. #define RT_CONSOLE_DEVICE_NAME "uart2"
  54. #define RT_VER_NUM 0x50200
  55. #define RT_USING_STDC_ATOMIC
  56. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  57. /* end of RT-Thread Kernel */
  58. /* AArch64 Architecture Configuration */
  59. #define ARCH_TEXT_OFFSET 0x00480000
  60. #define ARCH_RAM_OFFSET 0x200000
  61. #define ARCH_SECONDARY_CPU_STACK_SIZE 16384
  62. #define ARCH_HAVE_EFFICIENT_UNALIGNED_ACCESS
  63. #define ARCH_USING_GENERIC_CPUID
  64. #define ARCH_HEAP_SIZE 0x4000000
  65. #define ARCH_INIT_PAGE_SIZE 0x200000
  66. /* end of AArch64 Architecture Configuration */
  67. #define ARCH_CPU_64BIT
  68. #define RT_USING_CACHE
  69. #define ARCH_ARM_BOOTWITH_FLUSH_CACHE
  70. #define RT_USING_CPU_FFS
  71. #define ARCH_MM_MMU
  72. #define ARCH_ARM
  73. #define ARCH_ARM_MMU
  74. #define KERNEL_VADDR_START 0xffff000000000000
  75. #define ARCH_ARMV8
  76. #define ARCH_USING_HW_THREAD_SELF
  77. #define ARCH_USING_IRQ_CTX_LIST
  78. /* RT-Thread Components */
  79. #define RT_USING_COMPONENTS_INIT
  80. #define RT_USING_USER_MAIN
  81. #define RT_MAIN_THREAD_STACK_SIZE 16384
  82. #define RT_MAIN_THREAD_PRIORITY 10
  83. #define RT_USING_MSH
  84. #define RT_USING_FINSH
  85. #define FINSH_USING_MSH
  86. #define FINSH_THREAD_NAME "tshell"
  87. #define FINSH_THREAD_PRIORITY 20
  88. #define FINSH_THREAD_STACK_SIZE 16384
  89. #define FINSH_USING_HISTORY
  90. #define FINSH_HISTORY_LINES 5
  91. #define FINSH_USING_SYMTAB
  92. #define FINSH_CMD_SIZE 80
  93. #define MSH_USING_BUILT_IN_COMMANDS
  94. #define FINSH_USING_DESCRIPTION
  95. #define FINSH_ARG_MAX 10
  96. #define FINSH_USING_OPTION_COMPLETION
  97. /* DFS: device virtual file system */
  98. #define RT_USING_DFS
  99. #define DFS_USING_POSIX
  100. #define DFS_USING_WORKDIR
  101. #define DFS_FD_MAX 512
  102. #define RT_USING_DFS_V2
  103. #define RT_USING_DFS_DEVFS
  104. #define RT_USING_DFS_PTYFS
  105. #define RT_USING_DFS_CROMFS
  106. #define RT_USING_DFS_TMPFS
  107. #define RT_USING_DFS_MQUEUE
  108. #define RT_USING_PAGECACHE
  109. /* page cache config */
  110. #define RT_PAGECACHE_COUNT 128
  111. #define RT_PAGECACHE_ASPACE_COUNT 32
  112. #define RT_PAGECACHE_PRELOAD 4
  113. #define RT_PAGECACHE_HASH_NR 180
  114. #define RT_PAGECACHE_GC_WORK_LEVEL 90
  115. #define RT_PAGECACHE_GC_STOP_LEVEL 70
  116. /* end of page cache config */
  117. /* end of DFS: device virtual file system */
  118. /* Device Drivers */
  119. #define RT_USING_DM
  120. #define RT_USING_DEV_BUS
  121. #define RT_USING_DEVICE_IPC
  122. #define RT_UNAMED_PIPE_NUMBER 64
  123. #define RT_USING_SYSTEM_WORKQUEUE
  124. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 16384
  125. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  126. #define RT_USING_SERIAL
  127. #define RT_USING_SERIAL_V1
  128. #define RT_SERIAL_RB_BUFSZ 64
  129. #define RT_USING_NULL
  130. #define RT_USING_ZERO
  131. #define RT_USING_RANDOM
  132. #define RT_USING_RTC
  133. #define RT_USING_SOFT_RTC
  134. #define RT_USING_SDIO
  135. #define RT_SDIO_STACK_SIZE 16384
  136. #define RT_SDIO_THREAD_PRIORITY 15
  137. #define RT_MMCSD_STACK_SIZE 16384
  138. #define RT_MMCSD_THREAD_PRIORITY 22
  139. #define RT_MMCSD_MAX_PARTITION 16
  140. #define RT_USING_OFW
  141. #define RT_FDT_EARLYCON_MSG_SIZE 128
  142. #define RT_USING_OFW_BUS_RANGES_NUMBER 8
  143. #define RT_USING_PIC
  144. #define MAX_HANDLERS 1024
  145. #define RT_PIC_ARM_GIC_V3
  146. #define RT_USING_PIN
  147. #define RT_USING_PINCTRL
  148. #define RT_USING_KTIME
  149. #define RT_USING_CLK
  150. #define RT_USING_HWTIMER
  151. #define RT_HWTIMER_ARM_ARCH
  152. /* end of Device Drivers */
  153. /* C/C++ and POSIX layer */
  154. /* ISO-ANSI C layer */
  155. /* Timezone and Daylight Saving Time */
  156. #define RT_LIBC_USING_LIGHT_TZ_DST
  157. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  158. #define RT_LIBC_TZ_DEFAULT_MIN 0
  159. #define RT_LIBC_TZ_DEFAULT_SEC 0
  160. /* end of Timezone and Daylight Saving Time */
  161. /* end of ISO-ANSI C layer */
  162. /* POSIX (Portable Operating System Interface) layer */
  163. #define RT_USING_POSIX_FS
  164. #define RT_USING_POSIX_DEVIO
  165. #define RT_USING_POSIX_STDIO
  166. #define RT_USING_POSIX_POLL
  167. #define RT_USING_POSIX_SELECT
  168. #define RT_USING_POSIX_EVENTFD
  169. #define RT_USING_POSIX_EPOLL
  170. #define RT_USING_POSIX_SIGNALFD
  171. #define RT_SIGNALFD_MAX_NUM 10
  172. #define RT_USING_POSIX_TIMERFD
  173. #define RT_USING_POSIX_SOCKET
  174. #define RT_USING_POSIX_TERMIOS
  175. #define RT_USING_POSIX_MMAN
  176. #define RT_USING_POSIX_DELAY
  177. #define RT_USING_POSIX_CLOCK
  178. #define RT_USING_POSIX_TIMER
  179. /* Interprocess Communication (IPC) */
  180. #define RT_USING_POSIX_PIPE
  181. #define RT_USING_POSIX_PIPE_SIZE 2048
  182. #define RT_USING_POSIX_MESSAGE_QUEUE
  183. /* Socket is in the 'Network' category */
  184. /* end of Interprocess Communication (IPC) */
  185. /* end of POSIX (Portable Operating System Interface) layer */
  186. /* end of C/C++ and POSIX layer */
  187. /* Network */
  188. #define RT_USING_SAL
  189. #define SAL_INTERNET_CHECK
  190. /* Docking with protocol stacks */
  191. #define SAL_USING_LWIP
  192. /* end of Docking with protocol stacks */
  193. #define SAL_USING_POSIX
  194. #define RT_USING_NETDEV
  195. #define NETDEV_USING_IFCONFIG
  196. #define NETDEV_USING_PING
  197. #define NETDEV_USING_NETSTAT
  198. #define NETDEV_USING_AUTO_DEFAULT
  199. #define NETDEV_IPV4 1
  200. #define NETDEV_IPV6 0
  201. #define RT_USING_LWIP
  202. #define RT_USING_LWIP212
  203. #define RT_USING_LWIP_VER_NUM 0x20102
  204. #define RT_LWIP_MEM_ALIGNMENT 8
  205. #define RT_LWIP_IGMP
  206. #define RT_LWIP_ICMP
  207. #define RT_LWIP_DNS
  208. #define RT_LWIP_DHCP
  209. #define IP_SOF_BROADCAST 1
  210. #define IP_SOF_BROADCAST_RECV 1
  211. /* Static IPv4 Address */
  212. #define RT_LWIP_IPADDR "192.168.1.30"
  213. #define RT_LWIP_GWADDR "192.168.1.1"
  214. #define RT_LWIP_MSKADDR "255.255.255.0"
  215. /* end of Static IPv4 Address */
  216. #define RT_LWIP_UDP
  217. #define RT_LWIP_TCP
  218. #define RT_LWIP_RAW
  219. #define RT_MEMP_NUM_NETCONN 64
  220. #define RT_LWIP_PBUF_NUM 320
  221. #define RT_LWIP_RAW_PCB_NUM 32
  222. #define RT_LWIP_UDP_PCB_NUM 32
  223. #define RT_LWIP_TCP_PCB_NUM 64
  224. #define RT_LWIP_TCP_SEG_NUM 480
  225. #define RT_LWIP_TCP_SND_BUF 65535
  226. #define RT_LWIP_TCP_WND 49512
  227. #define RT_LWIP_TCPTHREAD_PRIORITY 8
  228. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 256
  229. #define RT_LWIP_TCPTHREAD_STACKSIZE 65536
  230. #define LWIP_NO_TX_THREAD
  231. #define RT_LWIP_ETHTHREAD_PRIORITY 9
  232. #define RT_LWIP_ETHTHREAD_STACKSIZE 16384
  233. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 256
  234. #define LWIP_NETIF_STATUS_CALLBACK 1
  235. #define LWIP_NETIF_LINK_CALLBACK 1
  236. #define RT_LWIP_NETIF_NAMESIZE 6
  237. #define SO_REUSE 1
  238. #define LWIP_SO_RCVTIMEO 1
  239. #define LWIP_SO_SNDTIMEO 1
  240. #define LWIP_SO_RCVBUF 1
  241. #define LWIP_SO_LINGER 0
  242. #define RT_LWIP_NETIF_LOOPBACK
  243. #define LWIP_NETIF_LOOPBACK 1
  244. #define RT_LWIP_USING_HW_CHECKSUM
  245. #define RT_LWIP_USING_PING
  246. /* end of Network */
  247. /* Memory protection */
  248. /* end of Memory protection */
  249. /* Utilities */
  250. #define RT_USING_UTEST
  251. #define UTEST_THR_STACK_SIZE 32768
  252. #define UTEST_THR_PRIORITY 20
  253. #define RT_USING_RESOURCE_ID
  254. #define RT_USING_ADT
  255. #define RT_USING_ADT_AVL
  256. #define RT_USING_ADT_BITMAP
  257. #define RT_USING_ADT_HASHMAP
  258. #define RT_USING_ADT_REF
  259. /* end of Utilities */
  260. #define RT_USING_LWP
  261. #define LWP_DEBUG
  262. #define LWP_DEBUG_INIT
  263. #define RT_LWP_MAX_NR 128
  264. #define LWP_TASK_STACK_SIZE 32768
  265. #define RT_CH_MSG_MAX_NR 1024
  266. #define LWP_TID_MAX_NR 128
  267. #define RT_LWP_SHM_MAX_NR 64
  268. #define RT_USING_LDSO
  269. #define LWP_USING_TERMINAL
  270. #define LWP_PTY_MAX_PARIS_LIMIT 64
  271. #define RT_USING_VDSO
  272. /* Memory management */
  273. #define RT_USING_MEMBLOCK
  274. #define RT_INIT_MEMORY_REGIONS 128
  275. /* end of Memory management */
  276. /* Using USB legacy version */
  277. /* end of Using USB legacy version */
  278. /* end of RT-Thread Components */
  279. /* RT-Thread Utestcases */
  280. #define RT_USING_UTESTCASES
  281. /* Utest Self Testcase */
  282. /* end of Utest Self Testcase */
  283. /* Kernel Testcase */
  284. /* Kernel SMP Testcase */
  285. /* end of Kernel SMP Testcase */
  286. /* end of Kernel Testcase */
  287. /* CPP11 Testcase */
  288. /* end of CPP11 Testcase */
  289. /* Utest Serial Testcase */
  290. /* end of Utest Serial Testcase */
  291. /* Utest IPC Testcase */
  292. /* end of Utest IPC Testcase */
  293. /* RTT Posix Testcase */
  294. /* end of RTT Posix Testcase */
  295. /* Memory Management Subsytem Testcase */
  296. /* end of Memory Management Subsytem Testcase */
  297. /* Tmpfs Testcase */
  298. /* end of Tmpfs Testcase */
  299. /* SMP-Call Testcase */
  300. #define UTEST_SMP_CALL_FUNC
  301. /* end of SMP-Call Testcase */
  302. /* end of RT-Thread Utestcases */
  303. /* RT-Thread online packages */
  304. /* IoT - internet of things */
  305. /* Wi-Fi */
  306. /* Marvell WiFi */
  307. /* end of Marvell WiFi */
  308. /* Wiced WiFi */
  309. /* end of Wiced WiFi */
  310. /* CYW43012 WiFi */
  311. /* end of CYW43012 WiFi */
  312. /* BL808 WiFi */
  313. /* end of BL808 WiFi */
  314. /* CYW43439 WiFi */
  315. /* end of CYW43439 WiFi */
  316. /* end of Wi-Fi */
  317. /* IoT Cloud */
  318. /* end of IoT Cloud */
  319. /* end of IoT - internet of things */
  320. /* security packages */
  321. /* end of security packages */
  322. /* language packages */
  323. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  324. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  325. /* XML: Extensible Markup Language */
  326. /* end of XML: Extensible Markup Language */
  327. /* end of language packages */
  328. /* multimedia packages */
  329. /* LVGL: powerful and easy-to-use embedded GUI library */
  330. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  331. /* u8g2: a monochrome graphic library */
  332. /* end of u8g2: a monochrome graphic library */
  333. /* end of multimedia packages */
  334. /* tools packages */
  335. /* end of tools packages */
  336. /* system packages */
  337. /* enhanced kernel services */
  338. /* end of enhanced kernel services */
  339. /* acceleration: Assembly language or algorithmic acceleration packages */
  340. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  341. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  342. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  343. /* Micrium: Micrium software products porting for RT-Thread */
  344. /* end of Micrium: Micrium software products porting for RT-Thread */
  345. /* end of system packages */
  346. /* peripheral libraries and drivers */
  347. /* HAL & SDK Drivers */
  348. /* STM32 HAL & SDK Drivers */
  349. /* end of STM32 HAL & SDK Drivers */
  350. /* Kendryte SDK */
  351. /* end of Kendryte SDK */
  352. /* end of HAL & SDK Drivers */
  353. /* sensors drivers */
  354. /* end of sensors drivers */
  355. /* touch drivers */
  356. /* end of touch drivers */
  357. /* end of peripheral libraries and drivers */
  358. /* AI packages */
  359. /* end of AI packages */
  360. /* Signal Processing and Control Algorithm Packages */
  361. /* end of Signal Processing and Control Algorithm Packages */
  362. /* miscellaneous packages */
  363. /* project laboratory */
  364. /* end of project laboratory */
  365. /* samples: kernel and components samples */
  366. /* end of samples: kernel and components samples */
  367. /* entertainment: terminal games and other interesting software packages */
  368. /* end of entertainment: terminal games and other interesting software packages */
  369. #define PKG_USING_ZLIB
  370. #define PKG_USING_ZLIB_LATEST_VERSION
  371. /* end of miscellaneous packages */
  372. /* Arduino libraries */
  373. /* Projects and Demos */
  374. /* end of Projects and Demos */
  375. /* Sensors */
  376. /* end of Sensors */
  377. /* Display */
  378. /* end of Display */
  379. /* Timing */
  380. /* end of Timing */
  381. /* Data Processing */
  382. /* end of Data Processing */
  383. /* Data Storage */
  384. /* Communication */
  385. /* end of Communication */
  386. /* Device Control */
  387. /* end of Device Control */
  388. /* Other */
  389. /* end of Other */
  390. /* Signal IO */
  391. /* end of Signal IO */
  392. /* Uncategorized */
  393. /* end of Arduino libraries */
  394. /* end of RT-Thread online packages */
  395. /* Privated Packages of RealThread */
  396. /* Network Utilities */
  397. /* end of Network Utilities */
  398. /* RT-Thread Smart */
  399. /* end of RT-Thread Smart */
  400. /* end of Privated Packages of RealThread */
  401. /* RT-Thread rockchip RK3500 drivers */
  402. #define RT_CLK_ROCKCHIP
  403. #define RT_CLK_ROCKCHIP_RK3568
  404. #define RT_CLK_ROCKCHIP_RK3588
  405. #define RT_SERIAL_8250
  406. #define RT_USING_RESET
  407. #define RT_HWTIMER_ROCKCHIP
  408. /* end of RT-Thread rockchip RK3500 drivers */
  409. #define SOC_RK3568
  410. #endif