From 6237d2aa6950ff89e6814d0abdcba8fd9c3af47d Mon Sep 17 00:00:00 2001 From: tyx <462747508@qq.com> Date: Sun, 17 Apr 2022 22:01:35 +0800 Subject: [components][fal] Compact code --- components/fal/src/fal_partition.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'components') diff --git a/components/fal/src/fal_partition.c b/components/fal/src/fal_partition.c index 94f88dbed5..92ae074303 100644 --- a/components/fal/src/fal_partition.c +++ b/components/fal/src/fal_partition.c @@ -34,24 +34,8 @@ struct part_flash_info #error "You must defined FAL_PART_TABLE on 'fal_cfg.h'" #endif -#ifdef __CC_ARM /* ARM Compiler */ - #define SECTION(x) __attribute__((section(x))) - #define USED __attribute__((used)) -#elif defined (__IAR_SYSTEMS_ICC__) /* for IAR Compiler */ - #define SECTION(x) @ x - #define USED __root -#elif defined (__GNUC__) /* GNU GCC Compiler */ - #define SECTION(x) __attribute__((section(x))) - #define USED __attribute__((used)) -#elif defined (_MSC_VER) - #define SECTION(x) - #define USED -#else - #error not supported tool chain -#endif /* __CC_ARM */ - /* partition table definition */ -USED static const struct fal_partition partition_table_def[] SECTION("FalPartTable") = FAL_PART_TABLE; +static const struct fal_partition partition_table_def[] = FAL_PART_TABLE; static const struct fal_partition *partition_table = NULL; /* partition and flash object information cache table */ static struct part_flash_info part_flash_cache[sizeof(partition_table_def) / sizeof(partition_table_def[0])] = { 0 }; -- cgit v1.3.1