Kconfig 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. menu "Device Drivers"
  2. config RT_USING_DEVICE_IPC
  3. bool "Using device drivers IPC"
  4. default y
  5. if RT_USING_DEVICE_IPC
  6. config RT_PIPE_BUFSZ
  7. int "Set pipe buffer size"
  8. default 512
  9. config RT_USING_SYSTEM_WORKQUEUE
  10. bool "Using system default workqueue"
  11. default n
  12. if RT_USING_SYSTEM_WORKQUEUE
  13. config RT_SYSTEM_WORKQUEUE_STACKSIZE
  14. int "The stack size for system workqueue thread"
  15. default 2048
  16. config RT_SYSTEM_WORKQUEUE_PRIORITY
  17. int "The priority level of system workqueue thread"
  18. default 23
  19. endif
  20. endif
  21. config RT_USING_SERIAL
  22. bool "Using serial device drivers"
  23. select RT_USING_DEVICE_IPC
  24. select RT_USING_DEVICE
  25. default y
  26. if RT_USING_SERIAL
  27. config RT_SERIAL_USING_DMA
  28. bool "Enable serial DMA mode"
  29. default y
  30. config RT_SERIAL_RB_BUFSZ
  31. int "Set RX buffer size"
  32. default 64
  33. endif
  34. config RT_USING_CAN
  35. bool "Using CAN device drivers"
  36. default n
  37. if RT_USING_CAN
  38. config RT_CAN_USING_HDR
  39. bool "Enable CAN hardware filter"
  40. default y
  41. endif
  42. config RT_USING_HWTIMER
  43. bool "Using hardware timer device drivers"
  44. default n
  45. config RT_USING_CPUTIME
  46. bool "Enable CPU time for high resolution clock counter"
  47. default n
  48. help
  49. When enable this option, the BSP should provide a rt_clock_cputime_ops
  50. for CPU time by:
  51. const static struct rt_clock_cputime_ops _ops = {...};
  52. clock_cpu_setops(&_ops);
  53. Then user can use high resolution clock counter with:
  54. ts1 = clock_cpu_gettime();
  55. ts2 = clock_cpu_gettime();
  56. /* and get the ms of delta tick with API: */
  57. ms_tick = clock_cpu_millisecond(t2 - t1);
  58. us_tick = clock_cpu_microsecond(t2 - t1);
  59. if RT_USING_CPUTIME
  60. config RT_USING_CPUTIME_CORTEXM
  61. bool "Use DWT for CPU time"
  62. default y
  63. depends on ARCH_ARM_CORTEX_M3 || ARCH_ARM_CORTEX_M4 || ARCH_ARM_CORTEX_M7
  64. help
  65. Some Cortex-M3/4/7 MCU has Data Watchpoint and Trace Register, use
  66. the cycle counter in DWT for CPU time.
  67. endif
  68. config RT_USING_I2C
  69. bool "Using I2C device drivers"
  70. default n
  71. if RT_USING_I2C
  72. config RT_USING_I2C_BITOPS
  73. bool "Use GPIO to simulate I2C"
  74. default y
  75. endif
  76. config RT_USING_PIN
  77. bool "Using generic GPIO device drivers"
  78. default y
  79. config RT_USING_ADC
  80. bool "Using ADC device drivers"
  81. default n
  82. config RT_USING_PWM
  83. bool "Using PWM device drivers"
  84. default n
  85. config RT_USING_MTD_NOR
  86. bool "Using MTD Nor Flash device drivers"
  87. default n
  88. config RT_USING_MTD_NAND
  89. bool "Using MTD Nand Flash device drivers"
  90. default n
  91. if RT_USING_MTD_NAND
  92. config RT_MTD_NAND_DEBUG
  93. bool "Enable MTD Nand operations debug information"
  94. default n
  95. endif
  96. config RT_USING_MTD
  97. bool "Using Memory Technology Device (MTD)"
  98. default n
  99. if RT_USING_MTD
  100. config MTD_USING_NOR
  101. bool "Using MTD Nor Flash device"
  102. default n
  103. config MTD_USING_NAND
  104. bool "Using MTD Nand Flash device"
  105. default n
  106. endif
  107. config RT_USING_PM
  108. bool "Using Power Management device drivers"
  109. default n
  110. config RT_USING_RTC
  111. bool "Using RTC device drivers"
  112. select RT_USING_LIBC
  113. default n
  114. if RT_USING_RTC
  115. config RT_USING_ALARM
  116. bool "Using RTC alarm"
  117. default n
  118. config RT_USING_SOFT_RTC
  119. bool "Using software simulation RTC device"
  120. default n
  121. config RTC_SYNC_USING_NTP
  122. bool "Using NTP auto sync RTC time"
  123. depends on PKG_NETUTILS_NTP
  124. default y
  125. if RTC_SYNC_USING_NTP
  126. config RTC_NTP_FIRST_SYNC_DELAY
  127. int "NTP first sync delay time(second) for network connect"
  128. default 30
  129. config RTC_NTP_SYNC_PERIOD
  130. int "NTP auto sync period(second)"
  131. default 3600
  132. endif
  133. endif
  134. config RT_USING_SDIO
  135. bool "Using SD/MMC device drivers"
  136. default n
  137. if RT_USING_SDIO
  138. config RT_SDIO_STACK_SIZE
  139. int "The stack size for sdio irq thread"
  140. default 512
  141. config RT_SDIO_THREAD_PRIORITY
  142. int "The priority level value of sdio irq thread"
  143. default 15
  144. config RT_MMCSD_STACK_SIZE
  145. int "The stack size for mmcsd thread"
  146. default 1024
  147. config RT_MMCSD_THREAD_PREORITY
  148. int "The priority level value of mmcsd thread"
  149. default 22
  150. config RT_MMCSD_MAX_PARTITION
  151. int "mmcsd max partition"
  152. default 16
  153. config RT_SDIO_DEBUG
  154. bool "Enable SDIO debug log output"
  155. default n
  156. endif
  157. config RT_USING_SPI
  158. bool "Using SPI Bus/Device device drivers"
  159. default n
  160. if RT_USING_SPI
  161. config RT_USING_QSPI
  162. bool "Enable QSPI mode"
  163. default n
  164. config RT_USING_SPI_MSD
  165. bool "Using SD/TF card driver with spi"
  166. select RT_USING_DFS
  167. default n
  168. config RT_USING_SFUD
  169. bool "Using Serial Flash Universal Driver"
  170. default n
  171. if RT_USING_SFUD
  172. config RT_SFUD_USING_SFDP
  173. bool "Using auto probe flash JEDEC SFDP parameter"
  174. default y
  175. config RT_SFUD_USING_FLASH_INFO_TABLE
  176. bool "Using defined supported flash chip information table"
  177. default y
  178. config RT_SFUD_USING_QSPI
  179. bool "Using QSPI mode support"
  180. select RT_USING_QSPI
  181. default n
  182. config RT_DEBUG_SFUD
  183. bool "Show more SFUD debug information"
  184. default n
  185. endif
  186. config RT_USING_W25QXX
  187. bool "Using W25QXX SPI NorFlash"
  188. default n
  189. config RT_USING_GD
  190. bool "Using GD SPI NorFlash"
  191. default n
  192. config RT_USING_ENC28J60
  193. bool "Using ENC28J60 SPI Ethernet network interface"
  194. select RT_USING_LWIP
  195. default n
  196. config RT_USING_SPI_WIFI
  197. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  198. select RT_USING_LWIP
  199. default n
  200. endif
  201. config RT_USING_WDT
  202. bool "Using Watch Dog device drivers"
  203. default n
  204. config RT_USING_AUDIO
  205. bool "Using Audio device drivers"
  206. default n
  207. config RT_USING_SENSOR
  208. bool "Using Sensor device drivers"
  209. select RT_USING_PIN
  210. default n
  211. if RT_USING_SENSOR
  212. config RT_USING_SENSOR_CMD
  213. bool "Using Sensor cmd"
  214. default y
  215. endif
  216. menu "Using Hardware Crypto drivers"
  217. config RT_USING_HWCRYPTO
  218. bool "Using Hardware Crypto"
  219. default n
  220. if RT_USING_HWCRYPTO
  221. config RT_HWCRYPTO_DEFAULT_NAME
  222. string "Hardware crypto device name"
  223. default "hwcryto"
  224. config RT_HWCRYPTO_IV_MAX_SIZE
  225. int "IV max size"
  226. default "16"
  227. config HWCRYPTO_KEYBIT_MAX_SIZE
  228. int "Key max bit length"
  229. default 256
  230. config RT_HWCRYPTO_USING_GCM
  231. bool "Using Hardware GCM"
  232. default n
  233. config RT_HWCRYPTO_USING_AES
  234. bool "Using Hardware AES"
  235. default n
  236. if RT_HWCRYPTO_USING_AES
  237. config RT_HWCRYPTO_USING_AES_ECB
  238. bool "Using Hardware AES ECB mode"
  239. default y
  240. config RT_HWCRYPTO_USING_AES_CBC
  241. bool "Using Hardware AES CBC mode"
  242. default n
  243. config RT_HWCRYPTO_USING_AES_CFB
  244. bool "Using Hardware AES CFB mode"
  245. default n
  246. config RT_HWCRYPTO_USING_AES_CTR
  247. bool "Using Hardware AES CTR mode"
  248. default n
  249. config RT_HWCRYPTO_USING_AES_OFB
  250. bool "Using Hardware AES OFB mode"
  251. default n
  252. endif
  253. config RT_HWCRYPTO_USING_DES
  254. bool "Using Hardware DES"
  255. default n
  256. if RT_HWCRYPTO_USING_DES
  257. config RT_HWCRYPTO_USING_DES_ECB
  258. bool "Using Hardware DES ECB mode"
  259. default y
  260. config RT_HWCRYPTO_USING_DES_CBC
  261. bool "Using Hardware DES CBC mode"
  262. default n
  263. endif
  264. config RT_HWCRYPTO_USING_3DES
  265. bool "Using Hardware 3DES"
  266. default n
  267. if RT_HWCRYPTO_USING_3DES
  268. config RT_HWCRYPTO_USING_3DES_ECB
  269. bool "Using Hardware 3DES ECB mode"
  270. default y
  271. config RT_HWCRYPTO_USING_3DES_CBC
  272. bool "Using Hardware 3DES CBC mode"
  273. default n
  274. endif
  275. config RT_HWCRYPTO_USING_RC4
  276. bool "Using Hardware RC4"
  277. default n
  278. config RT_HWCRYPTO_USING_MD5
  279. bool "Using Hardware MD5"
  280. default n
  281. config RT_HWCRYPTO_USING_SHA1
  282. bool "Using Hardware SHA1"
  283. default n
  284. config RT_HWCRYPTO_USING_SHA2
  285. bool "Using Hardware SHA2"
  286. default n
  287. if RT_HWCRYPTO_USING_SHA2
  288. config RT_HWCRYPTO_USING_SHA2_224
  289. bool "Using Hardware SHA2_224 mode"
  290. default n
  291. config RT_HWCRYPTO_USING_SHA2_256
  292. bool "Using Hardware SHA2_256 mode"
  293. default y
  294. config RT_HWCRYPTO_USING_SHA2_384
  295. bool "Using Hardware SHA2_384 mode"
  296. default n
  297. config RT_HWCRYPTO_USING_SHA2_512
  298. bool "Using Hardware SHA2_512 mode"
  299. default n
  300. endif
  301. config RT_HWCRYPTO_USING_RNG
  302. bool "Using Hardware RNG"
  303. default n
  304. config RT_HWCRYPTO_USING_CRC
  305. bool "Using Hardware CRC"
  306. default n
  307. if RT_HWCRYPTO_USING_CRC
  308. config RT_HWCRYPTO_USING_CRC_07
  309. bool "Using Hardware CRC-8 0x07 polynomial"
  310. default n
  311. config RT_HWCRYPTO_USING_CRC_8005
  312. bool "Using Hardware CRC-16 0x8005 polynomial"
  313. default n
  314. config RT_HWCRYPTO_USING_CRC_1021
  315. bool "Using Hardware CRC-16 0x1021 polynomial"
  316. default n
  317. config RT_HWCRYPTO_USING_CRC_3D65
  318. bool "Using Hardware CRC-16 0x3D65 polynomial"
  319. default n
  320. config RT_HWCRYPTO_USING_CRC_04C11DB7
  321. bool "Using Hardware CRC-32 0x04C11DB7 polynomial"
  322. default n
  323. endif
  324. config RT_HWCRYPTO_USING_BIGNUM
  325. bool "Using Hardware bignum"
  326. default n
  327. if RT_HWCRYPTO_USING_BIGNUM
  328. config RT_HWCRYPTO_USING_BIGNUM_EXPTMOD
  329. bool "Using Hardware bignum expt_mod operation"
  330. default y
  331. config RT_HWCRYPTO_USING_BIGNUM_MULMOD
  332. bool "Using Hardware bignum mul_mod operation"
  333. default y
  334. config RT_HWCRYPTO_USING_BIGNUM_MUL
  335. bool "Using Hardware bignum mul operation"
  336. default n
  337. config RT_HWCRYPTO_USING_BIGNUM_ADD
  338. bool "Using Hardware bignum add operation"
  339. default n
  340. config RT_HWCRYPTO_USING_BIGNUM_SUB
  341. bool "Using Hardware bignum sub operation"
  342. default n
  343. endif
  344. endif
  345. endmenu
  346. menu "Using WiFi"
  347. config RT_USING_WIFI
  348. bool "Using Wi-Fi framework"
  349. default n
  350. if RT_USING_WIFI
  351. config RT_WLAN_DEVICE_STA_NAME
  352. string "The WiFi device name for station"
  353. default "wlan0"
  354. config RT_WLAN_DEVICE_AP_NAME
  355. string "The WiFi device name for ap"
  356. default "wlan1"
  357. config RT_WLAN_DEFAULT_PROT
  358. string "Default transport protocol"
  359. default "lwip"
  360. config RT_WLAN_SCAN_WAIT_MS
  361. int "Set scan timeout time(ms)"
  362. default 10000
  363. config RT_WLAN_CONNECT_WAIT_MS
  364. int "Set connect timeout time(ms)"
  365. default 10000
  366. config RT_WLAN_SSID_MAX_LENGTH
  367. int "SSID name maximum length"
  368. default 32
  369. config RT_WLAN_PASSWORD_MAX_LENGTH
  370. int "Maximum password length"
  371. default 32
  372. config RT_WLAN_SCAN_SORT
  373. bool "Automatic sorting of scan results"
  374. default y
  375. config RT_WLAN_CFG_INFO_MAX
  376. int "Maximum number of WiFi information automatically saved"
  377. default 3
  378. config RT_WLAN_WORKQUEUE_THREAD_NAME
  379. string "WiFi work queue thread name"
  380. default "wlan_job"
  381. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  382. int "wifi work queue thread size"
  383. default 2048
  384. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  385. int "WiFi work queue thread priority"
  386. default 22
  387. config RT_WLAN_DEV_EVENT_NUM
  388. int "Maximum number of driver events"
  389. default 2
  390. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  391. bool "Forced use of PBUF transmission"
  392. default n
  393. menuconfig RT_WLAN_DEBUG
  394. bool "Enable WLAN Debugging Options"
  395. default n
  396. if RT_WLAN_DEBUG
  397. config RT_WLAN_CMD_DEBUG
  398. bool "Enable Debugging of wlan_cmd.c"
  399. default n
  400. config RT_WLAN_MGNT_DEBUG
  401. bool "Enable Debugging of wlan_mgnt.c"
  402. default n
  403. config RT_WLAN_DEV_DEBUG
  404. bool "Enable Debugging of wlan_dev.c"
  405. default n
  406. config RT_WLAN_PROT_DEBUG
  407. bool "Enable Debugging of wlan_prot.c"
  408. default n
  409. config RT_WLAN_CFG_DEBUG
  410. bool "Enable Debugging of wlan_cfg.c"
  411. default n
  412. config RT_WLAN_LWIP_DEBUG
  413. bool "Enable Debugging of wlan_lwip.c"
  414. default n
  415. endif
  416. endif
  417. endmenu
  418. menu "Using USB"
  419. config RT_USING_USB_HOST
  420. bool "Using USB host"
  421. default n
  422. if RT_USING_USB_HOST
  423. config RT_USBH_MSTORAGE
  424. bool "Enable Udisk Drivers"
  425. default n
  426. if RT_USBH_MSTORAGE
  427. config UDISK_MOUNTPOINT
  428. string "Udisk mount dir"
  429. default "/"
  430. endif
  431. endif
  432. config RT_USING_USB_DEVICE
  433. bool "Using USB device"
  434. default n
  435. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  436. config RT_USBD_THREAD_STACK_SZ
  437. int "usb thread stack size"
  438. default 4096
  439. endif
  440. if RT_USING_USB_DEVICE
  441. config USB_VENDOR_ID
  442. hex "USB Vendor ID"
  443. default 0x0FFE
  444. config USB_PRODUCT_ID
  445. hex "USB Product ID"
  446. default 0x0001
  447. config RT_USB_DEVICE_COMPOSITE
  448. bool "Enable composite device"
  449. default n
  450. choice
  451. prompt "Device type"
  452. default _RT_USB_DEVICE_NONE
  453. depends on !RT_USB_DEVICE_COMPOSITE
  454. config _RT_USB_DEVICE_NONE
  455. bool "Using custom class by register interface"
  456. select RT_USB_DEVICE_NONE
  457. config _RT_USB_DEVICE_CDC
  458. bool "Enable to use device as CDC device"
  459. select RT_USB_DEVICE_CDC
  460. config _RT_USB_DEVICE_MSTORAGE
  461. bool "Enable to use device as Mass Storage device"
  462. select RT_USB_DEVICE_MSTORAGE
  463. config _RT_USB_DEVICE_HID
  464. bool "Enable to use device as HID device"
  465. select RT_USB_DEVICE_HID
  466. config _RT_USB_DEVICE_RNDIS
  467. bool "Enable to use device as rndis device"
  468. select RT_USB_DEVICE_RNDIS
  469. depends on RT_USING_LWIP
  470. config _RT_USB_DEVICE_ECM
  471. bool "Enable to use device as ecm device"
  472. select RT_USB_DEVICE_ECM
  473. depends on RT_USING_LWIP
  474. config _RT_USB_DEVICE_WINUSB
  475. bool "Enable to use device as winusb device"
  476. select RT_USB_DEVICE_WINUSB
  477. endchoice
  478. if RT_USB_DEVICE_COMPOSITE
  479. config RT_USB_DEVICE_CDC
  480. bool "Enable to use device as CDC device"
  481. default n
  482. config RT_USB_DEVICE_NONE
  483. bool
  484. default y
  485. config RT_USB_DEVICE_MSTORAGE
  486. bool "Enable to use device as Mass Storage device"
  487. default n
  488. config RT_USB_DEVICE_HID
  489. bool "Enable to use device as HID device"
  490. default n
  491. config RT_USB_DEVICE_RNDIS
  492. bool "Enable to use device as rndis device"
  493. default n
  494. depends on RT_USING_LWIP
  495. config RT_USB_DEVICE_ECM
  496. bool "Enable to use device as ecm device"
  497. default n
  498. depends on RT_USING_LWIP
  499. config RT_USB_DEVICE_WINUSB
  500. bool "Enable to use device as winusb device"
  501. default n
  502. endif
  503. if RT_USB_DEVICE_CDC
  504. config RT_VCOM_TASK_STK_SIZE
  505. int "virtual com thread stack size"
  506. default 512
  507. config RT_VCOM_TX_USE_DMA
  508. bool "Enable to use dma for vcom tx"
  509. default n
  510. config RT_VCOM_SERNO
  511. string "serial number of virtual com"
  512. default "32021919830108"
  513. config RT_VCOM_SER_LEN
  514. int "serial number length of virtual com"
  515. default 14
  516. config RT_VCOM_TX_TIMEOUT
  517. int "tx timeout(ticks) of virtual com"
  518. default 1000
  519. endif
  520. if RT_USB_DEVICE_WINUSB
  521. config RT_WINUSB_GUID
  522. string "Guid for winusb"
  523. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  524. endif
  525. if RT_USB_DEVICE_MSTORAGE
  526. config RT_USB_MSTORAGE_DISK_NAME
  527. string "msc class disk name"
  528. default "flash0"
  529. endif
  530. if RT_USB_DEVICE_HID
  531. config RT_USB_DEVICE_HID_KEYBOARD
  532. bool "Use to HID device as Keyboard"
  533. default n
  534. if RT_USB_DEVICE_HID_KEYBOARD
  535. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  536. int "Number of Keyboard(max 3)"
  537. default 1
  538. range 1 3
  539. endif
  540. config RT_USB_DEVICE_HID_MOUSE
  541. bool "Use to HID device as Mouse"
  542. default n
  543. config RT_USB_DEVICE_HID_GENERAL
  544. bool "Use to HID device as General HID device"
  545. default y
  546. if RT_USB_DEVICE_HID_GENERAL
  547. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  548. int "General HID device out report length"
  549. default 63
  550. range 0 63
  551. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  552. int "General HID device in report length"
  553. default 63
  554. range 0 63
  555. endif
  556. config RT_USB_DEVICE_HID_MEDIA
  557. bool "Use to HID device as media keyboard"
  558. default y
  559. endif
  560. endif
  561. endmenu
  562. endmenu