Kconfig 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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. config BSP_USING_SPI1
  213. bool "Enable SPI1"
  214. default n
  215. endif
  216. menuconfig BSP_USING_PWM
  217. bool "Enable PWM(A:CH_0 B:CH_1)"
  218. default n
  219. select RT_USING_PWM
  220. if BSP_USING_PWM
  221. config BSP_USING_PWM0
  222. bool "Enable PWM0"
  223. default n
  224. if BSP_USING_PWM0
  225. config BSP_PWM0_A_PIN
  226. int "pwm slice A pin number (GP)"
  227. range 0 29
  228. default 0
  229. config BSP_PWM0_B_PIN
  230. int "pwm slice B pin number (GP)"
  231. range 0 29
  232. default 1
  233. config BSP_PWM0_A_ALL
  234. bool "pwm slice use all A pin"
  235. default n
  236. config BSP_PWM0_B_ALL
  237. bool "pwm slice use all B pin"
  238. default n
  239. endif
  240. config BSP_USING_PWM1
  241. bool "Enable PWM1"
  242. default n
  243. if BSP_USING_PWM1
  244. config BSP_PWM_A_PIN
  245. int "pwm slice A pin number (GP)"
  246. range 0 29
  247. default 2
  248. config BSP_PWM1_B_PIN
  249. int "pwm slice B pin number (GP)"
  250. range 0 29
  251. default 3
  252. config BSP_PWM1_A_ALL
  253. bool "pwm slice use all A pin"
  254. default n
  255. config BSP_PWM1_B_ALL
  256. bool "pwm slice use all B pin"
  257. default n
  258. endif
  259. config BSP_USING_PWM2
  260. bool "Enable PWM2"
  261. default n
  262. if BSP_USING_PWM2
  263. config BSP_PWM2_A_PIN
  264. int "pwm slice A pin number (GP)"
  265. range 0 29
  266. default 4
  267. config BSP_PWM2_B_PIN
  268. int "pwm slice B pin number (GP)"
  269. range 0 29
  270. default 5
  271. config BSP_PWM2_A_ALL
  272. bool "pwm slice use all A pin"
  273. default n
  274. config BSP_PWM2_B_ALL
  275. bool "pwm slice use all B pin"
  276. default n
  277. endif
  278. config BSP_USING_PWM3
  279. bool "Enable PWM3"
  280. default n
  281. if BSP_USING_PWM3
  282. config BSP_PWM3_A_PIN
  283. int "pwm slice A pin number (GP)"
  284. range 0 29
  285. default 6
  286. config BSP_PWM3_B_PIN
  287. int "pwm slice B pin number (GP)"
  288. range 0 29
  289. default 7
  290. config BSP_PWM3_A_ALL
  291. bool "pwm slice use all A pin"
  292. default n
  293. config BSP_PWM3_B_ALL
  294. bool "pwm slice use all B pin"
  295. default n
  296. endif
  297. config BSP_USING_PWM4
  298. bool "Enable PWM4"
  299. default n
  300. if BSP_USING_PWM4
  301. config BSP_PWM4_A_PIN
  302. int "pwm slice A pin number (GP)"
  303. range 0 29
  304. default 8
  305. config BSP_PWM4_B_PIN
  306. int "pwm slice B pin number (GP)"
  307. range 0 29
  308. default 9
  309. config BSP_PWM4_A_ALL
  310. bool "pwm slice use all A pin"
  311. default n
  312. config BSP_PWM4_B_ALL
  313. bool "pwm slice use all B pin"
  314. default n
  315. endif
  316. config BSP_USING_PWM5
  317. bool "Enable PWM5"
  318. default n
  319. if BSP_USING_PWM5
  320. config BSP_PWM5_A_PIN
  321. int "pwm slice A pin number (GP)"
  322. range 0 29
  323. default 10
  324. config BSP_PWM5_B_PIN
  325. int "pwm slice B pin number (GP)"
  326. range 0 29
  327. default 11
  328. config BSP_PWM5_A_ALL
  329. bool "pwm slice use all A pin"
  330. default n
  331. config BSP_PWM5_B_ALL
  332. bool "pwm slice use all B pin"
  333. default n
  334. endif
  335. config BSP_USING_PWM6
  336. bool "Enable PWM6"
  337. default n
  338. if BSP_USING_PWM6
  339. config BSP_PWM6_A_PIN
  340. int "pwm slice A pin number (GP)"
  341. range 0 29
  342. default 12
  343. config BSP_PWM6_B_PIN
  344. int "pwm slice B pin number (GP)"
  345. range 0 29
  346. default 13
  347. config BSP_PWM6_A_ALL
  348. bool "pwm slice use all A pin"
  349. default n
  350. config BSP_PWM6_B_ALL
  351. bool "pwm slice use all B pin"
  352. default n
  353. endif
  354. config BSP_USING_PWM7
  355. bool "Enable PWM7"
  356. default n
  357. if BSP_USING_PWM7
  358. config BSP_PWM7_A_PIN
  359. int "pwm slice A pin number (GP)"
  360. range 0 29
  361. default 14
  362. config BSP_PWM7_B_PIN
  363. int "pwm slice B pin number (GP)"
  364. range 0 29
  365. default 15
  366. endif
  367. endif
  368. menuconfig BSP_USING_I2C
  369. bool "Enable I2C"
  370. select RT_USING_I2C
  371. select RT_USING_I2C_BITOPS
  372. select RT_USING_PIN
  373. default n
  374. if BSP_USING_I2C
  375. config BSP_USING_I2C0
  376. bool "Enable I2C0"
  377. default n
  378. if BSP_USING_I2C0
  379. choice
  380. prompt "i2c0 scl pin number (GP)"
  381. depends on BSP_USING_I2C0
  382. default BSP_I2C0_SCL_PIN_21
  383. config BSP_I2C0_SCL_PIN_1
  384. bool "1"
  385. config BSP_I2C0_SCL_PIN_5
  386. bool "5"
  387. config BSP_I2C0_SCL_PIN_9
  388. bool "9"
  389. config BSP_I2C0_SCL_PIN_13
  390. bool "13"
  391. config BSP_I2C0_SCL_PIN_17
  392. bool "17"
  393. config BSP_I2C0_SCL_PIN_21
  394. bool "21"
  395. endchoice
  396. config BSP_I2C0_SCL_PIN
  397. int
  398. default 1 if BSP_I2C0_SCL_PIN_1
  399. default 5 if BSP_I2C0_SCL_PIN_5
  400. default 9 if BSP_I2C0_SCL_PIN_9
  401. default 13 if BSP_I2C0_SCL_PIN_13
  402. default 17 if BSP_I2C0_SCL_PIN_17
  403. default 21 if BSP_I2C0_SCL_PIN_21
  404. choice
  405. prompt "i2c0 sda pin number (GP)"
  406. depends on BSP_USING_I2C0
  407. default BSP_I2C0_SDA_PIN_20
  408. config BSP_I2C0_SDA_PIN_0
  409. bool "0"
  410. config BSP_I2C0_SDA_PIN_4
  411. bool "4"
  412. config BSP_I2C0_SDA_PIN_8
  413. bool "8"
  414. config BSP_I2C0_SDA_PIN_12
  415. bool "12"
  416. config BSP_I2C0_SDA_PIN_16
  417. bool "16"
  418. config BSP_I2C0_SDA_PIN_20
  419. bool "20"
  420. endchoice
  421. config BSP_I2C0_SDA_PIN
  422. int
  423. default 0 if BSP_I2C0_SDA_PIN_0
  424. default 4 if BSP_I2C0_SDA_PIN_4
  425. default 8 if BSP_I2C0_SDA_PIN_8
  426. default 12 if BSP_I2C0_SDA_PIN_12
  427. default 16 if BSP_I2C0_SDA_PIN_16
  428. default 20 if BSP_I2C0_SDA_PIN_20
  429. endif
  430. config BSP_USING_I2C1
  431. bool "Enable I2C1"
  432. default n
  433. if BSP_USING_I2C1
  434. choice
  435. prompt "i2c1 scl pin number (GP)"
  436. depends on BSP_USING_I2C1
  437. config BSP_I2C1_SCL_PIN_3
  438. bool "3"
  439. config BSP_I2C1_SCL_PIN_7
  440. bool "7"
  441. config BSP_I2C1_SCL_PIN_11
  442. bool "11"
  443. config BSP_I2C1_SCL_PIN_15
  444. bool "15"
  445. config BSP_I2C1_SCL_PIN_19
  446. bool "19"
  447. config BSP_I2C1_SCL_PIN_27
  448. bool "27"
  449. endchoice
  450. config BSP_I2C1_SCL_PIN
  451. int
  452. default 3 if BSP_I2C1_SCL_PIN_3
  453. default 7 if BSP_I2C1_SCL_PIN_7
  454. default 11 if BSP_I2C1_SCL_PIN_11
  455. default 15 if BSP_I2C1_SCL_PIN_15
  456. default 19 if BSP_I2C1_SCL_PIN_19
  457. default 27 if BSP_I2C1_SCL_PIN_27
  458. choice
  459. prompt "i2c1 sda pin number (GP)"
  460. depends on BSP_USING_I2C1
  461. config BSP_I2C1_SDA_PIN_2
  462. bool "2"
  463. config BSP_I2C1_SDA_PIN_6
  464. bool "6"
  465. config BSP_I2C1_SDA_PIN_10
  466. bool "10"
  467. config BSP_I2C1_SDA_PIN_14
  468. bool "14"
  469. config BSP_I2C1_SDA_PIN_18
  470. bool "18"
  471. config BSP_I2C1_SDA_PIN_26
  472. bool "26"
  473. endchoice
  474. config BSP_I2C1_SDA_PIN
  475. int
  476. default 2 if BSP_I2C1_SDA_PIN_2
  477. default 6 if BSP_I2C1_SDA_PIN_6
  478. default 10 if BSP_I2C1_SDA_PIN_10
  479. default 14 if BSP_I2C1_SDA_PIN_14
  480. default 18 if BSP_I2C1_SDA_PIN_18
  481. default 26 if BSP_I2C1_SDA_PIN_26
  482. endif
  483. endif
  484. endmenu
  485. endmenu