Kconfig 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. mainmenu "RT-Thread Configuration"
  2. config BSP_DIR
  3. string
  4. option env="BSP_ROOT"
  5. default "."
  6. config RTT_DIR
  7. string
  8. option env="RTT_ROOT"
  9. default "../.."
  10. config PKGS_DIR
  11. string
  12. option env="PKGS_ROOT"
  13. default "packages"
  14. source "$RTT_DIR/Kconfig"
  15. source "$PKGS_DIR/Kconfig"
  16. menu "Hardware Drivers Config"
  17. config SOC_RP2040
  18. bool
  19. select ARCH_ARM_CORTEX_M0
  20. select RT_USING_COMPONENTS_INIT
  21. select RT_USING_USER_MAIN
  22. select SOC_SERIES_RP2040_PICO
  23. select PKG_USING_RASPBERRYPI_PICO_SDK
  24. default y
  25. menu "Onboard Peripheral Drivers"
  26. config BSP_USING_LVGL
  27. bool "Enable LVGL for LCD"
  28. select PKG_USING_LVGL
  29. select BSP_USING_SPI_LCD
  30. default n
  31. if BSP_USING_LVGL
  32. config BSP_USING_LVGL_DEMO
  33. bool "Enable LVGL demo"
  34. select PKG_USING_LV_MUSIC_DEMO
  35. default y
  36. endif
  37. config BSP_USING_ON_CHIP_FLASH
  38. bool "Enable On-Chip FLASH"
  39. select FAL_DEBUG_CONFIG
  40. select FAL_PART_HAS_TABLE_CFG
  41. default n
  42. endmenu
  43. menu "On-chip Peripheral Drivers"
  44. config BSP_USING_PIN
  45. bool "Enable GPIO"
  46. select RT_USING_PIN
  47. default y
  48. menuconfig BSP_USING_UART
  49. bool "Enable UART"
  50. select RT_USING_SERIAL
  51. default y
  52. if BSP_USING_UART
  53. config BSP_USING_UART0
  54. bool "Enable UART0"
  55. default y
  56. if BSP_USING_UART0
  57. choice
  58. prompt "uart0 tx pin number (GP)"
  59. depends on BSP_USING_UART0
  60. default BSP_UART0_TX_PIN_0
  61. config BSP_UART0_TX_PIN_0
  62. bool "0"
  63. config BSP_UART0_TX_PIN_12
  64. bool "12"
  65. config BSP_UART0_TX_PIN_16
  66. bool "16"
  67. endchoice
  68. config BSP_UART0_TX_PIN
  69. int
  70. default 0 if BSP_UART0_TX_PIN_0
  71. default 12 if BSP_UART0_TX_PIN_12
  72. default 16 if BSP_UART0_TX_PIN_16
  73. choice
  74. prompt "uart0 rx pin number (GP)"
  75. depends on BSP_USING_UART0
  76. default BSP_UART0_RX_PIN_1
  77. config BSP_UART0_RX_PIN_1
  78. bool "1"
  79. config BSP_UART0_RX_PIN_13
  80. bool "13"
  81. config BSP_UART0_RX_PIN_17
  82. bool "17"
  83. endchoice
  84. config BSP_UART0_RX_PIN
  85. int
  86. default 1 if BSP_UART0_RX_PIN_1
  87. default 13 if BSP_UART0_RX_PIN_13
  88. default 17 if BSP_UART0_RX_PIN_17
  89. endif
  90. config BSP_USING_UART1
  91. bool "Enable UART1"
  92. default n
  93. if BSP_USING_UART1
  94. choice
  95. prompt "uart1 tx pin number (GP)"
  96. depends on BSP_USING_UART1
  97. default BSP_UART1_TX_PIN_4
  98. config BSP_UART1_TX_PIN_4
  99. bool "4"
  100. config BSP_UART1_TX_PIN_8
  101. bool "8"
  102. endchoice
  103. config BSP_UART1_TX_PIN
  104. int
  105. default 4 if BSP_UART1_TX_PIN_4
  106. default 8 if BSP_UART1_TX_PIN_8
  107. choice
  108. prompt "uart1 rx pin number (GP)"
  109. depends on BSP_USING_UART1
  110. default BSP_UART1_RX_PIN_5
  111. config BSP_UART1_RX_PIN_5
  112. bool "5"
  113. config BSP_UART1_RX_PIN_9
  114. bool "9"
  115. endchoice
  116. config BSP_UART1_RX_PIN
  117. int
  118. default 5 if BSP_UART1_RX_PIN_5
  119. default 9 if BSP_UART1_RX_PIN_9
  120. endif
  121. endif
  122. menuconfig BSP_USING_SOFT_I2C
  123. bool "Enable I2C BUS (software simulation)"
  124. default n
  125. select RT_USING_I2C
  126. select RT_USING_I2C_BITOPS
  127. select RT_USING_PIN
  128. if BSP_USING_SOFT_I2C
  129. config BSP_USING_SOFT_I2C1
  130. bool "Enable I2C1 Bus (software simulation)"
  131. default n
  132. if BSP_USING_SOFT_I2C1
  133. config BSP_SOFT_I2C1_SCL_PIN
  134. int "i2c1 scl pin number (GP)"
  135. range 0 28
  136. default 2
  137. config BSP_SOFT_I2C1_SDA_PIN
  138. int "I2C1 sda pin number (GP)"
  139. range 0 28
  140. default 3
  141. endif
  142. endif
  143. menuconfig BSP_USING_SOFT_SPI
  144. bool "Enable soft SPI BUS"
  145. default n
  146. select RT_USING_PIN
  147. select RT_USING_SPI_BITOPS
  148. select RT_USING_SPI
  149. if BSP_USING_SOFT_SPI
  150. config BSP_USING_SOFT_SPI0
  151. bool "Enable SPI0 Bus (software simulation)"
  152. default n
  153. if BSP_USING_SOFT_SPI0
  154. config BSP_S_SPI0_SCK_PIN
  155. int "spi0 sck pin number (GP)"
  156. range 0 28
  157. default 6
  158. config BSP_S_SPI0_MOSI_PIN
  159. int "spi0 mosi pin number (GP)"
  160. range 0 28
  161. default 7
  162. config BSP_S_SPI0_MISO_PIN
  163. int "spi0 miso pin number (GP)"
  164. range 0 28
  165. default 4
  166. endif
  167. config BSP_USING_SOFT_SPI1
  168. bool "Enable SPI1 Bus (software simulation)"
  169. default n
  170. if BSP_USING_SOFT_SPI1
  171. config BSP_S_SPI1_SCK_PIN
  172. int "spi1 sck pin number (GP)"
  173. range 0 28
  174. default 10
  175. config BSP_S_SPI1_MOSI_PIN
  176. int "spi1 mosi pin number (GP)"
  177. range 0 28
  178. default 11
  179. config BSP_S_SPI1_MISO_PIN
  180. int "spi1 miso pin number (GP)"
  181. range 0 28
  182. default 12
  183. endif
  184. endif
  185. menuconfig BSP_USING_ADC
  186. bool "Enable ADC"
  187. default n
  188. select RT_USING_ADC
  189. if BSP_USING_ADC
  190. config BSP_USING_ADC0
  191. bool "Enable ADC0 (GP26)"
  192. default n
  193. config BSP_USING_ADC1
  194. bool "Enable ADC1 (GP27)"
  195. default n
  196. config BSP_USING_ADC2
  197. bool "Enable ADC2 (GP28)"
  198. default n
  199. endif
  200. config BSP_USING_WDT
  201. bool "Enable WDT"
  202. select RT_USING_WDT
  203. default n
  204. menuconfig BSP_USING_SPI
  205. bool "Enable SPI"
  206. select RT_USING_SPI
  207. default n
  208. if BSP_USING_SPI
  209. config BSP_USING_SPI0
  210. bool "Enable SPI0"
  211. default n
  212. if BSP_USING_SPI0
  213. choice
  214. prompt "spi0 tx pin number (GP)"
  215. depends on BSP_USING_SPI0
  216. default BSP_SPI0_TX_PIN_3
  217. config BSP_SPI0_TX_PIN_3
  218. bool "3"
  219. config BSP_SPI0_TX_PIN_7
  220. bool "7"
  221. config BSP_SPI0_TX_PIN_19
  222. bool "19"
  223. endchoice
  224. config BSP_SPI0_TX_PIN
  225. int
  226. default 3 if BSP_SPI0_TX_PIN_3
  227. default 7 if BSP_SPI0_TX_PIN_7
  228. default 19 if BSP_SPI0_TX_PIN_19
  229. choice
  230. prompt "spi0 rx pin number (GP)"
  231. depends on BSP_USING_SPI0
  232. default BSP_SPI0_RX_PIN_4
  233. config BSP_SPI0_RX_PIN_0
  234. bool "0"
  235. config BSP_SPI0_RX_PIN_4
  236. bool "4"
  237. config BSP_SPI0_RX_PIN_16
  238. bool "16"
  239. endchoice
  240. config BSP_SPI0_RX_PIN
  241. int
  242. default 0 if BSP_SPI0_RX_PIN_0
  243. default 4 if BSP_SPI0_RX_PIN_4
  244. default 16 if BSP_SPI0_RX_PIN_16
  245. choice
  246. prompt "spi0 sck pin number (GP)"
  247. depends on BSP_USING_SPI0
  248. default BSP_SPI0_SCK_PIN_2
  249. config BSP_SPI0_SCK_PIN_2
  250. bool "2"
  251. config BSP_SPI0_SCK_PIN_6
  252. bool "6"
  253. config BSP_SPI0_SCK_PIN_8
  254. bool "8"
  255. endchoice
  256. config BSP_SPI0_SCK_PIN
  257. int
  258. default 2 if BSP_SPI0_SCK_PIN_2
  259. default 6 if BSP_SPI0_SCK_PIN_6
  260. default 8 if BSP_SPI0_SCK_PIN_8
  261. choice
  262. prompt "spi0 cs pin number (GP)"
  263. depends on BSP_USING_SPI0
  264. default BSP_SPI0_CS_PIN_5
  265. config BSP_SPI0_CS_PIN_1
  266. bool "1"
  267. config BSP_SPI0_CS_PIN_5
  268. bool "5"
  269. config BSP_SPI0_CS_PIN_17
  270. bool "17"
  271. endchoice
  272. config BSP_SPI0_CS_PIN
  273. int
  274. default 1 if BSP_SPI0_CS_PIN_1
  275. default 5 if BSP_SPI0_CS_PIN_5
  276. default 17 if BSP_SPI0_CS_PIN_17
  277. endif
  278. config BSP_USING_SPI1
  279. bool "Enable SPI1"
  280. default n
  281. if BSP_USING_SPI1
  282. choice
  283. prompt "spi1 tx pin number (GP)"
  284. depends on BSP_USING_SPI1
  285. default BSP_SPI1_TX_PIN_11
  286. config BSP_SPI1_TX_PIN_11
  287. bool "11"
  288. config BSP_SPI1_TX_PIN_15
  289. bool "15"
  290. endchoice
  291. config BSP_SPI1_TX_PIN
  292. int
  293. default 11 if BSP_SPI1_TX_PIN_11
  294. default 15 if BSP_SPI1_TX_PIN_15
  295. choice
  296. prompt "spi1 rx pin number (GP)"
  297. depends on BSP_USING_SPI1
  298. default BSP_SPI1_RX_PIN_12
  299. config BSP_SPI1_RX_PIN_8
  300. bool "8"
  301. config BSP_SPI1_RX_PIN_12
  302. bool "12"
  303. endchoice
  304. config BSP_SPI1_RX_PIN
  305. int
  306. default 8 if BSP_SPI1_RX_PIN_8
  307. default 12 if BSP_SPI1_RX_PIN_12
  308. choice
  309. prompt "spi1 sck pin number (GP)"
  310. depends on BSP_USING_SPI0
  311. default BSP_SPI1_SCK_PIN_10
  312. config BSP_SPI1_SCK_PIN_10
  313. bool "10"
  314. config BSP_SPI1_SCK_PIN_14
  315. bool "14"
  316. endchoice
  317. config BSP_SPI1_SCK_PIN
  318. int
  319. default 10 if BSP_SPI1_SCK_PIN_10
  320. default 14 if BSP_SPI1_SCK_PIN_14
  321. choice
  322. prompt "spi1 cs pin number (GP)"
  323. depends on BSP_USING_SPI0
  324. default BSP_SPI1_CS_PIN_13
  325. config BSP_SPI1_CS_PIN_9
  326. bool "9"
  327. config BSP_SPI1_CS_PIN_13
  328. bool "13"
  329. endchoice
  330. config BSP_SPI1_CS_PIN
  331. int
  332. default 9 if BSP_SPI1_CS_PIN_9
  333. default 13 if BSP_SPI1_CS_PIN_13
  334. endif
  335. endif
  336. menuconfig BSP_USING_PWM
  337. bool "Enable PWM(A:CH_0 B:CH_1)"
  338. default n
  339. select RT_USING_PWM
  340. if BSP_USING_PWM
  341. config BSP_USING_PWM0
  342. bool "Enable PWM0"
  343. default n
  344. if BSP_USING_PWM0
  345. config BSP_PWM0_A_PIN
  346. int "pwm slice A pin number (GP)"
  347. range 0 29
  348. default 0
  349. config BSP_PWM0_B_PIN
  350. int "pwm slice B pin number (GP)"
  351. range 0 29
  352. default 1
  353. config BSP_PWM0_A_ALL
  354. bool "pwm slice use all A pin"
  355. default n
  356. config BSP_PWM0_B_ALL
  357. bool "pwm slice use all B pin"
  358. default n
  359. endif
  360. config BSP_USING_PWM1
  361. bool "Enable PWM1"
  362. default n
  363. if BSP_USING_PWM1
  364. config BSP_PWM_A_PIN
  365. int "pwm slice A pin number (GP)"
  366. range 0 29
  367. default 2
  368. config BSP_PWM1_B_PIN
  369. int "pwm slice B pin number (GP)"
  370. range 0 29
  371. default 3
  372. config BSP_PWM1_A_ALL
  373. bool "pwm slice use all A pin"
  374. default n
  375. config BSP_PWM1_B_ALL
  376. bool "pwm slice use all B pin"
  377. default n
  378. endif
  379. config BSP_USING_PWM2
  380. bool "Enable PWM2"
  381. default n
  382. if BSP_USING_PWM2
  383. config BSP_PWM2_A_PIN
  384. int "pwm slice A pin number (GP)"
  385. range 0 29
  386. default 4
  387. config BSP_PWM2_B_PIN
  388. int "pwm slice B pin number (GP)"
  389. range 0 29
  390. default 5
  391. config BSP_PWM2_A_ALL
  392. bool "pwm slice use all A pin"
  393. default n
  394. config BSP_PWM2_B_ALL
  395. bool "pwm slice use all B pin"
  396. default n
  397. endif
  398. config BSP_USING_PWM3
  399. bool "Enable PWM3"
  400. default n
  401. if BSP_USING_PWM3
  402. config BSP_PWM3_A_PIN
  403. int "pwm slice A pin number (GP)"
  404. range 0 29
  405. default 6
  406. config BSP_PWM3_B_PIN
  407. int "pwm slice B pin number (GP)"
  408. range 0 29
  409. default 7
  410. config BSP_PWM3_A_ALL
  411. bool "pwm slice use all A pin"
  412. default n
  413. config BSP_PWM3_B_ALL
  414. bool "pwm slice use all B pin"
  415. default n
  416. endif
  417. config BSP_USING_PWM4
  418. bool "Enable PWM4"
  419. default n
  420. if BSP_USING_PWM4
  421. config BSP_PWM4_A_PIN
  422. int "pwm slice A pin number (GP)"
  423. range 0 29
  424. default 8
  425. config BSP_PWM4_B_PIN
  426. int "pwm slice B pin number (GP)"
  427. range 0 29
  428. default 9
  429. config BSP_PWM4_A_ALL
  430. bool "pwm slice use all A pin"
  431. default n
  432. config BSP_PWM4_B_ALL
  433. bool "pwm slice use all B pin"
  434. default n
  435. endif
  436. config BSP_USING_PWM5
  437. bool "Enable PWM5"
  438. default n
  439. if BSP_USING_PWM5
  440. config BSP_PWM5_A_PIN
  441. int "pwm slice A pin number (GP)"
  442. range 0 29
  443. default 10
  444. config BSP_PWM5_B_PIN
  445. int "pwm slice B pin number (GP)"
  446. range 0 29
  447. default 11
  448. config BSP_PWM5_A_ALL
  449. bool "pwm slice use all A pin"
  450. default n
  451. config BSP_PWM5_B_ALL
  452. bool "pwm slice use all B pin"
  453. default n
  454. endif
  455. config BSP_USING_PWM6
  456. bool "Enable PWM6"
  457. default n
  458. if BSP_USING_PWM6
  459. config BSP_PWM6_A_PIN
  460. int "pwm slice A pin number (GP)"
  461. range 0 29
  462. default 12
  463. config BSP_PWM6_B_PIN
  464. int "pwm slice B pin number (GP)"
  465. range 0 29
  466. default 13
  467. config BSP_PWM6_A_ALL
  468. bool "pwm slice use all A pin"
  469. default n
  470. config BSP_PWM6_B_ALL
  471. bool "pwm slice use all B pin"
  472. default n
  473. endif
  474. config BSP_USING_PWM7
  475. bool "Enable PWM7"
  476. default n
  477. if BSP_USING_PWM7
  478. config BSP_PWM7_A_PIN
  479. int "pwm slice A pin number (GP)"
  480. range 0 29
  481. default 14
  482. config BSP_PWM7_B_PIN
  483. int "pwm slice B pin number (GP)"
  484. range 0 29
  485. default 15
  486. endif
  487. endif
  488. menuconfig BSP_USING_HWTIMER
  489. bool "Enable HWTIMER"
  490. default n
  491. select RT_USING_HWTIMER
  492. if BSP_USING_HWTIMER
  493. config BSP_USING_TIMER0
  494. bool "Enable HWTIMER0"
  495. default n
  496. config BSP_USING_TIMER1
  497. bool "Enable HWTIMER1"
  498. default n
  499. config BSP_USING_TIMER2
  500. bool "Enable HWTIMER2"
  501. default n
  502. config BSP_USING_TIMER3
  503. bool "Enable HWTIMER3"
  504. default n
  505. endif
  506. menuconfig BSP_USING_I2C
  507. bool "Enable I2C"
  508. select RT_USING_I2C
  509. select RT_USING_I2C_BITOPS
  510. select RT_USING_PIN
  511. default n
  512. if BSP_USING_I2C
  513. config BSP_USING_I2C0
  514. bool "Enable I2C0"
  515. default n
  516. if BSP_USING_I2C0
  517. choice
  518. prompt "i2c0 scl pin number (GP)"
  519. depends on BSP_USING_I2C0
  520. default BSP_I2C0_SCL_PIN_21
  521. config BSP_I2C0_SCL_PIN_1
  522. bool "1"
  523. config BSP_I2C0_SCL_PIN_5
  524. bool "5"
  525. config BSP_I2C0_SCL_PIN_9
  526. bool "9"
  527. config BSP_I2C0_SCL_PIN_13
  528. bool "13"
  529. config BSP_I2C0_SCL_PIN_17
  530. bool "17"
  531. config BSP_I2C0_SCL_PIN_21
  532. bool "21"
  533. endchoice
  534. config BSP_I2C0_SCL_PIN
  535. int
  536. default 1 if BSP_I2C0_SCL_PIN_1
  537. default 5 if BSP_I2C0_SCL_PIN_5
  538. default 9 if BSP_I2C0_SCL_PIN_9
  539. default 13 if BSP_I2C0_SCL_PIN_13
  540. default 17 if BSP_I2C0_SCL_PIN_17
  541. default 21 if BSP_I2C0_SCL_PIN_21
  542. choice
  543. prompt "i2c0 sda pin number (GP)"
  544. depends on BSP_USING_I2C0
  545. default BSP_I2C0_SDA_PIN_20
  546. config BSP_I2C0_SDA_PIN_0
  547. bool "0"
  548. config BSP_I2C0_SDA_PIN_4
  549. bool "4"
  550. config BSP_I2C0_SDA_PIN_8
  551. bool "8"
  552. config BSP_I2C0_SDA_PIN_12
  553. bool "12"
  554. config BSP_I2C0_SDA_PIN_16
  555. bool "16"
  556. config BSP_I2C0_SDA_PIN_20
  557. bool "20"
  558. endchoice
  559. config BSP_I2C0_SDA_PIN
  560. int
  561. default 0 if BSP_I2C0_SDA_PIN_0
  562. default 4 if BSP_I2C0_SDA_PIN_4
  563. default 8 if BSP_I2C0_SDA_PIN_8
  564. default 12 if BSP_I2C0_SDA_PIN_12
  565. default 16 if BSP_I2C0_SDA_PIN_16
  566. default 20 if BSP_I2C0_SDA_PIN_20
  567. endif
  568. config BSP_USING_I2C1
  569. bool "Enable I2C1"
  570. default n
  571. if BSP_USING_I2C1
  572. choice
  573. prompt "i2c1 scl pin number (GP)"
  574. depends on BSP_USING_I2C1
  575. config BSP_I2C1_SCL_PIN_3
  576. bool "3"
  577. config BSP_I2C1_SCL_PIN_7
  578. bool "7"
  579. config BSP_I2C1_SCL_PIN_11
  580. bool "11"
  581. config BSP_I2C1_SCL_PIN_15
  582. bool "15"
  583. config BSP_I2C1_SCL_PIN_19
  584. bool "19"
  585. config BSP_I2C1_SCL_PIN_27
  586. bool "27"
  587. endchoice
  588. config BSP_I2C1_SCL_PIN
  589. int
  590. default 3 if BSP_I2C1_SCL_PIN_3
  591. default 7 if BSP_I2C1_SCL_PIN_7
  592. default 11 if BSP_I2C1_SCL_PIN_11
  593. default 15 if BSP_I2C1_SCL_PIN_15
  594. default 19 if BSP_I2C1_SCL_PIN_19
  595. default 27 if BSP_I2C1_SCL_PIN_27
  596. choice
  597. prompt "i2c1 sda pin number (GP)"
  598. depends on BSP_USING_I2C1
  599. config BSP_I2C1_SDA_PIN_2
  600. bool "2"
  601. config BSP_I2C1_SDA_PIN_6
  602. bool "6"
  603. config BSP_I2C1_SDA_PIN_10
  604. bool "10"
  605. config BSP_I2C1_SDA_PIN_14
  606. bool "14"
  607. config BSP_I2C1_SDA_PIN_18
  608. bool "18"
  609. config BSP_I2C1_SDA_PIN_26
  610. bool "26"
  611. endchoice
  612. config BSP_I2C1_SDA_PIN
  613. int
  614. default 2 if BSP_I2C1_SDA_PIN_2
  615. default 6 if BSP_I2C1_SDA_PIN_6
  616. default 10 if BSP_I2C1_SDA_PIN_10
  617. default 14 if BSP_I2C1_SDA_PIN_14
  618. default 18 if BSP_I2C1_SDA_PIN_18
  619. default 26 if BSP_I2C1_SDA_PIN_26
  620. endif
  621. endif
  622. endmenu
  623. endmenu