经过TI的指导,大致已经明白这个函数的作用,以及CODESECTION的使用方法。
但是一直有一个疑惑:
ramfuncs : LOAD = FLASHD, //表示从FLASHD中加载程序
RUN = RAML0, //表示从RAML0中运行程序
LOAD_START(_RamfuncsLoadStart), //
LOAD_END(_RamfuncsLoadEnd), //
RUN_START(_RamfuncsRunStart), //
PAGE = 0
在MemCopy时,RamfuncsLoadStart是拷贝起始地址,RamfuncsLoadEnd是结束地址,RamfuncsRunStart是程序运行起始地址
但是在主程序中就只是声明了三个extern 的extern Uint16 RamfuncsLoadStart; extern Uint16 RamfuncsLoadEnd; extern Uint16 RamfuncsRunStart;
又没有指向RAML0的特定地址,编译器是怎么确定具体的地址呢?
比如定义了RamfuncsLoadStart这个变量,又没指定值,执行MemCopy时,编译器就知道从哪里开始搬移程序了?
而且"_RamfuncsLoadStart"与“RamfuncsLoadStart” 不同的是一个多了一个下划线,编译器判定它们是一个东西??
实在没想明白……
求教了