From 3f559d7d38c5a6ca7d5706a55b0921104eb299b8 Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Fri, 18 May 2018 13:46:45 +0800 Subject: [PATCH] =?UTF-8?q?[BSP][RT=201050]Distinguish=20HyperFlash=20and?= =?UTF-8?q?=20QSPI=20Flash|=E5=8C=BA=E5=88=AB=E5=BC=80=20HyperFlash=20?= =?UTF-8?q?=E5=92=8C=20QSPI=20flash.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/imxrt1052-evk/Kconfig | 16 ++++++++++++++-- .../arm/MIMXRT1052xxxxx_flexspi_nor.scf | 4 +++- bsp/imxrt1052-evk/xip/SConscript | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bsp/imxrt1052-evk/Kconfig b/bsp/imxrt1052-evk/Kconfig index 10fdac103b..b2e97fc33a 100644 --- a/bsp/imxrt1052-evk/Kconfig +++ b/bsp/imxrt1052-evk/Kconfig @@ -22,6 +22,13 @@ config SOC_IMXRT1052 bool select ARCH_ARM_CORTEX_M7 default y + +config BOARD_USING_HYPERFLASH + bool + default n +config BOARD_USING_QSPIFLASH + bool + default n # RT1050 board select! choice @@ -29,14 +36,19 @@ choice default BOARD_RT1050_EVK config BOARD_RT1050_EVK bool "RT1050_EVK" + select BOARD_USING_HYPERFLASH config BOARD_RT1050_FIRE bool "RT1050_FIRE" + select BOARD_USING_QSPIFLASH config BOARD_RT1050_ShareBoard bool "RT1050_ShareBoard" + select BOARD_USING_QSPIFLASH config BOARD_RT1050_ATK - bool "RT1050_ATK" + bool "RT1050_ATK" + select BOARD_USING_QSPIFLASH config BOARD_RT1050_SeeedStudio - bool "RT1050_SeeedStudio" + bool "RT1050_SeeedStudio" + select BOARD_USING_HYPERFLASH endchoice menu "RT1050 Bsp Config" diff --git a/bsp/imxrt1052-evk/Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf b/bsp/imxrt1052-evk/Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf index af1f65e3b9..8fdb2c4cd2 100644 --- a/bsp/imxrt1052-evk/Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf +++ b/bsp/imxrt1052-evk/Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf @@ -73,7 +73,9 @@ #define Heap_Size 0x0400 #endif -#if (defined(BOARD_RT1050_EVK)) || (defined(BOARD_RT1050_SeeedStudio)) +#include "../../rtconfig.h" + +#if (defined(BOARD_USING_HYPERFLASH)) LR_m_rom_config m_flash_config_start m_flash_config_size ; load region size_region { RW_m_config_text m_flash_config_start m_flash_config_size ; load address = execution address diff --git a/bsp/imxrt1052-evk/xip/SConscript b/bsp/imxrt1052-evk/xip/SConscript index 5d302d3372..1b69f9e2e5 100644 --- a/bsp/imxrt1052-evk/xip/SConscript +++ b/bsp/imxrt1052-evk/xip/SConscript @@ -2,7 +2,7 @@ Import('RTT_ROOT') Import('rtconfig') from building import * -if GetDepend('BOARD_RT1050_EVK') or GetDepend('BOARD_RT1050_SeeedStudio'): +if GetDepend('BOARD_USING_HYPERFLASH'): cwd = GetCurrentDir() src = Glob('*.c') CPPPATH = [cwd] @@ -18,6 +18,6 @@ if GetDepend('BOARD_RT1050_EVK') or GetDepend('BOARD_RT1050_SeeedStudio'): group = DefineGroup('xip', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) Return('group') -if GetDepend('BOARD_RT1050_FIRE') or GetDepend('BOARD_RT1050_ATK') or GetDepend('RT1050_ShareBoard'): +if GetDepend('BOARD_USING_QSPIFLASH'): group = [] Return('group')