Thread 中讨论的其他器件:controlSUITE、 C2000WARE
工具/软件:TI C/C++编译器
你(们)好
我 已经由 CLA 汇编器为 TMS320F2837x 开发了一些滤波器、并尝试为 TMS320F2838x 编译它、并遇到了下一个问题
例如 、部分*。asm 文件
.cdecls C
%{
#include "cla_adc_filter_shared.h"
#include
#include
#include
#include
#include
extern float W5;
extern float W4;
extern float W3;
extern float W2;
extern float W1;
extern float K;
extern float g_ffk;
extern uint16_t g_ui16Clear_Interrupt;
extern volatile struct adc_result_regs AdcaResultRegs;
extern volatile struct cla_SOFTINT_regs Cla1SoftIntRegs;
extern volatile struct adc_regs AdcaRegs;
extern Int16_t New_filtered_DataA0;
extern Int16_t New_filtered_DataA1;
extern Int16_t New_filtered_DataA2;
extern Int16_t New_filtered_DataA3;
extern Int16_t New_filtered_DataA4;
extern Int16_t New_filtered_DataA5;
extern uint32_t g_ui32计数器[6];
extern Int16_t is 数据;
/********* /
%}
array_locationa_0: .word _New_filtered_DataA0
array_locationa_1: .word _New_filtered_DataA1
array_locationa_2: .word _New_filtered_DataA2
array_locationa_3: .word _New_filtered_DataA3
array_locationa_4: .word _New_filtered_DataA4
array_locationa_5: .word _New_filtered_DataA5
它会导致编译错误
../Calculation/CLA/cla_IIR_Filter.asm "、错误! 在 EOF:[E0300]以下符号未定义:
_New_filtered_DataA0
_New_filtered_DataA1
_New_filtered_DataA2
_New_filtered_DataA3
_New_filtered_DataA4
_New_filtered_DataA5
和代码
MMOVI16 MAR0、#New_filtered_DataA2 ;将数组开始加载到注册器
LED 编译错误
"/tmp/TI4lfFwgmTm "、错误! 第3254行:[E0800]结构体/联合体定义中不允许使用指令
MAR0 .BITS 16 ;无符号 int MAR0 -偏移42字节,大小(1字节|16位)
经过一些调查、我得出结论、汇编器处理从 C/C++符号导出的问题、不使用下划线、
因此、它不会看到 例如 _New_filtered_DataA0、而是取代 操作命名规则 MAR0、它在中找到了 MAR0和其他 CLA 寄存器定义
f2838x_cla.h
那么问题是-如何避免这个问题呢?
此致
Andrii Shevchuk