From 955b8d9ae38f15bb5574348854cbaeaba7a4d6f5 Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Mon, 22 Aug 2022 13:40:27 -0400 Subject: [PATCH] [bsp] update esp32 Kconfig (#6218) --- bsp/ESP32_C3/.config | 25 ++++++++++++++++++++++--- bsp/ESP32_C3/Kconfig | 4 +--- bsp/ESP32_C3/{board => drivers}/Kconfig | 13 ++++++++----- bsp/ESP32_C3/rtconfig.h | 14 ++++++++++++-- 4 files changed, 43 insertions(+), 13 deletions(-) rename bsp/ESP32_C3/{board => drivers}/Kconfig (93%) diff --git a/bsp/ESP32_C3/.config b/bsp/ESP32_C3/.config index 6ad0fb6b9f..e39503d2c9 100644 --- a/bsp/ESP32_C3/.config +++ b/bsp/ESP32_C3/.config @@ -73,7 +73,9 @@ CONFIG_RT_VER_NUM=0x40101 # RT-Thread Components # CONFIG_RT_USING_COMPONENTS_INIT=y -# CONFIG_RT_USING_USER_MAIN is not set +CONFIG_RT_USING_USER_MAIN=y +CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 +CONFIG_RT_MAIN_THREAD_PRIORITY=10 # CONFIG_RT_USING_LEGACY is not set CONFIG_RT_USING_MSH=y CONFIG_RT_USING_FINSH=y @@ -301,6 +303,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_RAPIDJSON is not set # CONFIG_PKG_USING_JSMN is not set # CONFIG_PKG_USING_AGILE_JSMN is not set +# CONFIG_PKG_USING_PARSON is not set # # XML: Extensible Markup Language @@ -438,6 +441,10 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_MODBUS is not set # CONFIG_PKG_USING_RTDUINO is not set +CONFIG_PKG_USING_FREERTOS_WRAPPER=y +CONFIG_PKG_FREERTOS_WRAPPER_PATH="/packages/system/FreeRTOS_Wrapper" +CONFIG_PKG_USING_FREERTOS_WRAPPER_LATEST_VERSION=y +CONFIG_PKG_FREERTOS_WRAPPER_VER="latest" # CONFIG_PKG_USING_CAIRO is not set # CONFIG_PKG_USING_PIXMAN is not set # CONFIG_PKG_USING_PARTITION is not set @@ -479,8 +486,13 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_SHT3X is not set +# 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_ESP_IDF=y +CONFIG_PKG_ESP_IDF_PATH="/packages/peripherals/ESP-IDF" +CONFIG_PKG_USING_ESP_IDF_LATEST_VERSION=y +CONFIG_PKG_ESP_IDF_VER="latest" # CONFIG_PKG_USING_ICM20608 is not set # CONFIG_PKG_USING_BUTTON is not set # CONFIG_PKG_USING_PCF8574 is not set @@ -492,6 +504,11 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_NRF5X_SDK is not set # CONFIG_PKG_USING_NRFX is not set # CONFIG_PKG_USING_WM_LIBRARIES is not set + +# +# Kendryte SDK +# +# CONFIG_PKG_USING_K210_SDK is not set # CONFIG_PKG_USING_KENDRYTE_SDK is not set # CONFIG_PKG_USING_INFRARED is not set # CONFIG_PKG_USING_MULTI_INFRARED is not set @@ -552,6 +569,8 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_MB85RS16 is not set # 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 @@ -627,12 +646,12 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 # CONFIG_PKG_USING_MFBD is not set # CONFIG_PKG_USING_SLCAN2RTT is not set # CONFIG_PKG_USING_SOEM is not set +CONFIG_SOC_ESPRESSIF=y +CONFIG_SOC_ESP32_C3=y # # Hardware Drivers Config # -CONFIG_SOC_ESP32_C3=y -CONFIG_SOC_ESPRESSIF=y CONFIG_BSP_BOARD_LUATOS_ESP32C3=y # CONFIG_BSP_BOARD_HX_EXP32C3 is not set diff --git a/bsp/ESP32_C3/Kconfig b/bsp/ESP32_C3/Kconfig index ad41dd5a0b..c481f04670 100644 --- a/bsp/ESP32_C3/Kconfig +++ b/bsp/ESP32_C3/Kconfig @@ -14,9 +14,7 @@ config PKGS_DIR string option env="PKGS_ROOT" default "packages" - source "$RTT_DIR/Kconfig" source "$PKGS_DIR/Kconfig" -source "board/Kconfig" - +source "drivers/Kconfig" diff --git a/bsp/ESP32_C3/board/Kconfig b/bsp/ESP32_C3/drivers/Kconfig similarity index 93% rename from bsp/ESP32_C3/board/Kconfig rename to bsp/ESP32_C3/drivers/Kconfig index 84b5b742e4..fe413502f2 100644 --- a/bsp/ESP32_C3/board/Kconfig +++ b/bsp/ESP32_C3/drivers/Kconfig @@ -1,13 +1,16 @@ -menu "Hardware Drivers Config" + +config SOC_ESPRESSIF + bool config SOC_ESP32_C3 bool + select SOC_ESPRESSIF select RT_USING_COMPONENTS_INIT + select RT_USING_USER_MAIN + select PKG_USING_ESP_IDF default y - -config SOC_ESPRESSIF - bool - default y + +menu "Hardware Drivers Config" choice prompt "Select BSP board " diff --git a/bsp/ESP32_C3/rtconfig.h b/bsp/ESP32_C3/rtconfig.h index dfad290077..838a952b36 100644 --- a/bsp/ESP32_C3/rtconfig.h +++ b/bsp/ESP32_C3/rtconfig.h @@ -42,6 +42,9 @@ /* RT-Thread Components */ #define RT_USING_COMPONENTS_INIT +#define RT_USING_USER_MAIN +#define RT_MAIN_THREAD_STACK_SIZE 2048 +#define RT_MAIN_THREAD_PRIORITY 10 #define RT_USING_MSH #define RT_USING_FINSH #define FINSH_USING_MSH @@ -142,9 +145,16 @@ /* Micrium: Micrium software products porting for RT-Thread */ +#define PKG_USING_FREERTOS_WRAPPER +#define PKG_USING_FREERTOS_WRAPPER_LATEST_VERSION /* peripheral libraries and drivers */ +#define PKG_USING_ESP_IDF +#define PKG_USING_ESP_IDF_LATEST_VERSION + +/* Kendryte SDK */ + /* AI packages */ @@ -158,11 +168,11 @@ /* entertainment: terminal games and other interesting software packages */ +#define SOC_ESPRESSIF +#define SOC_ESP32_C3 /* Hardware Drivers Config */ -#define SOC_ESP32_C3 -#define SOC_ESPRESSIF #define BSP_BOARD_LUATOS_ESP32C3 /* Onboard Peripheral Drivers */