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.

Unresolved symbol CCS 6



Hi there,

I had this project working on ccs 4 (I think) at college and I need to work now at home, so I installed the ccs 6.

I've just created new project, configured the compiler and copy/pasted all the files (.c, .h and .lib) of the project.

Somehow when it compiles it gets 2 unresolved symbol errors.

-One from a function called in main.c ( pll_frequency_setup() ), it's declared in file PLL.c in the same file as main.c

-Second one is sine function from math.h, called at sinewave.c

Why the compiler can't see those functions? It's not enough with the include "PLL.h" ?

I'm a bit new with all of this, so I'm sorry if the questions sound stupid.

Thank you.

  • Please see this page for an explanation of the error: http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#Error:_unresolved_symbols_remain

    The key thing is that the linker needs to find the definition for those symbols either within a source file in the project or in a library. 

  • Thank you for the response.

    I've understood the theory (I believe haha), but I don't know how to apply it.

    So for default I got this:

    So I have to add the path of the libraries, something like this?

    workspace dir for the PLL.h and the includes dir for the math.h

    but still the same error, so I am not doing it right. How should I exactly configure it?

    Thank you again.

  • There are two places where search paths are specified, one is under Compiler options and the other is under Linker options. The compiler --include_path option specifies where to search for header files, while the linker --search_path option specifies where to search for libraries and linker command files.

    The key thing here is to figure out which source files or libraries contain the "definition" for the unresolved symbols. If it is in a C source file, make sure that file is part of the project and getting compiled properly (by looking at the CCS build console). If it is in the library, make sure the library is being linked in at the link step (also by looking at the CCS build console).

  • Ok, to understand all of these configuration, now I'm trying to compile a basic project which is this one (bassicaly turn on/off leds):

    And I still get similar errors.

    The "USBSTK5515_GPIO_setOutput" funciton is declared at "ubstk5515_gpio.h" and "ubstk5515_gpio.c" files, which they are in the same file as main.c,

    The compiler should 'see' the declaration but it seems it can't locate it.

    And I have this in File Search Path

    Am I referencing the headers right?

    Why compiler can't locate the function? What is it that I'm missing?

    thanks a lot.

  • FS2131 said:
    Am I referencing the headers right?

    No. Header files are not specified under --library option (this option is only for library .lib files). The path to header files (just the path, not the name of header file) should be specified instead under C5500 Compiler->Include Options->--include_path. The header file should be #included in the C source wherever required.

    If you are new to our tools, here is some suggested reading about the compiler and linker options:
    http://processors.wiki.ti.com/index.php/TI_Compiler_Information#Compiler_Manuals

    I can't pinpoint the reason for the error without looking at all the source files in the project and complete build output. If you zip up your project and attach it here I could try to take a look.