您好,我建立了一个工程文件,利用28335.cmd文件编译没有问题,但改为28335_RAM_lnk.cmd文件后,就报错,具体如下:
不知道是怎么回事?请您多多指教。谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好,我建立了一个工程文件,利用28335.cmd文件编译没有问题,但改为28335_RAM_lnk.cmd文件后,就报错,具体如下:
不知道是怎么回事?请您多多指教。谢谢!
您好,具体内容为:
undefined first referenced symbol in file --------- ---------------- _RamfuncsLoadEnd C:\\Users\\whx\\Desktop\\CPU_DSP_100503\\CPU_DSP_100503\\AD6K_S_QGX_Pro\\sys\\build\\Debug\\28335_TR.obj _RamfuncsLoadStart C:\\Users\\whx\\Desktop\\CPU_DSP_100503\\CPU_DSP_100503\\AD6K_S_QGX_Pro\\sys\\build\\Debug\\28335_TR.obj _RamfuncsRunStart C:\\Users\\whx\\Desktop\\CPU_DSP_100503\\CPU_DSP_100503\\AD6K_S_QGX_Pro\\sys\\build\\Debug\\28335_TR.obj
error: unresolved symbols remain warning: entry-point symbol other than "_c_int00" specified: "code_start" error: errors encountered during linking; "./Debug/Example_2833xCpuTimer.out" not built
>> Compilation failure
Build Complete, 1 Errors, 1 Warnings, 0 Remarks.
然后我就在.c文件中查看了一下上述三个的变量,看到上面有如下定义:
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;
然后我又查了一下,在DSP2833x_GlobalPrototypes.h文件中也有一模一样的定义。然后我把.c的定义中的三个extern去掉,如下:
Uint16 RamfuncsLoadStart;
Uint16 RamfuncsLoadEnd;
Uint16 RamfuncsRunStart;,编译通过了。
以上都是选择ram_lnk.cmd文件时出现的情况。然后我打开看了一下28335.cmd文件。看到里面有如下三个变量:
LOAD_START(_RamfuncsLoadStart), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart),
我有些搞不懂他们的关系了。
谢谢您!
使用ram_lnk.cmd的话,代码本来就是在ram中运行的,不需要进行搬移。而28335.cmd中的配置,代码是在flash中,为了提高运算速度,我们会把一些关键代码从flash搬移到ram。这就需要在cmd文件中有这样的定义:
ramfuncs : LOAD = FLASHD,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
另外在程序初始化的时候,还要调用MemCopy函数来完成搬移的动作。这就需要在cmd中定义的这几个变量了,因为cmd中有定义所以用extern进行外部声明就可以了。