__attribute__特性介绍以及变量和函数特定布局设置

ARM的MDK编译__attribute__介绍:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348bc/Ciafccai.html
 比如实现flash特定布局,在ISP和IAP中使用:
1.变量定义或声明const unsigned char IAP[] __attribute__((section("flash.updatable"), used))
2.链接文件设置:LR_ROM_UPDATE   0x00000000 0x00004000
{
    ER_FLASH_UPDATE   +0    UNINIT
    {
        *(flash.updatable)
    }
}
ScatterAssert(ImageLimit(LR_ROM_UPDATE) <= 0x00004000)
原文地址:https://www.cnblogs.com/swing07/p/4623444.html