/* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-05-17 armink the first version */ #ifndef _FAL_CFG_H_ #define _FAL_CFG_H_ #include #include #define NOR_FLASH_DEV_NAME "w25q16m" /* ===================== Flash device Configuration ========================= */ extern const struct fal_flash_dev stm32f1_onchip_flash; extern struct fal_flash_dev nor_flash0; /* flash device table */ #define FAL_FLASH_DEV_TABLE \ { \ &stm32f1_onchip_flash, \ &nor_flash0, \ } /* ====================== Partition Configuration ========================== */ #ifdef FAL_PART_HAS_TABLE_CFG /* partition table */ //分区表:FAL_PART_MAGIC_WORD,分区名,flash设备名字,起始地址,空间大小,保留0 //16Mflash /* //#define FAL_PART_TABLE \ //{ \ // {FAL_PART_MAGIC_WORD, "bl", "onchip_flash", 0, 200*1024, 0}, \ // {FAL_PART_MAGIC_WORD, "app", "onchip_flash", 200*1024, 312*1024, 0}, \ // {FAL_PART_MAGIC_WORD, "easyflash", FAL_USING_NOR_FLASH_DEV_NAME, 0, 15*1024*1024, 0}, \ // {FAL_PART_MAGIC_WORD, "fm_area", FAL_USING_NOR_FLASH_DEV_NAME, 15*1024*1024, 512*1024, 0}, \ // {FAL_PART_MAGIC_WORD, "df_area", FAL_USING_NOR_FLASH_DEV_NAME, 15*1024*1024 + 512*1024, 512*1024, 0}, \ //} */ //4Mflash #define FAL_PART_TABLE \ { \ {FAL_PART_MAGIC_WORD, "bl", "onchip_flash", 0, 200*1024, 0}, \ {FAL_PART_MAGIC_WORD, "app", "onchip_flash", 200*1024, 312*1024, 0}, \ {FAL_PART_MAGIC_WORD, "easyflash", FAL_USING_NOR_FLASH_DEV_NAME, 0, 3*1024*1024, 0}, \ {FAL_PART_MAGIC_WORD, "fm_area", FAL_USING_NOR_FLASH_DEV_NAME, 3*1024*1024, 512*1024, 0}, \ {FAL_PART_MAGIC_WORD, "df_area", FAL_USING_NOR_FLASH_DEV_NAME, 3*1024*1024 + 512*1024, 512*1024, 0}, \ } #endif /* FAL_PART_HAS_TABLE_CFG */ #endif /* _FAL_CFG_H_ */