Kconfig 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. menu "Hardware Drivers Config"
  2. config SOC_SERIES_GD32F4xx
  3. bool
  4. default y
  5. config SOC_GD32F450ZK
  6. bool
  7. select SOC_SERIES_GD32F4xx
  8. select RT_USING_COMPONENTS_INIT
  9. select RT_USING_USER_MAIN
  10. default y
  11. menu "Onboard Peripheral Drivers"
  12. endmenu
  13. menu "On-chip Peripheral Drivers"
  14. config BSP_USING_GPIO
  15. bool "Enable GPIO"
  16. select RT_USING_PIN
  17. default y
  18. menuconfig BSP_USING_UART
  19. bool "Enable UART"
  20. default y
  21. if BSP_USING_UART
  22. choice
  23. prompt "Select UART framework version"
  24. default BSP_USING_SERIAL_V1
  25. config BSP_USING_SERIAL_V1
  26. bool "Use Serial V1 framework"
  27. select RT_USING_SERIAL
  28. config BSP_USING_SERIAL_V2
  29. bool "Use Serial V2 framework"
  30. select RT_USING_SERIAL_V2
  31. endchoice
  32. menuconfig BSP_USING_UART0
  33. bool "Enable UART0"
  34. default y
  35. if BSP_USING_UART0
  36. config BSP_UART0_TX_PIN
  37. string "UART0 TX name, such as PA8"
  38. default "PA9"
  39. config BSP_UART0_RX_PIN
  40. string "UART0 RX name, such as PA9"
  41. default "PA10"
  42. config BSP_UART0_AFIO
  43. string "UART0 alternate function, such as AF7"
  44. default "AF1"
  45. if BSP_USING_SERIAL_V2
  46. config BSP_UART0_RX_USING_DMA
  47. bool "Enable UART0 RX DMA"
  48. depends on RT_SERIAL_USING_DMA
  49. default n
  50. config BSP_UART0_TX_USING_DMA
  51. bool "Enable UART0 TX DMA"
  52. depends on RT_SERIAL_USING_DMA
  53. default n
  54. config BSP_UART0_DMA_PING_BUFSIZE
  55. int "Set UART0 RX DMA ping-pong buffer size"
  56. range 16 65535
  57. depends on BSP_UART0_RX_USING_DMA
  58. default 64
  59. config BSP_UART0_RX_BUFSIZE
  60. int "Set UART0 RX buffer size"
  61. range 64 65535
  62. default 128
  63. config BSP_UART0_TX_BUFSIZE
  64. int "Set UART0 TX buffer size"
  65. range 0 65535
  66. default 128
  67. endif
  68. endif
  69. menuconfig BSP_USING_UART1
  70. bool "Enable UART1"
  71. default n
  72. if BSP_USING_UART1
  73. config BSP_UART1_TX_PIN
  74. string "UART1 TX name, such as PA8"
  75. default "PA2"
  76. config BSP_UART1_RX_PIN
  77. string "UART1 RX name, such as PA9"
  78. default "PA3"
  79. config BSP_UART1_AFIO
  80. string "UART1 alternate function, such as AF7"
  81. default "AF7"
  82. if BSP_USING_SERIAL_V2
  83. config BSP_UART1_RX_USING_DMA
  84. bool "Enable UART1 RX DMA"
  85. depends on RT_SERIAL_USING_DMA
  86. default n
  87. config BSP_UART1_TX_USING_DMA
  88. bool "Enable UART1 TX DMA"
  89. depends on RT_SERIAL_USING_DMA
  90. default n
  91. config BSP_UART1_DMA_PING_BUFSIZE
  92. int "Set UART1 RX DMA ping-pong buffer size"
  93. range 16 65535
  94. depends on BSP_UART1_RX_USING_DMA
  95. default 64
  96. config BSP_UART1_RX_BUFSIZE
  97. int "Set UART1 RX buffer size"
  98. range 64 65535
  99. default 128
  100. config BSP_UART1_TX_BUFSIZE
  101. int "Set UART1 TX buffer size"
  102. range 0 65535
  103. default 128
  104. endif
  105. endif
  106. menuconfig BSP_USING_UART2
  107. bool "Enable UART2"
  108. default n
  109. if BSP_USING_UART2
  110. config BSP_UART2_TX_PIN
  111. string "UART2 TX name, such as PA8"
  112. default "PB10"
  113. config BSP_UART2_RX_PIN
  114. string "UART2 RX name, such as PA9"
  115. default "PB11"
  116. config BSP_UART2_AFIO
  117. string "UART2 alternate function, such as AF7"
  118. default "AF7"
  119. if BSP_USING_SERIAL_V2
  120. config BSP_UART2_RX_USING_DMA
  121. bool "Enable UART2 RX DMA"
  122. depends on RT_SERIAL_USING_DMA
  123. default n
  124. config BSP_UART2_TX_USING_DMA
  125. bool "Enable UART2 TX DMA"
  126. depends on RT_SERIAL_USING_DMA
  127. default n
  128. config BSP_UART2_DMA_PING_BUFSIZE
  129. int "Set UART2 RX DMA ping-pong buffer size"
  130. range 16 65535
  131. depends on BSP_UART2_RX_USING_DMA
  132. default 64
  133. config BSP_UART2_RX_BUFSIZE
  134. int "Set UART2 RX buffer size"
  135. range 64 65535
  136. default 128
  137. config BSP_UART2_TX_BUFSIZE
  138. int "Set UART2 TX buffer size"
  139. range 0 65535
  140. default 128
  141. endif
  142. endif
  143. menuconfig BSP_USING_UART3
  144. bool "Enable UART3"
  145. default n
  146. if BSP_USING_UART3
  147. config BSP_UART3_TX_PIN
  148. string "UART3 TX name, such as PA8"
  149. default "PC10"
  150. config BSP_UART3_RX_PIN
  151. string "UART3 RX name, such as PA9"
  152. default "PC11"
  153. config BSP_UART3_AFIO
  154. string "UART3 alternate function, such as AF7"
  155. default "AF8"
  156. if BSP_USING_SERIAL_V2
  157. config BSP_UART3_RX_USING_DMA
  158. bool "Enable UART3 RX DMA"
  159. depends on RT_SERIAL_USING_DMA
  160. default n
  161. config BSP_UART3_TX_USING_DMA
  162. bool "Enable UART3 TX DMA"
  163. depends on RT_SERIAL_USING_DMA
  164. default n
  165. config BSP_UART3_DMA_PING_BUFSIZE
  166. int "Set UART3 RX DMA ping-pong buffer size"
  167. range 16 65535
  168. depends on BSP_UART3_RX_USING_DMA
  169. default 64
  170. config BSP_UART3_RX_BUFSIZE
  171. int "Set UART3 RX buffer size"
  172. range 64 65535
  173. default 128
  174. config BSP_UART3_TX_BUFSIZE
  175. int "Set UART3 TX buffer size"
  176. range 0 65535
  177. default 128
  178. endif
  179. endif
  180. endif
  181. menuconfig BSP_USING_SPI
  182. bool "Enable SPI BUS"
  183. default n
  184. select RT_USING_SPI
  185. if BSP_USING_SPI
  186. config BSP_USING_SPI1
  187. bool "Enable SPI1 BUS"
  188. default n
  189. config BSP_SPI1_TX_USING_DMA
  190. bool "Enable SPI1 TX DMA"
  191. depends on BSP_USING_SPI1
  192. default n
  193. config BSP_SPI1_RX_USING_DMA
  194. bool "Enable SPI1 RX DMA"
  195. depends on BSP_USING_SPI1
  196. select BSP_SPI1_TX_USING_DMA
  197. default n
  198. endif
  199. menuconfig BSP_USING_ADC
  200. bool "Enable ADC"
  201. default n
  202. select RT_USING_ADC
  203. if BSP_USING_ADC
  204. config BSP_USING_ADC0
  205. bool "Enable ADC0"
  206. default n
  207. config BSP_USING_ADC1
  208. bool "Enable ADC1"
  209. default n
  210. config BSP_USING_ADC2
  211. bool "Enable ADC2"
  212. default n
  213. endif
  214. menuconfig BSP_USING_TIM
  215. bool "Enable timer"
  216. default n
  217. select RT_USING_HWTIMER
  218. if BSP_USING_TIM
  219. config BSP_USING_TIM10
  220. bool "Enable TIM10"
  221. default n
  222. config BSP_USING_TIM11
  223. bool "Enable TIM11"
  224. default n
  225. config BSP_USING_TIM12
  226. bool "Enable TIM13"
  227. default n
  228. endif
  229. menuconfig BSP_USING_ONCHIP_RTC
  230. bool "Enable RTC"
  231. select RT_USING_RTC
  232. default n
  233. if BSP_USING_ONCHIP_RTC
  234. config BSP_USING_ALARM
  235. bool "Enable RTC alarm"
  236. select RT_USING_ALARM
  237. default n
  238. if BSP_USING_ALARM
  239. choice
  240. prompt "Select rtc alarm device"
  241. default BSP_USING_ALARM0
  242. config BSP_USING_ALARM0
  243. bool "Enable RTC Alarm0"
  244. config BSP_USING_ALARM1
  245. bool "Enable RTC Alarm1"
  246. endchoice
  247. endif
  248. endif
  249. config BSP_USING_WDT
  250. bool "Enable Watchdog Timer"
  251. select RT_USING_WDT
  252. default n
  253. config BSP_USING_SDIO
  254. bool "Enable SDIO"
  255. select RT_USING_SDIO
  256. select RT_USING_DFS
  257. default n
  258. config BSP_USING_USBD
  259. bool "Enable USB Device"
  260. select RT_USING_USB_DEVICE
  261. default n
  262. menuconfig BSP_USING_USBH
  263. bool "Enable USB Host"
  264. select RT_USING_USB_HOST
  265. default n
  266. if BSP_USING_USBH
  267. menuconfig RT_USBH_MSTORAGE
  268. bool "Enable Udisk Drivers"
  269. default n
  270. if RT_USBH_MSTORAGE
  271. config UDISK_MOUNTPOINT
  272. string "Udisk mount dir"
  273. default "/"
  274. endif
  275. endif
  276. menuconfig BSP_USING_CAN
  277. bool "Enable CAN BUS"
  278. default n
  279. select RT_USING_CAN
  280. select RT_USING_DEVICE_IPC
  281. if BSP_USING_CAN
  282. config BSP_USING_CAN0
  283. bool "Enable CAN0"
  284. default n
  285. if BSP_USING_CAN0
  286. choice
  287. prompt "Select CAN0 TX source"
  288. default BSP_CAN0_TX_PD1
  289. config BSP_CAN0_TX_PA12
  290. bool "GPIOA pin 12"
  291. config BSP_CAN0_TX_PB9
  292. bool "GPIOB pin 9"
  293. config BSP_CAN0_TX_PD1
  294. bool "GPIOD pin 1"
  295. config BSP_CAN0_TX_PH13
  296. bool "GPIOH pin 13"
  297. endchoice
  298. choice
  299. prompt "Select CAN0 RX source"
  300. default BSP_CAN0_RX_PD0
  301. config BSP_CAN0_RX_PA11
  302. bool "GPIOA pin 11"
  303. config BSP_CAN0_RX_PB8
  304. bool "GPIOB pin 8"
  305. config BSP_CAN0_RX_PD0
  306. bool "GPIOD pin 0"
  307. config BSP_CAN0_RX_PI9
  308. bool "GPIOI pin 9"
  309. endchoice
  310. endif
  311. config BSP_USING_CAN1
  312. bool "Enable CAN1"
  313. default n
  314. if BSP_USING_CAN1
  315. choice
  316. prompt "Select CAN1 TX source"
  317. default BSP_CAN1_TX_PB6
  318. config BSP_CAN1_TX_PB6
  319. bool "GPIOB pin 6"
  320. config BSP_CAN1_TX_PB13
  321. bool "GPIOB pin 13"
  322. endchoice
  323. choice
  324. prompt "Select CAN1 RX source"
  325. default BSP_CAN1_RX_PB5
  326. config BSP_CAN1_RX_PB5
  327. bool "GPIOB pin 5"
  328. config BSP_CAN1_RX_PI12
  329. bool "GPIOI pin 12"
  330. endchoice
  331. endif
  332. endif
  333. source "$(BSP_DIR)/../libraries/gd32_drivers/Kconfig"
  334. endmenu
  335. menu "Board extended module Drivers"
  336. endmenu
  337. endmenu