2.
从0x20008000后的0x1000 4K字节不进行初始化。
老的用法: unsigned char shoe_data[10] __attribute__((at(0x20008000 )));
新的用法:unsigned char shoe_data[10] __attribute__((section(".ARM.__at_0x20008100")));
3. 推荐做法
去掉上面的√,使用分散加载表。点击 Edit进入。修改如下,并保存。
LR_IROM1 0x08000000 0x00020000 { ; load region size_region
ER_IROM1 0x08000000 0x00020000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x20000000 0x00008000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x20008000 0x00001000 {
*(.RAM_D1)
}
}
使用:unsigned char shoe_data[10] __attribute__((section(".RAM_D1")));
注意去掉上面两个勾选。