TI论坛
直播中

宁升椿

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

全局变量出错怎么解决


warning #16002-D: build attribute vendor section TI missing in "C:tiworkspace_v5_2bldc_aDSP281x_commonLibIQmath.lib": compatibility cannot be determined

warning #16002-D: build attribute vendor section TI missing in "C:tiworkspace_v5_2bldc_aDSP281x_commonLibIQmath.lib": compatibility cannot be determined
>> Compilation failure
warning #16002-D: build attribute vendor section TI missing in "C:tiworkspace_v5_2bldc_aDSP281x_commonLibIQmath.lib": compatibility cannot be determined
warning #10247-D: creating output section "reset_vec" without a SECTIONS specification

undefined first referenced
symbol in file
--------- ----------------
_Capt ./DSP281x_headers/source/main.obj
_SPEED_CAP_handle ./DSP281x_headers/source/main.obj
_SPEED_COUNT ./DSP281x_headers/source/main.obj
_Sdc_Set ./DSP281x_headers/source/main.obj
_T2_PR ./DSP281x_common/source/DSP281x_Ev.obj
__FtoIQ ./DSP281x_headers/source/main.obj
_duty ./DSP281x_headers/source/main.obj
_i ./DSP281x_headers/source/main.obj
_pi_Sdc ./DSP281x_headers/source/main.obj
_pid_spd ./DSP281x_headers/source/main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "bldc_a.out" not built
gmake: *** [bldc_a.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

老师您好,我的也出现了这种情况,我用的是TI网站上下载的F2812的例程,在这个例程的基础上改的,
struct PIS
[
float pi_ref_reg;//电机的给定速度
_iq pi_fdb_reg;//电机的反馈速度
_iq S_reg;//经过速度PI调节后的速度值
_iq S_OutMax;
_iq S_Outmin;//速度范围
];
extern volatile struct PIS pi_Sdc;/*速度PI调节器的输入输出值*/

struct PID
[
_iq Kp;
_iq Ki;
_iq Kd;
_iq OutMax;
_iq Outmin;
];
extern volatile struct PID pid_spd;/*速度PI调节器的参数*/

//速度计算结构体
struct SPEED_CAP
[
float EventPeriod;//捕获的时间间隔
float SpeedScaler;//转换到标幺值的预定标
Uint32 BaseRpm;//转速基值
Uint32 SpeedRpm;//转速实际值
_iq Speed;//转速标幺值
];
extern volatile struct SPEED_CAP SPEED_CAP_handle;

extern Uint16 SPEED_REF;
extern _iq S_Inte;
extern Uint16 SPEED_COUNT;
extern float Sdc_Set;
//extern Uint16 Capt;//霍尔信号的状态
extern Uint16 T2_PR;//通用定时器T2的周期寄存器值
extern Uint16 i;//捕获中断的记数点
extern Uint32 duty;//占空比
extern int m;
#endif
在上面报错的变量和结构体都已经在DSP28_GlobalVariable.h中定义了,而且DSP28_GlobalVariable.h也在已经声明了,怎么还会出现这种错误?
还麻烦老师指导。谢谢老师

回帖(1)

宁升椿

2020-5-20 17:03:05
谢谢您,最后问题找到了,是全局变量定义出问题了,现在已经解决。
举报

更多回帖

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