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.

cla告警

Other Parts Discussed in Thread: CONTROLSUITE

芯片28379s ,第一次使用cla计算。按照controlSUITE中的例程移植。编译可以通过,但是cla用到的变量都提示告警#pragma can only be applied to a file level symbol,这些变量仅仅定义,还未使用过,cla任务还是空,不知道这个告警的意思是什么?是指#pragma定义的变量仅能在当前.c文件使用么?那我如何在其它.c文件使用cla呢?不是很理解。声明变量如下,另附上cmd文件和修改的cla文件

/**********************************************全局变量声明********************************************************/
//Task 1 (C) Variables
// NOTE: Do not initialize the Message RAM variables globally, they will be reset
// during the message ram initialization phase in the CLA memory configuration routine
// CLA Input Data
//CLA输入数据输入
#ifdef __cplusplus

#pragma DATA_SECTION("CLADataLS0")
uint16_t msg1[5] = {0x5543, 0x3669, 0x3318, 0x5f57, 0x2ba2};
#pragma DATA_SECTION("CLADataLS0")
uint16_t msg2[12] = {0x1e18, 0x1842, 0x13e7, 0x77be, 0x4859, 0x20d7, 0x3c5d, 0x2efd, 0x2af7, 0x112c, 0x0f13, 0x06fa};

#pragma DATA_SECTION("CLADataLS0")
uint16_t msg3[5] = {0x6bd9, 0x335f, 0x1dfc, 0x4d84, 0x17fd};
#pragma DATA_SECTION("CLADataLS0")
uint16_t msg4[12] = {0x00e4, 0x0af8, 0x6f37, 0x3d39, 0x1c63, 0x3702, 0x43c1, 0x38e3, 0x33cb, 0x6ed8, 0x4a56, 0x221a};

#else
#pragma DATA_SECTION(g_tCurveCoff,"CLADataLS0")
float g_CurveCoff[12][26];

#pragma DATA_SECTION(g_tCurveTime,"CLADataLS0")
float g_CurveTime = 0.0;
#pragma DATA_SECTION(g_tCurveType,"CLADataLS0")
uint16_t g_CurveType = CURVE_TYPE_SIN;

#endif //__cplusplus

// CLA Output Data
//CLA输出数据
#ifdef __cplusplus
#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
uint16_t crc8_msg1;
#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
uint16_t crc8_msg2;
#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
uint16_t crc8_msg3;

#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
uint16_t crc8_msg4
#else
#pragma DATA_SECTION(g_tClaJointValue,"Cla1ToCpuMsgRAM")
float g_ClaJointValue[12];
#endif //__cplusplus

4300.cla.rar