From 2fa4fa2c8a037146d09581a4c489c5e8e5ad5f1f Mon Sep 17 00:00:00 2001 From: Hao Zhu Date: Sun, 14 Apr 2019 14:20:07 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][stm32]=20=E4=BF=AE=E5=A4=8Dstm32f103-mini?= =?UTF-8?q?-system=E8=84=9A=E6=9C=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit menuconfig运行报错,少了两个endif --- bsp/stm32/stm32f103-mini-system/.config | 40 ++++++++----------- bsp/stm32/stm32f103-mini-system/board/Kconfig | 8 ++++ bsp/stm32/stm32f103-mini-system/rtconfig.h | 10 +++-- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/bsp/stm32/stm32f103-mini-system/.config b/bsp/stm32/stm32f103-mini-system/.config index 3a7b03410b..dd3b02a562 100644 --- a/bsp/stm32/stm32f103-mini-system/.config +++ b/bsp/stm32/stm32f103-mini-system/.config @@ -7,6 +7,7 @@ # RT-Thread Kernel # CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 # CONFIG_RT_THREAD_PRIORITY_8 is not set @@ -21,6 +22,7 @@ CONFIG_RT_IDEL_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=256 # CONFIG_RT_USING_TIMER_SOFT is not set CONFIG_RT_DEBUG=y +# CONFIG_RT_DEBUG_COLOR is not set # CONFIG_RT_DEBUG_INIT_CONFIG is not set # CONFIG_RT_DEBUG_THREAD_CONFIG is not set # CONFIG_RT_DEBUG_SCHEDULER_CONFIG is not set @@ -110,6 +112,7 @@ CONFIG_FINSH_ARG_MAX=10 # CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_PIPE_BUFSZ=512 +# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set CONFIG_RT_USING_SERIAL=y CONFIG_RT_SERIAL_USING_DMA=y CONFIG_RT_SERIAL_RB_BUFSZ=64 @@ -184,12 +187,6 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_RYM is not set # CONFIG_RT_USING_ULOG is not set # CONFIG_RT_USING_UTEST is not set - -# -# ARM CMSIS -# -# CONFIG_RT_USING_CMSIS_OS is not set -# CONFIG_RT_USING_RTT_CMSIS is not set # CONFIG_RT_USING_LWP is not set # @@ -201,7 +198,6 @@ CONFIG_RT_USING_PIN=y # # CONFIG_PKG_USING_PAHOMQTT is not set # CONFIG_PKG_USING_WEBCLIENT is not set -# CONFIG_PKG_USING_WEBNET is not set # CONFIG_PKG_USING_MONGOOSE is not set # CONFIG_PKG_USING_WEBTERMINAL is not set # CONFIG_PKG_USING_CJSON is not set @@ -227,7 +223,6 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set # CONFIG_PKG_USING_AT_DEVICE is not set -# CONFIG_PKG_USING_WIZNET is not set # # IoT Cloud @@ -236,7 +231,6 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_GAGENT_CLOUD is not set # CONFIG_PKG_USING_ALI_IOTKIT is not set # CONFIG_PKG_USING_AZURE is not set -# CONFIG_PKG_USING_TENCENT_IOTKIT is not set # # security packages @@ -265,9 +259,6 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_EASYFLASH is not set # CONFIG_PKG_USING_EASYLOGGER is not set # CONFIG_PKG_USING_SYSTEMVIEW is not set -# CONFIG_PKG_USING_RDB is not set -# CONFIG_PKG_USING_QRCODE is not set -# CONFIG_PKG_USING_ULOG_EASYFLASH is not set # # system packages @@ -281,24 +272,17 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_SQLITE is not set # CONFIG_PKG_USING_RTI is not set # CONFIG_PKG_USING_LITTLEVGL2RTT is not set -# CONFIG_PKG_USING_CMSIS is not set -# CONFIG_PKG_USING_DFS_YAFFS is not set -# CONFIG_PKG_USING_LITTLEFS is not set # # peripheral libraries and drivers # +# CONFIG_PKG_USING_STM32F4_HAL is not set +# CONFIG_PKG_USING_STM32F4_DRIVERS is not set # CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_AHT10 is not set # CONFIG_PKG_USING_AP3216C is not set # CONFIG_PKG_USING_STM32_SDIO is not set -# CONFIG_PKG_USING_ICM20608 is not set -# CONFIG_PKG_USING_U8G2 is not set -# CONFIG_PKG_USING_BUTTON is not set -# CONFIG_PKG_USING_MPU6XXX is not set -# CONFIG_PKG_USING_PCF8574 is not set -# CONFIG_PKG_USING_KENDRYTE_SDK is not set # # miscellaneous packages @@ -312,8 +296,10 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_CANFESTIVAL is not set # CONFIG_PKG_USING_ZLIB is not set # CONFIG_PKG_USING_DSTR is not set -# CONFIG_PKG_USING_TINYFRAME is not set -# CONFIG_PKG_USING_KENDRYTE_DEMO is not set + +# +# sample package +# # # samples: kernel and components samples @@ -322,8 +308,11 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set + +# +# example package: hello +# # CONFIG_PKG_USING_HELLO is not set -# CONFIG_PKG_USING_VI is not set CONFIG_SOC_FAMILY_STM32=y CONFIG_SOC_SERIES_STM32F1=y @@ -335,6 +324,7 @@ CONFIG_SOC_STM32F103C8=y # # Onboard Peripheral Drivers # +CONFIG_BSP_USING_USB_TO_USART=y # # On-chip Peripheral Drivers @@ -343,6 +333,8 @@ CONFIG_BSP_USING_GPIO=y CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART1=y CONFIG_BSP_UART1_RX_USING_DMA=y +# CONFIG_BSP_USING_SPI is not set +# CONFIG_BSP_USING_ADC is not set # # Board extended module Drivers diff --git a/bsp/stm32/stm32f103-mini-system/board/Kconfig b/bsp/stm32/stm32f103-mini-system/board/Kconfig index 320ab50b8a..108193a289 100644 --- a/bsp/stm32/stm32f103-mini-system/board/Kconfig +++ b/bsp/stm32/stm32f103-mini-system/board/Kconfig @@ -7,6 +7,12 @@ config SOC_STM32F103C8 menu "Onboard Peripheral Drivers" + config BSP_USING_USB_TO_USART + bool "Enable USB TO USART (uart1)" + select BSP_USING_UART + select BSP_USING_UART1 + default y + endmenu menu "On-chip Peripheral Drivers" @@ -29,6 +35,7 @@ menu "On-chip Peripheral Drivers" bool "Enable UART1 RX DMA" depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA default n + endif menuconfig BSP_USING_SPI bool "Enable SPI BUS" @@ -49,6 +56,7 @@ menu "On-chip Peripheral Drivers" depends on BSP_USING_SPI1 select BSP_SPI1_TX_USING_DMA default n + endif menuconfig BSP_USING_ADC bool "Enable ADC" diff --git a/bsp/stm32/stm32f103-mini-system/rtconfig.h b/bsp/stm32/stm32f103-mini-system/rtconfig.h index e587794e89..06db04dee8 100644 --- a/bsp/stm32/stm32f103-mini-system/rtconfig.h +++ b/bsp/stm32/stm32f103-mini-system/rtconfig.h @@ -110,9 +110,6 @@ /* Utilities */ -/* ARM CMSIS */ - - /* RT-Thread online packages */ /* IoT - internet of things */ @@ -150,8 +147,13 @@ /* miscellaneous packages */ +/* sample package */ + /* samples: kernel and components samples */ + +/* example package: hello */ + #define SOC_FAMILY_STM32 #define SOC_SERIES_STM32F1 @@ -161,6 +163,8 @@ /* Onboard Peripheral Drivers */ +#define BSP_USING_USB_TO_USART + /* On-chip Peripheral Drivers */ #define BSP_USING_GPIO