TI中文支持网
TI专业的中文技术问题搜集分享网站

关于程序包含CSL库的问题

我在编写6678程序的时候,由于要用到CSL_chipReadReg()这个函数,于是就在程序里包含了头文件#include <ti/csl/csl_chip.h>

程序build的时候说找不到csl_chip.h这个文件,然后我在工程build setting里的include search path里加入了csl_chip.h文件的路径(我的MCSDK是装在C盘底下的,CCS装在D盘底下),再次build的时候上一个错误消失了,但是又有了一个新的错误,说我的 CSL_chipReadReg()是undefined symbol。

 

这该怎么解决啊?我的工程是建立在G盘底下的。

Andy Yin:

请在include searche path中包含相应的CSL lib库。

chao fan:

回复 Andy Yin:

Andy Yin  您好!

我在C6000 Linker的File Search Path中添加了CSL lib库的地址(如下)但是依然不行。还是说 CSL_chipReadReg()是undefined symbol。

C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_9_beta2\packages\ti\csl\lib

Thomas Yang1:

回复 chao fan:

一般这种问题都是你的库和头文件路径不对,请仔细检查

Andy Yin:

回复 chao fan:

chao fan您好,

请确认选择上述目录下的CSL lib文件,如ti.csl.ae66e,同时请留意编译链接时是否存在相应的CSL lib,如果还存在问题,请将编译时打印的东西贴上来,谢谢

chao fan:

回复 Andy Yin:

Andy Yin 您好,

我把CSL lib库加入了,但是情况还是像原来一样,编译的提示是这样的:

'Building target: matrix_transposition.out'

'Invoking: C6000 Linker'

"D:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000/bin/cl6x" -mv6600 -g -O2 –diag_warning=225 –abi=eabi -z -m"matrix_transposition.map"  –stack_size=400 –warn_sections -i"D:/Program Files/Texas Instruments/pdk_C6678_1_0_0_16/packages/ti/csl/lib" -i"D:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000/lib" -i"D:/Program Files/Texas Instruments/ccsv5/tools/compiler/c6000/include"  –reread_libs –rom_model -o "matrix_transposition.out"  "./matrix_trans.obj" -l"libc.a" "../matrix.cmd"

<Linking>

warning: creating output section ".neardata" without a SECTIONS specification.

  For additional information on this section, please see the 'C6000 EABI

  Migration' guide at

  processors.wiki.ti.com/…/C6000_EABI:C6000_EABI_Migration

  EABI_Sections

warning: creating output section ".rodata" without a SECTIONS specification.

  For additional information on this section, please see the 'C6000 EABI

  Migration' guide at

  processors.wiki.ti.com/…/C6000_EABI:C6000_EABI_Migration

  EABI_Sections

warning: creating group "NEARDP_DATA" to co-locate output sections .neardata

  and .rodata with .bss

undefined       first referenced  

 symbol             in file      

———       —————-  

CSL_chipReadReg ./matrix_trans.obj

error: unresolved symbols remain

error: errors encountered during linking; "matrix_transposition.out" not built

我试着把csl_chip.c这个文件复制一份到工程目录底下,结果编译通过了。但是我还是想找出不用复制源文件到工程目录下使用库函数的方法。谢谢帮助!

chao fan:

回复 Andy Yin:

谢谢Andy Yin的耐心解答,问题已经解决了,深深佩服你们负责的工作态度!

赞(0)
未经允许不得转载:TI中文支持网 » 关于程序包含CSL库的问题
分享到: 更多 (0)