From 16ceacda801d79871a86eac0711e18648cddfe4f Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 3 Aug 2022 20:13:40 -0400 Subject: [PATCH] =?UTF-8?q?[k210]=20=E8=B0=83=E6=95=B4Kconfig=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/k210/.config | 6 +++-- bsp/k210/Kconfig | 12 +--------- bsp/k210/{driver => drivers}/Kconfig | 22 ++++++++++++++----- bsp/k210/{driver => drivers}/SConscript | 0 bsp/k210/{driver => drivers}/board.c | 0 bsp/k210/{driver => drivers}/board.h | 0 .../{driver => drivers}/camera/SConscript | 0 .../{driver => drivers}/camera/drv_ov5640.c | 0 .../{driver => drivers}/camera/drv_ov5640.h | 0 .../{driver => drivers}/camera/ov5640af.h | 0 .../{driver => drivers}/camera/ov5640cfg.h | 0 bsp/k210/{driver => drivers}/dmalock.c | 0 bsp/k210/{driver => drivers}/dmalock.h | 0 bsp/k210/{driver => drivers}/drv_gpio.c | 0 bsp/k210/{driver => drivers}/drv_gpio.h | 0 bsp/k210/{driver => drivers}/drv_interrupt.c | 0 bsp/k210/{driver => drivers}/drv_io_config.c | 0 bsp/k210/{driver => drivers}/drv_io_config.h | 0 bsp/k210/{driver => drivers}/drv_lcd.c | 0 bsp/k210/{driver => drivers}/drv_lcd.h | 0 bsp/k210/{driver => drivers}/drv_mpylcd.c | 0 bsp/k210/{driver => drivers}/drv_spi.c | 0 bsp/k210/{driver => drivers}/drv_spi.h | 0 bsp/k210/{driver => drivers}/drv_uart.c | 0 bsp/k210/{driver => drivers}/drv_uart.h | 0 bsp/k210/{driver => drivers}/heap.c | 0 bsp/k210/rtconfig.h | 3 ++- 27 files changed, 24 insertions(+), 19 deletions(-) rename bsp/k210/{driver => drivers}/Kconfig (94%) rename bsp/k210/{driver => drivers}/SConscript (100%) rename bsp/k210/{driver => drivers}/board.c (100%) rename bsp/k210/{driver => drivers}/board.h (100%) rename bsp/k210/{driver => drivers}/camera/SConscript (100%) rename bsp/k210/{driver => drivers}/camera/drv_ov5640.c (100%) rename bsp/k210/{driver => drivers}/camera/drv_ov5640.h (100%) rename bsp/k210/{driver => drivers}/camera/ov5640af.h (100%) rename bsp/k210/{driver => drivers}/camera/ov5640cfg.h (100%) rename bsp/k210/{driver => drivers}/dmalock.c (100%) rename bsp/k210/{driver => drivers}/dmalock.h (100%) rename bsp/k210/{driver => drivers}/drv_gpio.c (100%) rename bsp/k210/{driver => drivers}/drv_gpio.h (100%) rename bsp/k210/{driver => drivers}/drv_interrupt.c (100%) rename bsp/k210/{driver => drivers}/drv_io_config.c (100%) rename bsp/k210/{driver => drivers}/drv_io_config.h (100%) rename bsp/k210/{driver => drivers}/drv_lcd.c (100%) rename bsp/k210/{driver => drivers}/drv_lcd.h (100%) rename bsp/k210/{driver => drivers}/drv_mpylcd.c (100%) rename bsp/k210/{driver => drivers}/drv_spi.c (100%) rename bsp/k210/{driver => drivers}/drv_spi.h (100%) rename bsp/k210/{driver => drivers}/drv_uart.c (100%) rename bsp/k210/{driver => drivers}/drv_uart.h (100%) rename bsp/k210/{driver => drivers}/heap.c (100%) diff --git a/bsp/k210/.config b/bsp/k210/.config index 89003a5d0b..1801b39a62 100644 --- a/bsp/k210/.config +++ b/bsp/k210/.config @@ -578,7 +578,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y # CONFIG_PKG_USING_ADT74XX is not set # CONFIG_PKG_USING_AS7341 is not set # CONFIG_PKG_USING_STM32_SDIO is not set -# CONFIG_PKG_USING_RTT_ESP_IDF is not set +# CONFIG_PKG_USING_ESP_IDF is not set # CONFIG_PKG_USING_ICM20608 is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set @@ -592,7 +592,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y # CONFIG_PKG_USING_WM_LIBRARIES is not set # -# kendryte-sdk: Kendryte SDK +# Kendryte SDK # CONFIG_PKG_USING_K210_SDK=y CONFIG_PKG_K210_SDK_PATH="/packages/peripherals/kendryte-sdk/K210-SDK" @@ -660,6 +660,7 @@ CONFIG_PKG_K210_SDK_VER="latest" # CONFIG_PKG_USING_CW2015 is not set # CONFIG_PKG_USING_RFM300 is not set # CONFIG_PKG_USING_IO_INPUT_FILTER is not set +# CONFIG_PKG_USING_RASPBERRYPI_PICO_SDK is not set # # AI packages @@ -735,6 +736,7 @@ CONFIG_PKG_K210_SDK_VER="latest" # CONFIG_PKG_USING_MFBD is not set # CONFIG_PKG_USING_SLCAN2RTT is not set # CONFIG_PKG_USING_SOEM is not set +CONFIG_SOC_K210=y CONFIG_BOARD_K210_EVB=y # diff --git a/bsp/k210/Kconfig b/bsp/k210/Kconfig index 615dfd2f91..438fd71df1 100644 --- a/bsp/k210/Kconfig +++ b/bsp/k210/Kconfig @@ -17,17 +17,7 @@ config PKGS_DIR source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" - -config BOARD_K210_EVB - bool - select ARCH_RISCV64 - select ARCH_RISCV_FPU_S - select RT_USING_COMPONENTS_INIT - select RT_USING_USER_MAIN - select PKG_USING_K210_SDK - default y - -source "driver/Kconfig" +source "drivers/Kconfig" config __STACKSIZE__ int "stack size for interrupt" diff --git a/bsp/k210/driver/Kconfig b/bsp/k210/drivers/Kconfig similarity index 94% rename from bsp/k210/driver/Kconfig rename to bsp/k210/drivers/Kconfig index abca41be45..bb326a1f92 100644 --- a/bsp/k210/driver/Kconfig +++ b/bsp/k210/drivers/Kconfig @@ -1,3 +1,16 @@ +config SOC_K210 + bool + select ARCH_RISCV64 + select ARCH_RISCV_FPU_S + select PKG_USING_K210_SDK + +config BOARD_K210_EVB + bool + select SOC_K210 + select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + default y + menu "Hardware Drivers Config" config BSP_USING_UART_HS @@ -58,17 +71,17 @@ if BSP_USING_SPI1 default n config BSP_SPI1_CLK_PIN int "spi1 clk pin number" - default 29 + default 29 config BSP_SPI1_D0_PIN int "spi1 d0 pin number" - default 30 + default 30 config BSP_SPI1_D1_PIN int "spi1 d1 pin number" - default 31 + default 31 if BSP_USING_SPI1_AS_QSPI config BSP_SPI1_D2_PIN int "spi1 d2 pin number" - default 32 + default 32 config BSP_SPI1_D3_PIN int "spi1 d3 pin number" default 33 @@ -199,4 +212,3 @@ if BSP_USING_CAMERA endif endmenu - diff --git a/bsp/k210/driver/SConscript b/bsp/k210/drivers/SConscript similarity index 100% rename from bsp/k210/driver/SConscript rename to bsp/k210/drivers/SConscript diff --git a/bsp/k210/driver/board.c b/bsp/k210/drivers/board.c similarity index 100% rename from bsp/k210/driver/board.c rename to bsp/k210/drivers/board.c diff --git a/bsp/k210/driver/board.h b/bsp/k210/drivers/board.h similarity index 100% rename from bsp/k210/driver/board.h rename to bsp/k210/drivers/board.h diff --git a/bsp/k210/driver/camera/SConscript b/bsp/k210/drivers/camera/SConscript similarity index 100% rename from bsp/k210/driver/camera/SConscript rename to bsp/k210/drivers/camera/SConscript diff --git a/bsp/k210/driver/camera/drv_ov5640.c b/bsp/k210/drivers/camera/drv_ov5640.c similarity index 100% rename from bsp/k210/driver/camera/drv_ov5640.c rename to bsp/k210/drivers/camera/drv_ov5640.c diff --git a/bsp/k210/driver/camera/drv_ov5640.h b/bsp/k210/drivers/camera/drv_ov5640.h similarity index 100% rename from bsp/k210/driver/camera/drv_ov5640.h rename to bsp/k210/drivers/camera/drv_ov5640.h diff --git a/bsp/k210/driver/camera/ov5640af.h b/bsp/k210/drivers/camera/ov5640af.h similarity index 100% rename from bsp/k210/driver/camera/ov5640af.h rename to bsp/k210/drivers/camera/ov5640af.h diff --git a/bsp/k210/driver/camera/ov5640cfg.h b/bsp/k210/drivers/camera/ov5640cfg.h similarity index 100% rename from bsp/k210/driver/camera/ov5640cfg.h rename to bsp/k210/drivers/camera/ov5640cfg.h diff --git a/bsp/k210/driver/dmalock.c b/bsp/k210/drivers/dmalock.c similarity index 100% rename from bsp/k210/driver/dmalock.c rename to bsp/k210/drivers/dmalock.c diff --git a/bsp/k210/driver/dmalock.h b/bsp/k210/drivers/dmalock.h similarity index 100% rename from bsp/k210/driver/dmalock.h rename to bsp/k210/drivers/dmalock.h diff --git a/bsp/k210/driver/drv_gpio.c b/bsp/k210/drivers/drv_gpio.c similarity index 100% rename from bsp/k210/driver/drv_gpio.c rename to bsp/k210/drivers/drv_gpio.c diff --git a/bsp/k210/driver/drv_gpio.h b/bsp/k210/drivers/drv_gpio.h similarity index 100% rename from bsp/k210/driver/drv_gpio.h rename to bsp/k210/drivers/drv_gpio.h diff --git a/bsp/k210/driver/drv_interrupt.c b/bsp/k210/drivers/drv_interrupt.c similarity index 100% rename from bsp/k210/driver/drv_interrupt.c rename to bsp/k210/drivers/drv_interrupt.c diff --git a/bsp/k210/driver/drv_io_config.c b/bsp/k210/drivers/drv_io_config.c similarity index 100% rename from bsp/k210/driver/drv_io_config.c rename to bsp/k210/drivers/drv_io_config.c diff --git a/bsp/k210/driver/drv_io_config.h b/bsp/k210/drivers/drv_io_config.h similarity index 100% rename from bsp/k210/driver/drv_io_config.h rename to bsp/k210/drivers/drv_io_config.h diff --git a/bsp/k210/driver/drv_lcd.c b/bsp/k210/drivers/drv_lcd.c similarity index 100% rename from bsp/k210/driver/drv_lcd.c rename to bsp/k210/drivers/drv_lcd.c diff --git a/bsp/k210/driver/drv_lcd.h b/bsp/k210/drivers/drv_lcd.h similarity index 100% rename from bsp/k210/driver/drv_lcd.h rename to bsp/k210/drivers/drv_lcd.h diff --git a/bsp/k210/driver/drv_mpylcd.c b/bsp/k210/drivers/drv_mpylcd.c similarity index 100% rename from bsp/k210/driver/drv_mpylcd.c rename to bsp/k210/drivers/drv_mpylcd.c diff --git a/bsp/k210/driver/drv_spi.c b/bsp/k210/drivers/drv_spi.c similarity index 100% rename from bsp/k210/driver/drv_spi.c rename to bsp/k210/drivers/drv_spi.c diff --git a/bsp/k210/driver/drv_spi.h b/bsp/k210/drivers/drv_spi.h similarity index 100% rename from bsp/k210/driver/drv_spi.h rename to bsp/k210/drivers/drv_spi.h diff --git a/bsp/k210/driver/drv_uart.c b/bsp/k210/drivers/drv_uart.c similarity index 100% rename from bsp/k210/driver/drv_uart.c rename to bsp/k210/drivers/drv_uart.c diff --git a/bsp/k210/driver/drv_uart.h b/bsp/k210/drivers/drv_uart.h similarity index 100% rename from bsp/k210/driver/drv_uart.h rename to bsp/k210/drivers/drv_uart.h diff --git a/bsp/k210/driver/heap.c b/bsp/k210/drivers/heap.c similarity index 100% rename from bsp/k210/driver/heap.c rename to bsp/k210/drivers/heap.c diff --git a/bsp/k210/rtconfig.h b/bsp/k210/rtconfig.h index 86b5d3676f..2fa1559359 100644 --- a/bsp/k210/rtconfig.h +++ b/bsp/k210/rtconfig.h @@ -216,7 +216,7 @@ /* peripheral libraries and drivers */ -/* kendryte-sdk: Kendryte SDK */ +/* Kendryte SDK */ #define PKG_USING_K210_SDK #define PKG_USING_K210_SDK_LATEST_VERSION @@ -233,6 +233,7 @@ /* entertainment: terminal games and other interesting software packages */ +#define SOC_K210 #define BOARD_K210_EVB /* Hardware Drivers Config */