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.

Error after including libc.a

Other Parts Discussed in Thread: AM3359

This is my first project with the CCS v6 and my compiler version is 5.2.5. I am working with ICE AM3359. I was trying to generate binary file for the sample project "audio_buzzer". I got errors stating undefined symbol, after checking with CCS forum i found out that a library is missing. Now i have included pre-built library libc.a, but now i am getting syntax errors in the "src" folder's source files.

Any help is appreciated.

Thanks

  • Please capture the entire build log in a text file and attach that file to your next post. Please see this post for the details.

    Thanks and regards,

    -George

  • I got this error after i included libc.a file in workspace.

    5327.Log.txt

  • Do not add the entire runtime support (RTS) library source code tree to your project.  Instead, refer to the RTS library of object modules.  This is normally configured for you when you create a new CCS project.  I'm not sure how that failed to happen this time. 

    The screen shot below shows how it looks in the CCS project build settings.  This causes the linker command line to see "-l libc.a".  The linker, in turn, changes that into the actual RTS object modules library used. 

    Thanks and regards,

    -George

  • Thanks George, even after i did this I am getting "unresolved symbol remains" error. I checked and found that header files what we include are containing only function prototypes and no definitions. Can you please guide me regarding this.

    Thank you
  • Rohan Eric said:
    I checked and found that header files what we include are containing only function prototypes and no definitions

    That is typically how code from object libraries is presented.  The header files have function prototypes, and object modules in the library provide the function implementation.

    Rohan Eric said:
    I am getting "unresolved symbol remains" error

    I'm sorry to ask for it again.  But please post the build log just like you did before.

    Thanks and regards,

    -George

  • I started the project from the beginning again, I found out the files which were missing.So now i am left with only one error stating "#18 expected a ")" " in cpu.c file. Below i am including my recent log and snapshot of the portion of the program containing error .

    Thanks a lot for your interest. I appreciate your valuable help.

    ConsoleLog.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    **** Build of configuration Debug for project Proj ****
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../cpu.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/bin/armcl" -mv7A8 --code_state=32 --abi=ti_arm9_abi -me -O0 --fp_mode=strict --opt_for_speed=2 --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/drivers" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/include/armv7a" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/utils" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/include/armv7a/am335x" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/include/hw" --include_path="P:/ICE/am335x_sysbios_ind_sdk_1.1.0.8/sdk/starterware/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.6/include" -g --define=am3359 --diag_warning=225 --display_error_number --diag_wrap=off --preproc_with_compile --preproc_dependency="cpu.pp" "../cpu.c"
    "../cpu.c", line 117: error #18: expected a ")"
    "../cpu.c", line 119: warning #551-D: variable "stat" is used before its value is set
    1 error detected in the compilation of "../cpu.c".
    >> Compilation failure
    gmake: *** [cpu.obj] Error 1
    gmake: Target `all' not remade because of errors.
    **** Build Finished ****
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • The TI compiler does not support GCC-style inline assembly syntax. You'll need to write that function in assembly code.