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

undefined first referenced symbol in file ——— —————- GPIOBank6Pin12PinMuxSetup ./main.obj

板子是ti官方的OMAPL138 LCDK,软件是CCS5.5,用得是TI给的例子,也就是在OMAPL138_StarterWare_1_10_04_01文件里的demoLedIf。

程序是:

#include "gpio.h"

#include "soc_C6748.h"

#include "hw_psc_C6748.h"

#include "lcdkC6748.h"

#include "demoCfg.h"

static unsigned int ledState = 0;

void LedIfConfig(void)

{GPIOBank6Pin12PinMuxSetup();

GPIODirModeSet(SOC_GPIO_0_REGS, 109, GPIO_DIR_OUTPUT);}

void LedToggle(void)

 {    

 if(ledState == 0) ledState = 1;    

 else ledState = 0;  

GPIOPinWrite(SOC_GPIO_0_REGS, 109, ledState); }

void LedOff(void)

 {  GPIOPinWrite(SOC_GPIO_0_REGS, 109, GPIO_PIN_HIGH); }

 

void main(void)

{

LedIfConfig();

LedToggle();

LedOff();

}

但是出现了错误:

**** Build of configuration Debug for project led3 ****

"C:\\ti\\ccsv5\\utils\\bin\\gmake" -k all'Building file: ../main.c'
'Invoking: C6000 Compiler'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 –abi=eabi -g –include_path="C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include" –include_path="../include" –include_path="../include/hw" –include_path="../include/C674x/omapl138" –define=omapl138 –display_error_number –diag_warning=225 –diag_wrap=off –preproc_with_compile –preproc_dependency="main.pp" "../main.c"
'Finished building: ../main.c'
' '
'Building target: led3.out'
'Invoking: C6000 Linker'
"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/bin/cl6x" -mv6740 –abi=eabi -g –define=omapl138 –display_error_number –diag_warning=225 –diag_wrap=off -z –stack_size=0x800 -m"led3.map" –heap_size=0x800 -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/lib" -i"C:/ti/ccsv5/tools/compiler/c6000_7.4.4/include" –reread_libs –define=DSP_CORE=1 –warn_sections –display_error_number –diag_wrap=off –xml_link_info="led3_linkInfo.xml" –rom_model -o "led3.out" "./main.obj" "../OMAPL138.cmd" "../library/drivers.lib" -l"libc.a"<Linking>

undefined first referenced
symbol in file ——— —————-
GPIOBank6Pin12PinMuxSetup ./main.obj

error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; "led3.out" not built
>> Compilation failure
gmake: *** [led3.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

这是为什么啊?

weiwei ai:

已找到答案~是GPIOBank6Pin12PinMuxSetup()这个函数是在platform中的gpio.c中定义的,将gpio.c加进去就好了

weiwei ai:

解决了~

jiaji Lu:

回复 weiwei ai:

您好,我在编写svpwm的演示例子时出现了如下的错误:

<Linking>warning #10247-D: creating output section "PartIdRegsFile" without a SECTIONS specification

>> Compilation failure undefined first referenced symbol in file ——— —————- _ADC_cal ./SRC/DSP2833x_SysCtrl.obj _DSP28x_usDelay ./SRC/DSP2833x_SysCtrl.obj _InitEPwm1Gpio ./SRC/main.obj _InitEPwm2Gpio ./SRC/main.obj _InitEPwm3Gpio ./SRC/main.obj

error #10234-D: unresolved symbols remainerror #10010: errors encountered during linking; "SVPWM.out" not built

板子用的是TMS320F28335,ccs是6.0

请问您我大概的问题出在哪个地方?谢谢!

jiaji Lu:

回复 weiwei ai:

您好,刚才试着把

DSP2833x_ADC_cal.asmDSP2833x_EPwm.cDSP2833x_usDelay.asm

这三个文件添加进入,解决了 undefined symbol的问题,成功生成了out文件,但是warning仍然存在,

<Linking>warning #10247-D: creating output section "PartIdRegsFile" without a SECTIONS specification'Finished building target: SVPWM.out'

请问这是为什么呢?该如何解决?谢谢!

jiaji Lu:

回复 weiwei ai:

问题已解决

赞(0)
未经允许不得转载:TI中文支持网 » undefined first referenced symbol in file ——— —————- GPIOBank6Pin12PinMuxSetup ./main.obj
分享到: 更多 (0)