Kconfig 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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. help
  172. An using JEDEC's SFDP standard serial (SPI) flash universal driver library
  173. if RT_USING_SFUD
  174. config RT_SFUD_USING_SFDP
  175. bool "Using auto probe flash JEDEC SFDP parameter"
  176. default y
  177. config RT_SFUD_USING_FLASH_INFO_TABLE
  178. bool "Using defined supported flash chip information table"
  179. default y
  180. config RT_SFUD_USING_QSPI
  181. bool "Using QSPI mode support"
  182. select RT_USING_QSPI
  183. default n
  184. config RT_DEBUG_SFUD
  185. bool "Show more SFUD debug information"
  186. default n
  187. endif
  188. config RT_USING_ENC28J60
  189. bool "Using ENC28J60 SPI Ethernet network interface"
  190. select RT_USING_LWIP
  191. default n
  192. config RT_USING_SPI_WIFI
  193. bool "Using RW009/007 SPI Wi-Fi wireless interface"
  194. select RT_USING_LWIP
  195. default n
  196. endif
  197. config RT_USING_WDT
  198. bool "Using Watch Dog device drivers"
  199. default n
  200. config RT_USING_AUDIO
  201. bool "Using Audio device drivers"
  202. default n
  203. config RT_USING_SENSOR
  204. bool "Using Sensor device drivers"
  205. select RT_USING_PIN
  206. default n
  207. if RT_USING_SENSOR
  208. config RT_USING_SENSOR_CMD
  209. bool "Using Sensor cmd"
  210. default y
  211. endif
  212. menu "Using Hardware Crypto drivers"
  213. config RT_USING_HWCRYPTO
  214. bool "Using Hardware Crypto"
  215. default n
  216. if RT_USING_HWCRYPTO
  217. config RT_HWCRYPTO_DEFAULT_NAME
  218. string "Hardware crypto device name"
  219. default "hwcryto"
  220. config RT_HWCRYPTO_IV_MAX_SIZE
  221. int "IV max size"
  222. default "16"
  223. config RT_HWCRYPTO_KEYBIT_MAX_SIZE
  224. int "Key max bit length"
  225. default 256
  226. config RT_HWCRYPTO_USING_GCM
  227. bool "Using Hardware GCM"
  228. default n
  229. config RT_HWCRYPTO_USING_AES
  230. bool "Using Hardware AES"
  231. default n
  232. if RT_HWCRYPTO_USING_AES
  233. config RT_HWCRYPTO_USING_AES_ECB
  234. bool "Using Hardware AES ECB mode"
  235. default y
  236. config RT_HWCRYPTO_USING_AES_CBC
  237. bool "Using Hardware AES CBC mode"
  238. default n
  239. config RT_HWCRYPTO_USING_AES_CFB
  240. bool "Using Hardware AES CFB mode"
  241. default n
  242. config RT_HWCRYPTO_USING_AES_CTR
  243. bool "Using Hardware AES CTR mode"
  244. default n
  245. config RT_HWCRYPTO_USING_AES_OFB
  246. bool "Using Hardware AES OFB mode"
  247. default n
  248. endif
  249. config RT_HWCRYPTO_USING_DES
  250. bool "Using Hardware DES"
  251. default n
  252. if RT_HWCRYPTO_USING_DES
  253. config RT_HWCRYPTO_USING_DES_ECB
  254. bool "Using Hardware DES ECB mode"
  255. default y
  256. config RT_HWCRYPTO_USING_DES_CBC
  257. bool "Using Hardware DES CBC mode"
  258. default n
  259. endif
  260. config RT_HWCRYPTO_USING_3DES
  261. bool "Using Hardware 3DES"
  262. default n
  263. if RT_HWCRYPTO_USING_3DES
  264. config RT_HWCRYPTO_USING_3DES_ECB
  265. bool "Using Hardware 3DES ECB mode"
  266. default y
  267. config RT_HWCRYPTO_USING_3DES_CBC
  268. bool "Using Hardware 3DES CBC mode"
  269. default n
  270. endif
  271. config RT_HWCRYPTO_USING_RC4
  272. bool "Using Hardware RC4"
  273. default n
  274. config RT_HWCRYPTO_USING_MD5
  275. bool "Using Hardware MD5"
  276. default n
  277. config RT_HWCRYPTO_USING_SHA1
  278. bool "Using Hardware SHA1"
  279. default n
  280. config RT_HWCRYPTO_USING_SHA2
  281. bool "Using Hardware SHA2"
  282. default n
  283. if RT_HWCRYPTO_USING_SHA2
  284. config RT_HWCRYPTO_USING_SHA2_224
  285. bool "Using Hardware SHA2_224 mode"
  286. default n
  287. config RT_HWCRYPTO_USING_SHA2_256
  288. bool "Using Hardware SHA2_256 mode"
  289. default y
  290. config RT_HWCRYPTO_USING_SHA2_384
  291. bool "Using Hardware SHA2_384 mode"
  292. default n
  293. config RT_HWCRYPTO_USING_SHA2_512
  294. bool "Using Hardware SHA2_512 mode"
  295. default n
  296. endif
  297. config RT_HWCRYPTO_USING_RNG
  298. bool "Using Hardware RNG"
  299. default n
  300. config RT_HWCRYPTO_USING_CRC
  301. bool "Using Hardware CRC"
  302. default n
  303. if RT_HWCRYPTO_USING_CRC
  304. config RT_HWCRYPTO_USING_CRC_07
  305. bool "Using Hardware CRC-8 0x07 polynomial"
  306. default n
  307. config RT_HWCRYPTO_USING_CRC_8005
  308. bool "Using Hardware CRC-16 0x8005 polynomial"
  309. default n
  310. config RT_HWCRYPTO_USING_CRC_1021
  311. bool "Using Hardware CRC-16 0x1021 polynomial"
  312. default n
  313. config RT_HWCRYPTO_USING_CRC_3D65
  314. bool "Using Hardware CRC-16 0x3D65 polynomial"
  315. default n
  316. config RT_HWCRYPTO_USING_CRC_04C11DB7
  317. bool "Using Hardware CRC-32 0x04C11DB7 polynomial"
  318. default n
  319. endif
  320. config RT_HWCRYPTO_USING_BIGNUM
  321. bool "Using Hardware bignum"
  322. default n
  323. if RT_HWCRYPTO_USING_BIGNUM
  324. config RT_HWCRYPTO_USING_BIGNUM_EXPTMOD
  325. bool "Using Hardware bignum expt_mod operation"
  326. default y
  327. config RT_HWCRYPTO_USING_BIGNUM_MULMOD
  328. bool "Using Hardware bignum mul_mod operation"
  329. default y
  330. config RT_HWCRYPTO_USING_BIGNUM_MUL
  331. bool "Using Hardware bignum mul operation"
  332. default n
  333. config RT_HWCRYPTO_USING_BIGNUM_ADD
  334. bool "Using Hardware bignum add operation"
  335. default n
  336. config RT_HWCRYPTO_USING_BIGNUM_SUB
  337. bool "Using Hardware bignum sub operation"
  338. default n
  339. endif
  340. endif
  341. endmenu
  342. menu "Using WiFi"
  343. config RT_USING_WIFI
  344. bool "Using Wi-Fi framework"
  345. default n
  346. if RT_USING_WIFI
  347. config RT_WLAN_DEVICE_STA_NAME
  348. string "The WiFi device name for station"
  349. default "wlan0"
  350. config RT_WLAN_DEVICE_AP_NAME
  351. string "The WiFi device name for ap"
  352. default "wlan1"
  353. config RT_WLAN_DEFAULT_PROT
  354. string "Default transport protocol"
  355. default "lwip"
  356. config RT_WLAN_SCAN_WAIT_MS
  357. int "Set scan timeout time(ms)"
  358. default 10000
  359. config RT_WLAN_CONNECT_WAIT_MS
  360. int "Set connect timeout time(ms)"
  361. default 10000
  362. config RT_WLAN_SSID_MAX_LENGTH
  363. int "SSID name maximum length"
  364. default 32
  365. config RT_WLAN_PASSWORD_MAX_LENGTH
  366. int "Maximum password length"
  367. default 32
  368. config RT_WLAN_SCAN_SORT
  369. bool "Automatic sorting of scan results"
  370. default y
  371. config RT_WLAN_CFG_INFO_MAX
  372. int "Maximum number of WiFi information automatically saved"
  373. default 3
  374. config RT_WLAN_WORKQUEUE_THREAD_NAME
  375. string "WiFi work queue thread name"
  376. default "wlan_job"
  377. config RT_WLAN_WORKQUEUE_THREAD_SIZE
  378. int "wifi work queue thread size"
  379. default 2048
  380. config RT_WLAN_WORKQUEUE_THREAD_PRIO
  381. int "WiFi work queue thread priority"
  382. default 22
  383. config RT_WLAN_DEV_EVENT_NUM
  384. int "Maximum number of driver events"
  385. default 2
  386. config RT_WLAN_PROT_LWIP_PBUF_FORCE
  387. bool "Forced use of PBUF transmission"
  388. default n
  389. menuconfig RT_WLAN_DEBUG
  390. bool "Enable WLAN Debugging Options"
  391. default n
  392. if RT_WLAN_DEBUG
  393. config RT_WLAN_CMD_DEBUG
  394. bool "Enable Debugging of wlan_cmd.c"
  395. default n
  396. config RT_WLAN_MGNT_DEBUG
  397. bool "Enable Debugging of wlan_mgnt.c"
  398. default n
  399. config RT_WLAN_DEV_DEBUG
  400. bool "Enable Debugging of wlan_dev.c"
  401. default n
  402. config RT_WLAN_PROT_DEBUG
  403. bool "Enable Debugging of wlan_prot.c"
  404. default n
  405. config RT_WLAN_CFG_DEBUG
  406. bool "Enable Debugging of wlan_cfg.c"
  407. default n
  408. config RT_WLAN_LWIP_DEBUG
  409. bool "Enable Debugging of wlan_lwip.c"
  410. default n
  411. endif
  412. endif
  413. endmenu
  414. menu "Using USB"
  415. config RT_USING_USB_HOST
  416. bool "Using USB host"
  417. default n
  418. if RT_USING_USB_HOST
  419. config RT_USBH_MSTORAGE
  420. bool "Enable Udisk Drivers"
  421. default n
  422. if RT_USBH_MSTORAGE
  423. config UDISK_MOUNTPOINT
  424. string "Udisk mount dir"
  425. default "/"
  426. endif
  427. endif
  428. config RT_USING_USB_DEVICE
  429. bool "Using USB device"
  430. default n
  431. if RT_USING_USB_DEVICE || RT_USING_USB_HOST
  432. config RT_USBD_THREAD_STACK_SZ
  433. int "usb thread stack size"
  434. default 4096
  435. endif
  436. if RT_USING_USB_DEVICE
  437. config USB_VENDOR_ID
  438. hex "USB Vendor ID"
  439. default 0x0FFE
  440. config USB_PRODUCT_ID
  441. hex "USB Product ID"
  442. default 0x0001
  443. config RT_USB_DEVICE_COMPOSITE
  444. bool "Enable composite device"
  445. default n
  446. choice
  447. prompt "Device type"
  448. default _RT_USB_DEVICE_NONE
  449. depends on !RT_USB_DEVICE_COMPOSITE
  450. config _RT_USB_DEVICE_NONE
  451. bool "Using custom class by register interface"
  452. select RT_USB_DEVICE_NONE
  453. config _RT_USB_DEVICE_CDC
  454. bool "Enable to use device as CDC device"
  455. select RT_USB_DEVICE_CDC
  456. config _RT_USB_DEVICE_MSTORAGE
  457. bool "Enable to use device as Mass Storage device"
  458. select RT_USB_DEVICE_MSTORAGE
  459. config _RT_USB_DEVICE_HID
  460. bool "Enable to use device as HID device"
  461. select RT_USB_DEVICE_HID
  462. config _RT_USB_DEVICE_RNDIS
  463. bool "Enable to use device as rndis device"
  464. select RT_USB_DEVICE_RNDIS
  465. depends on RT_USING_LWIP
  466. config _RT_USB_DEVICE_ECM
  467. bool "Enable to use device as ecm device"
  468. select RT_USB_DEVICE_ECM
  469. depends on RT_USING_LWIP
  470. config _RT_USB_DEVICE_WINUSB
  471. bool "Enable to use device as winusb device"
  472. select RT_USB_DEVICE_WINUSB
  473. endchoice
  474. if RT_USB_DEVICE_COMPOSITE
  475. config RT_USB_DEVICE_CDC
  476. bool "Enable to use device as CDC device"
  477. default n
  478. config RT_USB_DEVICE_NONE
  479. bool
  480. default y
  481. config RT_USB_DEVICE_MSTORAGE
  482. bool "Enable to use device as Mass Storage device"
  483. default n
  484. config RT_USB_DEVICE_HID
  485. bool "Enable to use device as HID device"
  486. default n
  487. config RT_USB_DEVICE_RNDIS
  488. bool "Enable to use device as rndis device"
  489. default n
  490. depends on RT_USING_LWIP
  491. config RT_USB_DEVICE_ECM
  492. bool "Enable to use device as ecm device"
  493. default n
  494. depends on RT_USING_LWIP
  495. config RT_USB_DEVICE_WINUSB
  496. bool "Enable to use device as winusb device"
  497. default n
  498. endif
  499. if RT_USB_DEVICE_CDC
  500. config RT_VCOM_TASK_STK_SIZE
  501. int "virtual com thread stack size"
  502. default 512
  503. config RT_VCOM_TX_USE_DMA
  504. bool "Enable to use dma for vcom tx"
  505. default n
  506. config RT_VCOM_SERNO
  507. string "serial number of virtual com"
  508. default "32021919830108"
  509. config RT_VCOM_SER_LEN
  510. int "serial number length of virtual com"
  511. default 14
  512. config RT_VCOM_TX_TIMEOUT
  513. int "tx timeout(ticks) of virtual com"
  514. default 1000
  515. endif
  516. if RT_USB_DEVICE_WINUSB
  517. config RT_WINUSB_GUID
  518. string "Guid for winusb"
  519. default "{6860DC3C-C05F-4807-8807-1CA861CC1D66}"
  520. endif
  521. if RT_USB_DEVICE_MSTORAGE
  522. config RT_USB_MSTORAGE_DISK_NAME
  523. string "msc class disk name"
  524. default "flash0"
  525. endif
  526. if RT_USB_DEVICE_RNDIS
  527. config RNDIS_DELAY_LINK_UP
  528. bool "Delay linkup media connection"
  529. select RT_USING_TIMER_SOFT
  530. default n
  531. endif
  532. if RT_USB_DEVICE_HID
  533. config RT_USB_DEVICE_HID_KEYBOARD
  534. bool "Use to HID device as Keyboard"
  535. default n
  536. if RT_USB_DEVICE_HID_KEYBOARD
  537. config RT_USB_DEVICE_HID_KEYBOARD_NUMBER
  538. int "Number of Keyboard(max 3)"
  539. default 1
  540. range 1 3
  541. endif
  542. config RT_USB_DEVICE_HID_MOUSE
  543. bool "Use to HID device as Mouse"
  544. default n
  545. config RT_USB_DEVICE_HID_GENERAL
  546. bool "Use to HID device as General HID device"
  547. default y
  548. if RT_USB_DEVICE_HID_GENERAL
  549. config RT_USB_DEVICE_HID_GENERAL_OUT_REPORT_LENGTH
  550. int "General HID device out report length"
  551. default 63
  552. range 0 63
  553. config RT_USB_DEVICE_HID_GENERAL_IN_REPORT_LENGTH
  554. int "General HID device in report length"
  555. default 63
  556. range 0 63
  557. endif
  558. config RT_USB_DEVICE_HID_MEDIA
  559. bool "Use to HID device as media keyboard"
  560. default y
  561. endif
  562. endif
  563. endmenu
  564. endmenu