rtconfig.h 14 KB

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