TI论坛
直播中

孙缅禧

7年用户 255经验值
私信 关注
[问答]

F28M35x关于error的问题


程序中自定义的函数都出现如上图情况,当鼠标放在Lcdwritecom处时就出现error:cannot load from non-primitive location,请朋友们给帮忙解答一下!

回帖(7)

孙缅禧

2018-10-25 15:47:07
有哪位同仁可以指点一下啊!
举报

冯敬宇

2018-10-25 16:02:47
引用: 分修一班人 发表于 2018-10-25 19:40
有哪位同仁可以指点一下啊!

hongyue,
你使用的是哪个例程?
会不会这个函数时API函数库的,因为添加API库并没有添加源码,所以CCS找不到。
Eric
                                                                         - ERIC
举报

孙缅禧

2018-10-25 16:21:19
引用: guigui_7044 发表于 2018-10-25 19:56
hongyue,
你使用的是哪个例程?
会不会这个函数时API函数库的,因为添加API库并没有添加源码,所以CCS找不到。

这是自己写的一个调用函数,而且只要是自己写的函数好像都有这个问题,整段程序都是在一个.c文件中,函数的调用也是在这段程序中调用。编译完成后并没有报错,能够生成.out文件,就是会出现上面的情况。还请Eric帮忙分析一下,谢谢了!
举报

冯敬宇

2018-10-25 16:36:54
引用: 分修一班人 发表于 2018-10-25 20:14
这是自己写的一个调用函数,而且只要是自己写的函数好像都有这个问题,整段程序都是在一个.c文件中,函数的调用也是在这段程序中调用。编译完成后并没有报错,能够生成.out文件,就是会出现上面的情况。还请Eric帮忙分析一下,谢谢了! ...

hongyue,
我在E2E论坛上找到相关的解答:
This message means that the expression tried to read and display data from the target where the type of the data is not a primitive type (char, short, int etc).  For instance, "main" is of type "function pointer" so evaluating "*main" would be asking the debugger to display data of type "function" which doesn't make much sense and would return this error.
At least, that's what it's supposed to mean.  If that doesn't make sense in your case, could you attach a small test program with the struct in question and show what evaluations incorrectly return that error message incorrectly?
即使当CCS准备去读这个函数的时候,这个函数的类型不是基本的类型,char,int等,所以导致错误。
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/3325/141182.aspx#141182
Eric
                                                                         - ERIC
举报

更多回帖

发帖
×
20
完善资料,
赚取积分