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

关于CCSV5.1编译错误的问题

console如下:

**** Build of configuration Debug for project LAB1 ****

D:\TI\ccsv5\utils\bin\gmake -k all'Building file: ../main_test.c'
'Invoking: MSP430 Compiler'
"D:/TI/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx –abi=coffabi -O0 -g –include_path="D:/TI/ccsv5/ccs_base/msp430/include" –include_path="D:/TI/ccsv5/tools/compiler/msp430/include" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/F5xx_F6xx_Core_Lib" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/MSP-EXP430F5529_HAL" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/FatFs" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/CTS" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_API/USB_CDC_API" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_API/USB_Common" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_API/USB_HID_API" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_User" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_API" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/USB/USB_config" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/UserExperienceDemo" –include_path="C:/Users/KunGen/workspace_v5_1/LAB1/UserExperienceDemo/Puzzle" –gcc –define=__MSP430F5529__ –diag_warning=225 –display_error_number –silicon_errata=CPU21 –silicon_errata=CPU22 –silicon_errata=CPU23 –silicon_errata=CPU40 –large_memory_model –printf_support=minimal –preproc_with_compile –preproc_dependency="main_test.pp" "../main_test.c"
"../main_test.c", line 130: warning #179-D: variable "mod_rat" was declared but never referenced
'Finished building: ../main_test.c'
' '
'Building target: LAB1.out'
'Invoking: MSP430 Linker'
"D:/TI/ccsv5/tools/compiler/msp430/bin/cl430" -vmspx –abi=coffabi -O0 -g –gcc –define=__MSP430F5529__ –diag_warning=225 –display_error_number –silicon_errata=CPU21 –silicon_errata=CPU22 –silicon_errata=CPU23 –silicon_errata=CPU40 –large_memory_model –printf_support=minimal -z -m"LAB1.map" –stack_size=160 –heap_size=160 –use_hw_mpy=F5 -i"D:/TI/ccsv5/ccs_base/msp430/include" -i"D:/TI/ccsv5/tools/compiler/msp430/lib" -i"D:/TI/ccsv5/tools/compiler/msp430/include" –reread_libs –warn_sections –undef_sym=iUsbInterruptHandler –rom_model -o "LAB1.out" "./MSP-EXP430F5529_HAL/HAL_DAC.obj" "./MSP-EXP430F5529_HAL/HAL_ADC12.obj" "./USB/USB_User/usb_eventHandling.obj" "./USB/USB_User/usbConstructs.obj" "./USB/USB_User/UsbMscUser.obj" "./USB/USB_config/descriptors.obj" "./USB/USB_config/UsbIsr.obj" "./system_pre_init.obj" "./main_test.obj" "./MSP430_test.obj" -l"libc.a" "../MSP-EXP430F5529_UE.lib" "../lnk_msp430f5529.cmd" "../lnk_msp430f5529_USB.cmd" "../rts430xl.lib"<Linking>

undefined first referenced
symbol in file ——— —————-
Dogs102x6_numberDraw ./main_test.obj

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

>> Compilation failure
gmake: *** [LAB1.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

注:Dogs102x6_numberDraw()这个函数我写在了别的头文件里,在头文件里声明了,而且已经把头文件添加到源文件中了,不知道为什么报这个错误,希望能够帮助解答!谢谢!

灰小子:

能否把定义和声明Dogs102x6_numberDraw()的文件传上来看一看

Kun Duan:

回复 灰小子:

这个是头文件,附件是源文件,谢谢!#ifndef HAL_DOGS102X6_H#define HAL_DOGS102X6_H

#include <stdint.h>

// Screen size#define DOGS102x6_X_SIZE 102 // Display Size in dots: X-Axis#define DOGS102x6_Y_SIZE 64 // Display Size in dots: Y-Axis

// Screen printing styles#define DOGS102x6_DRAW_NORMAL 0x00 // Display dark pixels on a light background#define DOGS102x6_DRAW_INVERT 0x01 // Display light pixels on a dark backgroundextern uint8_t dogs102x6Memory[]; // Provide direct access to the frame buffer

extern void Dogs102x6_init(void);extern void Dogs102x6_backlightInit(void);extern void Dogs102x6_disable(void);extern void Dogs102x6_writeCommand(uint8_t* sCmd, uint8_t i);extern void Dogs102x6_writeData(uint8_t* sData, uint8_t i);extern void Dogs102x6_setAddress(uint8_t pa, uint8_t ca);extern uint8_t Dogs102x6_getContrast(void);extern uint8_t Dogs102x6_getBacklight(void);extern void Dogs102x6_setContrast(uint8_t newContrast);extern void Dogs102x6_setBacklight(uint8_t brightness);extern void Dogs102x6_setInverseDisplay(void);extern void Dogs102x6_clearInverseDisplay(void);extern void Dogs102x6_scrollLine(uint8_t lines);extern void Dogs102x6_setAllPixelsOn(void);extern void Dogs102x6_clearAllPixelsOn(void);extern void Dogs102x6_clearScreen(void);extern void Dogs102x6_charDraw(uint8_t row, uint8_t col, uint16_t f, uint8_t style);extern void Dogs102x6_charDrawXY(uint8_t x, uint8_t y, uint16_t f, uint8_t style);extern void Dogs102x6_stringDraw(uint8_t row, uint8_t col, char *word, uint8_t style);extern void Dogs102x6_stringDrawXY(uint8_t x, uint8_t y, char *word, uint8_t style);extern void Dogs102x6_clearRow(uint8_t row);extern void Dogs102x6_pixelDraw(uint8_t x, uint8_t y, uint8_t style);extern void Dogs102x6_horizontalLineDraw(uint8_t x1, uint8_t x2, uint8_t y, uint8_t style);extern void Dogs102x6_verticalLineDraw(uint8_t y1, uint8_t y2, uint8_t x, uint8_t style);extern void Dogs102x6_lineDraw(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint8_t style);extern void Dogs102x6_circleDraw(uint8_t x, uint8_t y, uint8_t radius, uint8_t style);extern void Dogs102x6_imageDraw(const uint8_t IMAGE[], uint8_t row, uint8_t col);extern void Dogs102x6_clearImage(uint8_t height, uint8_t width, uint8_t row, uint8_t col);extern void Dogs102x6_numberDraw(char row, char col, unsigned int f);

#endif /* HAL_DOGS102x6_H */

Kun Duan:

回复 灰小子:

这两个是linker的配置

HG:

回复 Kun Duan:

看上去像是numberDraw ()函数里有什么字符编译器认不得啊,比如中文字符什么的。有没有可能屏蔽函数内容,只留接口,看看对不对。

Dogs102x6_numberDraw()

{

    /* xxxxxxxxx */

Kun Duan:

回复 HG:

我按照您的方法试了一下,问题还是出现了,还是链接出的问题

Kun Duan:

回复 HG:

需要我把整个工程文件传上来吗?

赞(0)
未经允许不得转载:TI中文支持网 » 关于CCSV5.1编译错误的问题
分享到: 更多 (0)