From 57036d8d4a5bbe15bd3b72c333abea0e3b78d59a Mon Sep 17 00:00:00 2001 From: jinsheng Date: Wed, 30 Jan 2019 20:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E9=BB=98=E8=AE=A4=E4=B8=8D?= =?UTF-8?q?=E5=90=AF=E5=8A=A8qspi=E9=A9=B1=E5=8A=A8=20N25@128?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/stm32f746-st-disco/.config | 17 +--- bsp/stm32/stm32f746-st-disco/README.md | 11 +-- bsp/stm32/stm32f746-st-disco/board/Kconfig | 2 +- bsp/stm32/stm32f746-st-disco/project.ewp | 14 +-- bsp/stm32/stm32f746-st-disco/project.uvprojx | 91 +------------------- bsp/stm32/stm32f746-st-disco/rtconfig.h | 8 -- 6 files changed, 17 insertions(+), 126 deletions(-) diff --git a/bsp/stm32/stm32f746-st-disco/.config b/bsp/stm32/stm32f746-st-disco/.config index a6b5775072..ce3efbd2ea 100644 --- a/bsp/stm32/stm32f746-st-disco/.config +++ b/bsp/stm32/stm32f746-st-disco/.config @@ -125,18 +125,7 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_PM is not set # CONFIG_RT_USING_RTC is not set # CONFIG_RT_USING_SDIO is not set -CONFIG_RT_USING_SPI=y -CONFIG_RT_USING_QSPI=y -# CONFIG_RT_USING_SPI_MSD is not set -CONFIG_RT_USING_SFUD=y -CONFIG_RT_SFUD_USING_SFDP=y -CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y -CONFIG_RT_SFUD_USING_QSPI=y -# CONFIG_RT_DEBUG_SFUD is not set -# CONFIG_RT_USING_W25QXX is not set -# CONFIG_RT_USING_GD is not set -# CONFIG_RT_USING_ENC28J60 is not set -# CONFIG_RT_USING_SPI_WIFI is not set +# CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set @@ -317,7 +306,7 @@ CONFIG_SOC_STM32F746NG=y # Onboard Peripheral Drivers # CONFIG_BSP_USING_USB_TO_USART=y -CONFIG_BSP_USING_QSPI_FLASH=y +# CONFIG_BSP_USING_QSPI_FLASH is not set # # On-chip Peripheral Drivers @@ -326,7 +315,7 @@ CONFIG_BSP_USING_GPIO=y CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART1=y # CONFIG_BSP_UART1_RX_USING_DMA is not set -CONFIG_BSP_USING_QSPI=y +# CONFIG_BSP_USING_QSPI is not set # # Board extended module Drivers diff --git a/bsp/stm32/stm32f746-st-disco/README.md b/bsp/stm32/stm32f746-st-disco/README.md index 65bce68fdd..92b731c29b 100644 --- a/bsp/stm32/stm32f746-st-disco/README.md +++ b/bsp/stm32/stm32f746-st-disco/README.md @@ -96,17 +96,14 @@ STM32F746-disco 是 ST 推出的一款基于 ARM Cortex-M7 内核的开发板, ```bash \ | / - RT - Thread Operating System - / | \ 4.0.0 build Jan 26 2019 + / | \ 4.0.0 build Jan 30 2019 2006 - 2018 Copyright by rt-thread team -[D/drv.qspi] qspi init succsee! -[SFUD] Find a Micron flash chip. Size is 16777216 bytes. -[SFUD] n25q128 flash device is initialize success. -[D/drv.qspi] qspi init succsee! -flash already enter qspi mode +msh > ``` + ### 进阶使用 -此 BSP 默认开启了 GPIO, 串口1, QSPI和SFUD的功能,更多高级功能,需要利用 ENV 工具对 BSP 进行配置,步骤如下: +此 BSP 默认只开启了 GPIO 和 串口1 的功能,更多高级功能,需要利用 ENV 工具对 BSP 进行配置,步骤如下: 1. 在 bsp 下打开 env 工具。 diff --git a/bsp/stm32/stm32f746-st-disco/board/Kconfig b/bsp/stm32/stm32f746-st-disco/board/Kconfig index a5e6f61905..ee295f7c3a 100644 --- a/bsp/stm32/stm32f746-st-disco/board/Kconfig +++ b/bsp/stm32/stm32f746-st-disco/board/Kconfig @@ -12,7 +12,7 @@ menu "Onboard Peripheral Drivers" select BSP_USING_UART1 default y config BSP_USING_QSPI_FLASH - bool "Enable QSPI FLASH (N25Q256 qspi)" + bool "Enable QSPI FLASH (N25Q256 qspi1)" select BSP_USING_QSPI select RT_USING_SFUD select RT_SFUD_USING_QSPI diff --git a/bsp/stm32/stm32f746-st-disco/project.ewp b/bsp/stm32/stm32f746-st-disco/project.ewp index c25fbcb5e0..7493cb2f34 100644 --- a/bsp/stm32/stm32f746-st-disco/project.ewp +++ b/bsp/stm32/stm32f746-st-disco/project.ewp @@ -346,6 +346,7 @@ $PROJ_DIR$\..\..\..\components\finsh $PROJ_DIR$\..\..\..\libcpu\arm\common $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7 + $PROJ_DIR$\board\ports $PROJ_DIR$\..\..\..\components\drivers\include $PROJ_DIR$\. $PROJ_DIR$\applications @@ -1375,6 +1376,7 @@ $PROJ_DIR$\..\..\..\components\finsh $PROJ_DIR$\..\..\..\libcpu\arm\common $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7 + $PROJ_DIR$\board\ports $PROJ_DIR$\..\..\..\components\drivers\include $PROJ_DIR$\. $PROJ_DIR$\applications @@ -2135,21 +2137,21 @@ - CORTEX-M7 + cpu - $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7\cpuport.c + $PROJ_DIR$\..\..\..\libcpu\arm\common\backtrace.c - $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7\context_iar.S + $PROJ_DIR$\..\..\..\libcpu\arm\common\div0.c - $PROJ_DIR$\..\..\..\libcpu\arm\common\backtrace.c + $PROJ_DIR$\..\..\..\libcpu\arm\common\showmem.c - $PROJ_DIR$\..\..\..\libcpu\arm\common\div0.c + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7\cpuport.c - $PROJ_DIR$\..\..\..\libcpu\arm\common\showmem.c + $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m7\context_iar.S diff --git a/bsp/stm32/stm32f746-st-disco/project.uvprojx b/bsp/stm32/stm32f746-st-disco/project.uvprojx index 436c68585d..8325fc036c 100644 --- a/bsp/stm32/stm32f746-st-disco/project.uvprojx +++ b/bsp/stm32/stm32f746-st-disco/project.uvprojx @@ -332,7 +332,7 @@ USE_HAL_DRIVER, STM32F746xx - .;..\..\..\include;applications;.;board;board\CubeMX_Config\Inc;board\ports;..\libraries\HAL_Drivers;..\libraries\HAL_Drivers\config;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;..\..\..\components\drivers\spi\sfud\inc;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Inc;..\libraries\STM32F7xx_HAL\CMSIS\Device\ST\STM32F7xx\Include;..\libraries\STM32F7xx_HAL\CMSIS\Include + .;..\..\..\include;applications;.;board;board\CubeMX_Config\Inc;board\ports;..\libraries\HAL_Drivers;..\libraries\HAL_Drivers\config;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m7;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\finsh;..\libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Inc;..\libraries\STM32F7xx_HAL\CMSIS\Device\ST\STM32F7xx\Include;..\libraries\STM32F7xx_HAL\CMSIS\Include @@ -507,13 +507,6 @@ board\CubeMX_Config\Src\stm32f7xx_hal_msp.c - - - drv_qspi_flash.c - 1 - board\ports\drv_qspi_flash.c - - startup_stm32f746xx.s @@ -535,20 +528,6 @@ ..\libraries\HAL_Drivers\drv_usart.c - - - drv_spi.c - 1 - ..\libraries\HAL_Drivers\drv_spi.c - - - - - drv_qspi.c - 1 - ..\libraries\HAL_Drivers\drv_qspi.c - - drv_common.c @@ -611,48 +590,6 @@ ..\..\..\components\drivers\serial\serial.c - - - spi_core.c - 1 - ..\..\..\components\drivers\spi\spi_core.c - - - - - spi_dev.c - 1 - ..\..\..\components\drivers\spi\spi_dev.c - - - - - qspi_core.c - 1 - ..\..\..\components\drivers\spi\qspi_core.c - - - - - spi_flash_sfud.c - 1 - ..\..\..\components\drivers\spi\spi_flash_sfud.c - - - - - sfud.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud.c - - - - - sfud_sfdp.c - 1 - ..\..\..\components\drivers\spi\sfud\src\sfud_sfdp.c - - completion.c @@ -702,18 +639,6 @@ ..\..\..\components\drivers\src\workqueue.c - - - - - --c99 - - - - - - - finsh @@ -888,20 +813,6 @@ ..\libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_usart.c - - - stm32f7xx_hal_spi.c - 1 - ..\libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_spi.c - - - - - stm32f7xx_hal_qspi.c - 1 - ..\libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Src\stm32f7xx_hal_qspi.c - - diff --git a/bsp/stm32/stm32f746-st-disco/rtconfig.h b/bsp/stm32/stm32f746-st-disco/rtconfig.h index bc1cea3439..cc7acbac06 100644 --- a/bsp/stm32/stm32f746-st-disco/rtconfig.h +++ b/bsp/stm32/stm32f746-st-disco/rtconfig.h @@ -79,12 +79,6 @@ #define RT_USING_SERIAL #define RT_SERIAL_USING_DMA #define RT_USING_PIN -#define RT_USING_SPI -#define RT_USING_QSPI -#define RT_USING_SFUD -#define RT_SFUD_USING_SFDP -#define RT_SFUD_USING_FLASH_INFO_TABLE -#define RT_SFUD_USING_QSPI /* Using WiFi */ @@ -167,14 +161,12 @@ /* Onboard Peripheral Drivers */ #define BSP_USING_USB_TO_USART -#define BSP_USING_QSPI_FLASH /* On-chip Peripheral Drivers */ #define BSP_USING_GPIO #define BSP_USING_UART #define BSP_USING_UART1 -#define BSP_USING_QSPI /* Board extended module Drivers */ -- GitLab