如何定向把数组和函数放在指定的地址单元

2025-05-14 21:10:10
推荐回答(1个)
回答1:

定位到Flash区域,这个需要两个步骤:
第一步:在LCF文件分配一段代码;
place at address mem: 0x0001e000 { readonly section .funflash };
第二步:在主函数定义函数;
char Function_Relocted_to_Address(int flag) @".funflash"
{
if (flag > 0)
{
return 1;
}
return 0;
}
}