rtconfig.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  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_CPUS_NR 1
  7. #define RT_ALIGN_SIZE 4
  8. #define RT_THREAD_PRIORITY_32
  9. #define RT_THREAD_PRIORITY_MAX 32
  10. #define RT_TICK_PER_SECOND 1000
  11. #define RT_USING_OVERFLOW_CHECK
  12. #define RT_USING_HOOK
  13. #define RT_HOOK_USING_FUNC_PTR
  14. #define RT_USING_IDLE_HOOK
  15. #define RT_IDLE_HOOK_LIST_SIZE 4
  16. #define IDLE_THREAD_STACK_SIZE 8192
  17. #define RT_USING_TIMER_SOFT
  18. #define RT_TIMER_THREAD_PRIO 4
  19. #define RT_TIMER_THREAD_STACK_SIZE 4096
  20. /* kservice optimization */
  21. #define RT_KSERVICE_USING_STDLIB
  22. /* end of kservice optimization */
  23. #define RT_USING_DEBUG
  24. #define RT_DEBUGING_COLOR
  25. #define RT_DEBUGING_CONTEXT
  26. /* Inter-Thread communication */
  27. #define RT_USING_SEMAPHORE
  28. #define RT_USING_MUTEX
  29. #define RT_USING_EVENT
  30. #define RT_USING_MAILBOX
  31. #define RT_USING_MESSAGEQUEUE
  32. #define RT_USING_SIGNALS
  33. /* end of Inter-Thread communication */
  34. /* Memory Management */
  35. #define RT_PAGE_MAX_ORDER 11
  36. #define RT_USING_MEMPOOL
  37. #define RT_USING_SMALL_MEM
  38. #define RT_USING_MEMHEAP
  39. #define RT_MEMHEAP_FAST_MODE
  40. #define RT_USING_SMALL_MEM_AS_HEAP
  41. #define RT_USING_MEMTRACE
  42. #define RT_USING_HEAP
  43. /* end of Memory Management */
  44. #define RT_USING_DEVICE
  45. #define RT_USING_DEVICE_OPS
  46. #define RT_USING_INTERRUPT_INFO
  47. #define RT_USING_CONSOLE
  48. #define RT_CONSOLEBUF_SIZE 256
  49. #define RT_CONSOLE_DEVICE_NAME "uart0"
  50. #define RT_VER_NUM 0x50200
  51. #define RT_USING_STDC_ATOMIC
  52. #define RT_BACKTRACE_LEVEL_MAX_NR 32
  53. /* end of RT-Thread Kernel */
  54. #define RT_USING_CACHE
  55. #define RT_USING_HW_ATOMIC
  56. #define RT_USING_CPU_FFS
  57. #define ARCH_MM_MMU
  58. #define ARCH_ARM
  59. #define ARCH_ARM_MMU
  60. #define KERNEL_VADDR_START 0xc0000000
  61. #define ARCH_ARM_CORTEX_A
  62. #define RT_USING_GIC_V2
  63. #define ARCH_ARM_CORTEX_A7
  64. #define ARCH_ARM_SECURE_MODE
  65. #define RT_BACKTRACE_FUNCTION_NAME
  66. /* RT-Thread Components */
  67. #define RT_USING_COMPONENTS_INIT
  68. #define RT_USING_USER_MAIN
  69. #define RT_MAIN_THREAD_STACK_SIZE 4096
  70. #define RT_MAIN_THREAD_PRIORITY 10
  71. #define RT_USING_MSH
  72. #define RT_USING_FINSH
  73. #define FINSH_USING_MSH
  74. #define FINSH_THREAD_NAME "tshell"
  75. #define FINSH_THREAD_PRIORITY 20
  76. #define FINSH_THREAD_STACK_SIZE 4096
  77. #define FINSH_USING_HISTORY
  78. #define FINSH_HISTORY_LINES 5
  79. #define FINSH_USING_SYMTAB
  80. #define FINSH_CMD_SIZE 80
  81. #define MSH_USING_BUILT_IN_COMMANDS
  82. #define FINSH_USING_DESCRIPTION
  83. #define FINSH_ARG_MAX 10
  84. #define FINSH_USING_OPTION_COMPLETION
  85. /* DFS: device virtual file system */
  86. #define RT_USING_DFS
  87. #define DFS_USING_POSIX
  88. #define DFS_USING_WORKDIR
  89. #define DFS_FD_MAX 32
  90. #define RT_USING_DFS_V2
  91. #define RT_USING_DFS_ELMFAT
  92. /* elm-chan's FatFs, Generic FAT Filesystem Module */
  93. #define RT_DFS_ELM_CODE_PAGE 437
  94. #define RT_DFS_ELM_WORD_ACCESS
  95. #define RT_DFS_ELM_USE_LFN_3
  96. #define RT_DFS_ELM_USE_LFN 3
  97. #define RT_DFS_ELM_LFN_UNICODE_0
  98. #define RT_DFS_ELM_LFN_UNICODE 0
  99. #define RT_DFS_ELM_MAX_LFN 255
  100. #define RT_DFS_ELM_DRIVES 2
  101. #define RT_DFS_ELM_MAX_SECTOR_SIZE 512
  102. #define RT_DFS_ELM_REENTRANT
  103. #define RT_DFS_ELM_MUTEX_TIMEOUT 3000
  104. /* end of elm-chan's FatFs, Generic FAT Filesystem Module */
  105. #define RT_USING_DFS_DEVFS
  106. #define RT_USING_DFS_ROMFS
  107. #define RT_USING_DFS_PTYFS
  108. #define RT_USING_DFS_TMPFS
  109. #define RT_USING_PAGECACHE
  110. /* page cache config */
  111. #define RT_PAGECACHE_COUNT 4096
  112. #define RT_PAGECACHE_ASPACE_COUNT 1024
  113. #define RT_PAGECACHE_PRELOAD 4
  114. #define RT_PAGECACHE_HASH_NR 1024
  115. #define RT_PAGECACHE_GC_WORK_LEVEL 90
  116. #define RT_PAGECACHE_GC_STOP_LEVEL 70
  117. /* end of page cache config */
  118. /* end of DFS: device virtual file system */
  119. /* Device Drivers */
  120. #define RT_USING_DEVICE_IPC
  121. #define RT_UNAMED_PIPE_NUMBER 64
  122. #define RT_USING_SYSTEM_WORKQUEUE
  123. #define RT_SYSTEM_WORKQUEUE_STACKSIZE 4096
  124. #define RT_SYSTEM_WORKQUEUE_PRIORITY 23
  125. #define RT_USING_SERIAL
  126. #define RT_USING_SERIAL_V1
  127. #define RT_SERIAL_RB_BUFSZ 64
  128. #define RT_USING_CPUTIME
  129. #define CPUTIME_TIMER_FREQ 0
  130. #define RT_USING_I2C
  131. #define RT_USING_NULL
  132. #define RT_USING_ZERO
  133. #define RT_USING_RANDOM
  134. #define RT_USING_PWM
  135. #define RT_USING_RTC
  136. #define RT_USING_SDIO
  137. #define RT_SDIO_STACK_SIZE 4096
  138. #define RT_SDIO_THREAD_PRIORITY 15
  139. #define RT_MMCSD_STACK_SIZE 4096
  140. #define RT_MMCSD_THREAD_PREORITY 22
  141. #define RT_MMCSD_MAX_PARTITION 16
  142. #define RT_USING_SPI
  143. #define RT_USING_WDT
  144. #define RT_USING_TOUCH
  145. #define RT_TOUCH_PIN_IRQ
  146. #define RT_USING_LCD
  147. #define RT_USING_DEV_BUS
  148. #define RT_USING_WIFI
  149. #define RT_WLAN_DEVICE_STA_NAME "wlan0"
  150. #define RT_WLAN_DEVICE_AP_NAME "wlan1"
  151. #define RT_WLAN_SSID_MAX_LENGTH 32
  152. #define RT_WLAN_PASSWORD_MAX_LENGTH 32
  153. #define RT_WLAN_DEV_EVENT_NUM 2
  154. #define RT_WLAN_MANAGE_ENABLE
  155. #define RT_WLAN_SCAN_WAIT_MS 10000
  156. #define RT_WLAN_CONNECT_WAIT_MS 10000
  157. #define RT_WLAN_SCAN_SORT
  158. #define RT_WLAN_MSH_CMD_ENABLE
  159. #define RT_WLAN_JOIN_SCAN_BY_MGNT
  160. #define RT_WLAN_AUTO_CONNECT_ENABLE
  161. #define AUTO_CONNECTION_PERIOD_MS 2000
  162. #define RT_WLAN_CFG_ENABLE
  163. #define RT_WLAN_CFG_INFO_MAX 3
  164. #define RT_WLAN_PROT_ENABLE
  165. #define RT_WLAN_PROT_NAME_LEN 8
  166. #define RT_WLAN_PROT_MAX 2
  167. #define RT_WLAN_DEFAULT_PROT "lwip"
  168. #define RT_WLAN_PROT_LWIP_ENABLE
  169. #define RT_WLAN_PROT_LWIP_NAME "lwip"
  170. #define RT_WLAN_WORK_THREAD_ENABLE
  171. #define RT_WLAN_WORKQUEUE_THREAD_NAME "wlan"
  172. #define RT_WLAN_WORKQUEUE_THREAD_SIZE 2048
  173. #define RT_WLAN_WORKQUEUE_THREAD_PRIO 15
  174. #define RT_USING_PIN
  175. #define RT_USING_KTIME
  176. /* Using USB */
  177. #define RT_USING_USB
  178. #define RT_USING_USB_DEVICE
  179. #define RT_USBD_THREAD_STACK_SZ 4096
  180. #define USB_VENDOR_ID 0x0FFE
  181. #define USB_PRODUCT_ID 0x0001
  182. #define _RT_USB_DEVICE_WINUSB
  183. #define RT_USB_DEVICE_WINUSB
  184. #define RT_WINUSB_GUID "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  185. /* end of Using USB */
  186. /* end of Device Drivers */
  187. /* C/C++ and POSIX layer */
  188. /* ISO-ANSI C layer */
  189. /* Timezone and Daylight Saving Time */
  190. #define RT_LIBC_USING_LIGHT_TZ_DST
  191. #define RT_LIBC_TZ_DEFAULT_HOUR 8
  192. #define RT_LIBC_TZ_DEFAULT_MIN 0
  193. #define RT_LIBC_TZ_DEFAULT_SEC 0
  194. /* end of Timezone and Daylight Saving Time */
  195. /* end of ISO-ANSI C layer */
  196. /* POSIX (Portable Operating System Interface) layer */
  197. #define RT_USING_POSIX_FS
  198. #define RT_USING_POSIX_DEVIO
  199. #define RT_USING_POSIX_STDIO
  200. #define RT_USING_POSIX_TERMIOS
  201. #define RT_USING_POSIX_DELAY
  202. #define RT_USING_POSIX_CLOCK
  203. #define RT_USING_POSIX_TIMER
  204. /* Interprocess Communication (IPC) */
  205. /* Socket is in the 'Network' category */
  206. /* end of Interprocess Communication (IPC) */
  207. /* end of POSIX (Portable Operating System Interface) layer */
  208. /* end of C/C++ and POSIX layer */
  209. /* Network */
  210. #define RT_USING_SAL
  211. #define SAL_INTERNET_CHECK
  212. /* Docking with protocol stacks */
  213. #define SAL_USING_LWIP
  214. /* end of Docking with protocol stacks */
  215. #define SAL_USING_POSIX
  216. #define RT_USING_NETDEV
  217. #define NETDEV_USING_IFCONFIG
  218. #define NETDEV_USING_PING
  219. #define NETDEV_USING_NETSTAT
  220. #define NETDEV_USING_AUTO_DEFAULT
  221. #define NETDEV_USING_IPV6
  222. #define NETDEV_IPV4 1
  223. #define NETDEV_IPV6 1
  224. #define NETDEV_IPV6_SCOPES
  225. #define RT_USING_LWIP
  226. #define RT_USING_LWIP212
  227. #define RT_USING_LWIP_VER_NUM 0x20102
  228. #define RT_USING_LWIP_IPV6
  229. #define RT_LWIP_MEM_ALIGNMENT 4
  230. #define RT_LWIP_IGMP
  231. #define RT_LWIP_ICMP
  232. #define RT_LWIP_DNS
  233. #define RT_LWIP_DHCP
  234. #define IP_SOF_BROADCAST 1
  235. #define IP_SOF_BROADCAST_RECV 1
  236. /* Static IPv4 Address */
  237. #define RT_LWIP_IPADDR "192.168.1.30"
  238. #define RT_LWIP_GWADDR "192.168.1.1"
  239. #define RT_LWIP_MSKADDR "255.255.255.0"
  240. /* end of Static IPv4 Address */
  241. #define RT_LWIP_UDP
  242. #define RT_LWIP_TCP
  243. #define RT_LWIP_RAW
  244. #define RT_MEMP_NUM_NETCONN 8
  245. #define RT_LWIP_PBUF_NUM 16
  246. #define RT_LWIP_RAW_PCB_NUM 4
  247. #define RT_LWIP_UDP_PCB_NUM 4
  248. #define RT_LWIP_TCP_PCB_NUM 4
  249. #define RT_LWIP_TCP_SEG_NUM 40
  250. #define RT_LWIP_TCP_SND_BUF 8196
  251. #define RT_LWIP_TCP_WND 8196
  252. #define RT_LWIP_TCPTHREAD_PRIORITY 10
  253. #define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
  254. #define RT_LWIP_TCPTHREAD_STACKSIZE 8192
  255. #define LWIP_NO_TX_THREAD
  256. #define RT_LWIP_ETHTHREAD_PRIORITY 12
  257. #define RT_LWIP_ETHTHREAD_STACKSIZE 8192
  258. #define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
  259. #define LWIP_NETIF_STATUS_CALLBACK 1
  260. #define LWIP_NETIF_LINK_CALLBACK 1
  261. #define RT_LWIP_NETIF_NAMESIZE 6
  262. #define SO_REUSE 1
  263. #define LWIP_SO_RCVTIMEO 1
  264. #define LWIP_SO_SNDTIMEO 1
  265. #define LWIP_SO_RCVBUF 1
  266. #define LWIP_SO_LINGER 0
  267. #define RT_LWIP_NETIF_LOOPBACK
  268. #define LWIP_NETIF_LOOPBACK 1
  269. #define RT_LWIP_USING_PING
  270. /* end of Network */
  271. /* Memory protection */
  272. /* end of Memory protection */
  273. /* Utilities */
  274. #define RT_USING_ULOG
  275. #define ULOG_OUTPUT_LVL_D
  276. #define ULOG_OUTPUT_LVL 7
  277. #define ULOG_ASSERT_ENABLE
  278. #define ULOG_LINE_BUF_SIZE 128
  279. /* log format */
  280. #define ULOG_USING_COLOR
  281. #define ULOG_OUTPUT_TIME
  282. #define ULOG_OUTPUT_LEVEL
  283. #define ULOG_OUTPUT_TAG
  284. /* end of log format */
  285. #define ULOG_BACKEND_USING_CONSOLE
  286. #define RT_USING_RESOURCE_ID
  287. #define RT_USING_ADT
  288. #define RT_USING_ADT_AVL
  289. #define RT_USING_ADT_BITMAP
  290. #define RT_USING_ADT_HASHMAP
  291. #define RT_USING_ADT_REF
  292. /* end of Utilities */
  293. #define RT_USING_LWP
  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_CONSOLE_INPUT_BUFFER_SIZE 1024
  298. #define LWP_TID_MAX_NR 64
  299. #define LWP_ENABLE_ASID
  300. #define RT_LWP_SHM_MAX_NR 64
  301. #define RT_USING_LDSO
  302. #define LWP_USING_TERMINAL
  303. #define LWP_PTY_MAX_PARIS_LIMIT 64
  304. /* Memory management */
  305. /* end of Memory management */
  306. /* end of RT-Thread Components */
  307. /* RT-Thread Utestcases */
  308. /* end of RT-Thread Utestcases */
  309. /* RT-Thread online packages */
  310. /* IoT - internet of things */
  311. /* Wi-Fi */
  312. /* Marvell WiFi */
  313. /* end of Marvell WiFi */
  314. /* Wiced WiFi */
  315. /* end of Wiced WiFi */
  316. #define PKG_USING_RW007
  317. #define PKG_USING_RW007_LATEST_VERSION
  318. #define RW007_NOT_USE_EXAMPLE_DRIVERS
  319. #define RW007_SPI_MAX_HZ 30000000
  320. /* CYW43012 WiFi */
  321. /* end of CYW43012 WiFi */
  322. /* BL808 WiFi */
  323. /* end of BL808 WiFi */
  324. /* CYW43439 WiFi */
  325. /* end of CYW43439 WiFi */
  326. /* end of Wi-Fi */
  327. /* IoT Cloud */
  328. /* end of IoT Cloud */
  329. /* end of IoT - internet of things */
  330. /* security packages */
  331. /* end of security packages */
  332. /* language packages */
  333. /* JSON: JavaScript Object Notation, a lightweight data-interchange format */
  334. /* end of JSON: JavaScript Object Notation, a lightweight data-interchange format */
  335. /* XML: Extensible Markup Language */
  336. /* end of XML: Extensible Markup Language */
  337. /* end of language packages */
  338. /* multimedia packages */
  339. /* LVGL: powerful and easy-to-use embedded GUI library */
  340. /* end of LVGL: powerful and easy-to-use embedded GUI library */
  341. /* u8g2: a monochrome graphic library */
  342. /* end of u8g2: a monochrome graphic library */
  343. /* end of multimedia packages */
  344. /* tools packages */
  345. /* end of tools packages */
  346. /* system packages */
  347. /* enhanced kernel services */
  348. /* end of enhanced kernel services */
  349. /* acceleration: Assembly language or algorithmic acceleration packages */
  350. /* end of acceleration: Assembly language or algorithmic acceleration packages */
  351. /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  352. /* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
  353. /* Micrium: Micrium software products porting for RT-Thread */
  354. /* end of Micrium: Micrium software products porting for RT-Thread */
  355. /* end of system packages */
  356. /* peripheral libraries and drivers */
  357. /* sensors drivers */
  358. /* end of sensors drivers */
  359. /* touch drivers */
  360. /* end of touch drivers */
  361. /* Kendryte SDK */
  362. /* end of Kendryte SDK */
  363. /* end of peripheral libraries and drivers */
  364. /* AI packages */
  365. /* end of AI packages */
  366. /* Signal Processing and Control Algorithm Packages */
  367. /* end of Signal Processing and Control Algorithm Packages */
  368. /* miscellaneous packages */
  369. /* project laboratory */
  370. /* end of project laboratory */
  371. /* samples: kernel and components samples */
  372. /* end of samples: kernel and components samples */
  373. /* entertainment: terminal games and other interesting software packages */
  374. /* end of entertainment: terminal games and other interesting software packages */
  375. /* end of miscellaneous packages */
  376. /* Arduino libraries */
  377. /* Projects and Demos */
  378. /* end of Projects and Demos */
  379. /* Sensors */
  380. /* end of Sensors */
  381. /* Display */
  382. /* end of Display */
  383. /* Timing */
  384. /* end of Timing */
  385. /* Data Processing */
  386. /* end of Data Processing */
  387. /* Data Storage */
  388. /* Communication */
  389. /* end of Communication */
  390. /* Device Control */
  391. /* end of Device Control */
  392. /* Other */
  393. /* end of Other */
  394. /* Signal IO */
  395. /* end of Signal IO */
  396. /* Uncategorized */
  397. /* end of Arduino libraries */
  398. /* end of RT-Thread online packages */
  399. /* Privated Packages of RealThread */
  400. /* Network Utilities */
  401. /* end of Network Utilities */
  402. /* RT-Thread Smart */
  403. /* end of RT-Thread Smart */
  404. /* end of Privated Packages of RealThread */
  405. #define SOC_IMX6ULL
  406. #define CPU_MCIMX6Y2CVM05
  407. #define FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL 1
  408. #define FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL 1
  409. /* Platform Driver Configuration */
  410. /* Select UART Driver */
  411. #define BSP_USING_UART1
  412. /* end of Select UART Driver */
  413. /* Select SPI Driver */
  414. #define BSP_USING_SPI
  415. #define BSP_USING_SPI1
  416. #define BSP_USING_SPI2
  417. #define BSP_USING_SPI3
  418. #define BSP_USING_SPI4
  419. /* end of Select SPI Driver */
  420. /* Select I2C Driver */
  421. #define BSP_USING_I2C
  422. #define BSP_USING_I2C3
  423. #define I2C3_BAUD_RATE 400000
  424. #define BSP_USING_I2C4
  425. #define I2C4_BAUD_RATE 100000
  426. /* end of Select I2C Driver */
  427. /* Select LCD Driver */
  428. #define BSP_USING_LCD
  429. #define BSP_LCD_WIDTH 480
  430. #define BSP_LCD_HEIGHT 272
  431. #define BSP_LCD_VSW 2
  432. #define BSP_LCD_VBP 23
  433. #define BSP_LCD_VFP 22
  434. #define BSP_LCD_HSW 2
  435. #define BSP_LCD_HBP 46
  436. #define BSP_LCD_HFP 210
  437. #define BSP_LCD_PLL_DIV 8
  438. /* end of Select LCD Driver */
  439. /* Select SDHC Driver */
  440. #define RT_USING_SDIO1
  441. #define RT_USING_SDIO2
  442. /* end of Select SDHC Driver */
  443. /* Select RTC Driver */
  444. #define BSP_USING_ONCHIP_RTC
  445. /* end of Select RTC Driver */
  446. /* Select PWM Driver */
  447. #define BSP_USING_PWM1
  448. /* end of Select PWM Driver */
  449. /* Select ADC Driver */
  450. /* end of Select ADC Driver */
  451. /* Select WDT Driver */
  452. #define RT_USING_WDT1
  453. #define RT_USING_WDT2
  454. /* end of Select WDT Driver */
  455. /* Select ENET Driver */
  456. #define RT_USING_ENET1
  457. #define RT_USING_ENET2
  458. /* end of Select ENET Driver */
  459. /* Select Wifi Driver */
  460. #define RT_USING_WIFI_RW007
  461. #define RW007_DAFAULT_SSID "rt-thread"
  462. #define RW007_DAFAULT_PASSWARD "12345678"
  463. /* end of Select Wifi Driver */
  464. /* Select USB Driver */
  465. #define BSP_USING_USB_DEVICE
  466. /* end of Select USB Driver */
  467. /* end of Platform Driver Configuration */
  468. #endif