程序里面用了CLAmath,dubug模式下可以运算CLAcos,但是下电再上电CLAcos始终返回0。尝试了各种解决方案,包括在cmd里面为CLAmathtable分配rom,以及在程序里面加上memcpy语句,都没有用,想问下大家可能是什么原因
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.
程序里面用了CLAmath,dubug模式下可以运算CLAcos,但是下电再上电CLAcos始终返回0。尝试了各种解决方案,包括在cmd里面为CLAmathtable分配rom,以及在程序里面加上memcpy语句,都没有用,想问下大家可能是什么原因
离线运行的话,你的memcpy部分是怎么写的?不知道memcpy有没有设置对
以前在第一、二代C2000芯片中一般用memcopy函数来执行复制到ram运行的操作,方式类似:
MemCopy(&Cla1mathTablesLoadStart, &Cla1mathTablesLoadEnd, &Cla1mathTablesRunStart);
在cmd文件中添加如下类似代码:
CLA1mathTables : LOAD = FLASH, /*指定加载地址*/
RUN = CLARAM2, /*指定运行地址*/
LOAD_START(_Cla1TablesLoadStart),
LOAD_END(_Cla1TablesLoadEnd),
RUN_START(_Cla1TablesRunStart),
PAGE = 0