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.
将从controlSUITE中的F2833x FIR 32-bit例子导入到CCS5.2中。在Debug模式下正常编译通过,但在Release模式下遇到了问题。编译报错:
在Console中描述问题的某一点是:
"D:/workspace_v5_2/F28335_FIR32_Example/lib/C28x_FixedPoint_Lib.lib<fir32.ob
j>" specifies ISA revision "C2800", which is not compatible with ISA
revision "C28FPU32" specified in a previous file or on the command line
error: file
在Project Properties中的对库文件的link是这样设置的
同样的link设置在Debug模式下未曾遇到上述错误。
在CSDN一则博客(http://blog.csdn.net/vvzaixian/article/details/7067208)上看到这样一句话,“rts2800_ml.lib用的是大存储模式,在需要烧写FLASH时必须用这个库”,如果正如其所说,编译应该正常通过才对。
以上就是对问题的描述,附上工程源码,望FAE不吝赐教。
Eric,
谢谢你的解答。
我最近对F28335.cmd文件和源代码进行了修改。在cmd文件中添加了以下部分:
/*Added by lbbxsxlz*/
firldb align(0x800) > FLASHH PAGE = 0
firfilt align(0x800) > RAML1 PAGE = 0
coefffilt align(0x800)> RAML2 PAGE = 0
sigIn align(0x800) > RAML6 PAGE = 1
sigOut align(0x800) > RAML7 PAGE = 1
添加这些后能成功消去警告。但是编译依然存在问题。
修改主文件,把部分代码拷贝到RAM中去,但依然是相同的问题。主文件修改部分如下:
/*Added by lbbxsxlz*/
#pragma CODE_SECTION(filter, "ramfuncs");
/*Added by lbbxsxlz*/
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsRunStart;
void filter(int length);
……
#ifdef FLASH
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash(); // Call the flash wrapper init function
#endif //(FLASH)
……
void filter(int length)
{
Uint16 j;
for(j=0; j < length; j++)
{
xn=0.5*sin(Rad) + 0.5*sin(Rad2); //Q15
sigIn[j]=xn;
firFP.input= xn;
firFP.calc(&firFP);
yn = firFP.output;
sigOut[j]=yn;
Rad = Rad + RadStep;
Rad2 = Rad2 + RadStep2;
}
}
以上修改的文件均在附件中的工程中,该工程是在F2833x_FPU基础上修改的,也是在Debug模式下编译无问题,能正常运行,但是在Release模式下,编译出错。
Eric,
谢谢你不厌其烦的指导。
我现在着手的是一个两轮自平衡机器人的项目。核心部分利用F28335来控制无刷直流电机,从而使机器人保持动态平衡或运动。在前期的调试过程中发现电流环反馈回来的电流值波动的太频繁。在matlab中,将采集回来的数据用巴特沃斯低通滤波后发现曲线还是挺符合规律的。就决定用Fir对电流数据进行滤波处理。由于机器人最终是要交互的,必须要把程序固化。
错误信息:
C:\ti\ccsv5\utils\bin\gmake -k all
'Building target: 2833x_FIR.out'
'Invoking: C2000 Linker'
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/bin/cl2000" -v28 -ml -mt -O2 -g --diag_warning=225 -z -m"2833x_FIR.map" --stack_size=0x380 --warn_sections -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib" -i"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/include" -i"D:/workspace_v5_2/F28335_FIR_FPU/lib" --reread_libs --rom_model -o "2833x_FIR.out" "./SRC/DSP2833x_usDelay.obj" "./SRC/DSP2833x_SysCtrl.obj" "./SRC/DSP2833x_PieVect.obj" "./SRC/DSP2833x_PieCtrl.obj" "./SRC/DSP2833x_GlobalVariableDefs.obj" "./SRC/DSP2833x_DefaultIsr.obj" "./SRC/DSP2833x_DBGIER.obj" "./SRC/DSP2833x_CodeStartBranch.obj" "./SRC/DSP2833x_ADC_cal.obj" "./source/Test_FPU_FIR.obj" -l"C28x_FPU_Lib.lib" -l"rts2800_ml.lib" "../lib/C28x_FPU_Lib.lib" "../cmd/DSP2833x_Headers_nonBIOS.cmd" "../cmd/F28335.cmd"
<Linking>
error: file
"D:/workspace_v5_2/F28335_FIR_FPU/lib/C28x_FPU_Lib.lib<FIR_f32.obj>"
specifies ISA revision "C28FPU32", which is not compatible with ISA revision
"C2800" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<boot.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<exit.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<fs_add.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<fs_mpy.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<sin.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<_lock.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<args_main.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<fs_cmp.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<fs_neg.obj>"
>> Compilation failure
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<fs_toi.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: file
"C:/ti/ccsv5/tools/compiler/c2000_6.1.0/lib/rts2800_ml.lib<i_tofs.obj>"
specifies ISA revision "C2800", which is not compatible with ISA revision
"C2700" specified in a previous file or on the command line
error: errors encountered during linking; "2833x_FIR.out" not built
gmake: *** [2833x_FIR.out] Error 1
gmake: Target `all' not remade because of errors.
ken
Eric,
我在编译选项里添加了浮点支持(如下图),但不是你说的fpu0,而是fpu32,源于其下拉菜单也只有fpu32,fpu64,softlib这三个选项。
另外我在查询Debug模式与Release模式有啥不同的时候,发现在CCS3.3中的Project ->Build Option ->Generate Debug的配置不同,Debug模式中选择Full Symbolic Debug,而Release模式下是NO Debug。但我在CCS5.2中发现不管是Debug模式还是Release模式,默认的选项都是Full symbolic debug(symdebug:dwarf,-g),见图。这又是为何?能详细描述下Release对代码做了哪些方面的优化吗?我并未在spruf514e这个文档内找到详细的答案。
至于程序固化,我发现我进入了习惯性的误区。因为我之前都是在Debug模式下,在RAM中调试,而用Release模式下通过的可执行文件烧写到flash中。这个误解一直耽误了我的进度,目前程序烧写的问题我已了然于胸。当然,这得益于您的指点。因此现在不会因这个问题存在而阻碍项目的进度了。
当然能解决Release模式下优化的问题更是锦上添花了。
谢谢您,Eric。
ken