|
@@ -22,27 +22,46 @@
|
|
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
|
|
#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)
|
|
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
|
|
#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)
|
|
|
|
|
|
|
|
+#ifdef BSP_USING_NOR_MTD_FS
|
|
|
|
+extern struct fal_flash_dev nor_flash0;
|
|
|
|
+#else
|
|
extern const struct fal_flash_dev stm32_onchip_flash_16k;
|
|
extern const struct fal_flash_dev stm32_onchip_flash_16k;
|
|
extern const struct fal_flash_dev stm32_onchip_flash_64k;
|
|
extern const struct fal_flash_dev stm32_onchip_flash_64k;
|
|
extern const struct fal_flash_dev stm32_onchip_flash_128k;
|
|
extern const struct fal_flash_dev stm32_onchip_flash_128k;
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
|
|
/* flash device table */
|
|
/* flash device table */
|
|
|
|
+#ifdef BSP_USING_NOR_MTD_FS
|
|
|
|
+#define FAL_FLASH_DEV_TABLE \
|
|
|
|
+{ \
|
|
|
|
+ &nor_flash0, \
|
|
|
|
+}
|
|
|
|
+#else
|
|
#define FAL_FLASH_DEV_TABLE \
|
|
#define FAL_FLASH_DEV_TABLE \
|
|
{ \
|
|
{ \
|
|
&stm32_onchip_flash_16k, \
|
|
&stm32_onchip_flash_16k, \
|
|
&stm32_onchip_flash_64k, \
|
|
&stm32_onchip_flash_64k, \
|
|
&stm32_onchip_flash_128k, \
|
|
&stm32_onchip_flash_128k, \
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
+
|
|
/* ====================== Partition Configuration ========================== */
|
|
/* ====================== Partition Configuration ========================== */
|
|
#ifdef FAL_PART_HAS_TABLE_CFG
|
|
#ifdef FAL_PART_HAS_TABLE_CFG
|
|
|
|
|
|
/* partition table */
|
|
/* partition table */
|
|
|
|
+#ifdef BSP_USING_NOR_MTD_FS
|
|
|
|
+#define FAL_PART_TABLE \
|
|
|
|
+{ \
|
|
|
|
+ {FAL_PART_MAGIC_WROD, "filesystem",FAL_USING_NOR_FLASH_DEV_NAME, 0 , 1024 * 1024, 0}, \
|
|
|
|
+}
|
|
|
|
+#else
|
|
#define FAL_PART_TABLE \
|
|
#define FAL_PART_TABLE \
|
|
{ \
|
|
{ \
|
|
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
|
|
{FAL_PART_MAGIC_WROD, "bootloader", "onchip_flash_16k", 0 , FLASH_SIZE_GRANULARITY_16K , 0}, \
|
|
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k", 0 , FLASH_SIZE_GRANULARITY_64K , 0}, \
|
|
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_64k", 0 , FLASH_SIZE_GRANULARITY_64K , 0}, \
|
|
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0}, \
|
|
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_GRANULARITY_128K, 0}, \
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+#endif
|
|
#endif /* FAL_PART_HAS_TABLE_CFG */
|
|
#endif /* FAL_PART_HAS_TABLE_CFG */
|
|
#endif /* _FAL_CFG_H_ */
|
|
#endif /* _FAL_CFG_H_ */
|