1 /*
2  * Copyright (c) 2006-2018, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2018-05-17     armink       the first version
9  */
10 
11 #ifndef _FAL_CFG_H_
12 #define _FAL_CFG_H_
13 
14 #include <rtconfig.h>
15 #include <board.h>
16 
17 #define NOR_FLASH_DEV_NAME             "norflash0"
18 
19 /* ===================== Flash device Configuration ========================= */
20 extern const struct fal_flash_dev stm32f2_onchip_flash;
21 extern struct fal_flash_dev nor_flash0;
22 
23 /* flash device table */
24 #define FAL_FLASH_DEV_TABLE                                          \
25 {                                                                    \
26     &stm32f2_onchip_flash,                                           \
27     &nor_flash0,                                                     \
28 }
29 /* ====================== Partition Configuration ========================== */
30 #ifdef FAL_PART_HAS_TABLE_CFG
31 /* partition table */
32 #define FAL_PART_TABLE                                                               \
33 {                                                                                    \
34     {FAL_PART_MAGIC_WORD,        "bl",     "stm32_onchip",         0,   64*1024, 0}, \
35     {FAL_PART_MAGIC_WORD,       "app",     "stm32_onchip",   64*1024,  704*1024, 0}, \
36     {FAL_PART_MAGIC_WORD, "easyflash", NOR_FLASH_DEV_NAME,         0, 1024*1024, 0}, \
37     {FAL_PART_MAGIC_WORD,  "download", NOR_FLASH_DEV_NAME, 1024*1024, 1024*1024, 0}, \
38 }
39 #endif /* FAL_PART_HAS_TABLE_CFG */
40 
41 #endif /* _FAL_CFG_H_ */
42