[bsp][stm32] add onchip flash support

This commit is contained in:
sun_shine 2019-01-31 14:33:51 +08:00
parent d1d070d5ae
commit 4283003981
3 changed files with 8 additions and 4 deletions

View File

@ -53,7 +53,9 @@ static uint32_t GetPage(uint32_t Addr)
static uint32_t GetBank(uint32_t Addr)
{
uint32_t bank = 0;
#if defined (STM32L432xx)
bank = FLASH_BANK_1;
#else
if (READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_FB_MODE) == 0)
{
/* No Bank swap */
@ -78,7 +80,7 @@ static uint32_t GetBank(uint32_t Addr)
bank = FLASH_BANK_1;
}
}
#endif
return bank;
}

View File

@ -325,8 +325,6 @@ CONFIG_RT_USING_LIBC=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
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES_V020 is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES_LATEST_VERSION is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_VI is not set
CONFIG_SOC_FAMILY_STM32=y
@ -349,6 +347,7 @@ CONFIG_BSP_USING_GPIO=y
CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART2=y
# CONFIG_BSP_UART2_RX_USING_DMA is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_WDT is not set

View File

@ -35,6 +35,9 @@ menu "On-chip Peripheral Drivers"
default n
endif
config BSP_USING_ON_CHIP_FLASH
bool "Enable on-chip FLASH"
default n
config BSP_USING_ONCHIP_RTC
bool "Enable RTC"