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.

[参考译文] TMS320F28379D:未解析的符号、首次在 CLA 文件中引用

Guru**** 2564410 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1264283/tms320f28379d-unresolved-symbol-first-referenced-in-cla-file

器件型号:TMS320F28379D

大家好!

我已经尝试在当前项目中添加 CLA。 在 main.c 中、我将变量声明为:

 

#pragma DATA_SECTION("CpuToCla1MsgRAM")
float32_t fVal;
#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
float32_t fResult1;
#pragma DATA_SECTION("Cla1ToCpuMsgRAM")
float32_t fResult2;

在 cla_shared.h 中:

//
// Globals
//
extern float fVal;

// Task 1 (C) Variables
extern float fResult1;

//Task 2 (C) Variables
extern float fResult2;

但是、在.cla 文件中使用这些变量时出现错误:

第一个引用的未定义
文件中的符号
---------------- ----------------
_fResult1 ./sourceFiles/cla_asin.obj
_fVal ./sourceFiles/cla_asin.obj

我发现只有.cla 文件无法访问这些变量。 请帮我。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我 在那里创建了一个新的.c 文件并声明了变量。 这解决了我的问题。 谢谢大家。