A、 Bootloader ICF 请查看 stm8af52a6_Boot.ICF 在项目文件夹的ICF文件夹中;
define region VectData = [from 0x1000 to 0x107F];//重定向的中断向量表的存放位置
//为真实的中断向量标在RAM中申请一个空间;
place at start of VectData { rw section .vector };
//定义中断向量表的存放位置。
do not initialize { section .vector };
//因为中断向量表放在RAM中,防止上电初始化,会将此段数据清零,定义为上电不初始化。
define region NearFuncCode = [from 0x8000 to 0x9FFF];
define region AppFuncCode = [from 0xA000 to 0xFFFF];
define region FarFuncCode = [from 0x8000 to 0x9FFF]
| [from 0x10000 to 0x1FFFF]
| [from 0x20000 to 0x27FFF];
//定义Bootloader的存储空间。
B、 APP ICF 请查看 stm8af52a6_APP.ICF 在项目文件夹的ICF文件夹中;
define region NearFuncCode = [from 0xA000 to 0xFFFF];
define region FarFuncCode = [from 0xA000 to 0xFFFF]
|[from 0x10000 to 0x1FFFF]
|[from 0x20000 to 0x27FFF];
define region HugeFuncCode = [from 0xA000 to 0xFFFF]
|[from 0x10000 to 0x1FFFF]
|[from 0x20000 to 0x27FFF];
APP的定义空间不同,其余与Bootloader相同;