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.

GPP side of DSLINK apps in CCStudio 3.3?

Other Parts Discussed in Thread: CCSTUDIO

Hello,

Can someone tell me how do I setup a project in order to compile the GPP side of a DSPLINK sample app (say, loop) inCCStudio v3.3? I found and followed instructions to build the DSP side of the same app and have been successful. I don't know which linker file to add to the project (if at all it needs one) and what include paths/libraries to include.

I have added the source files (loop.c from the sample code provided in DSPLINK), a linker found online and set up the include paths/libraries in the compiler and linker sections. But I still get this error:

---------------------------- loopgpp.pjt - Debug ----------------------------
[loop.c]
"C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -g -pdsw225 -o2 -fr"C:/CCStudio_v3.3/MyProjects/loopgpp/Debug" -i"D:/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include" -i"D:/linux-03.20.00.14/include" -i"D:/dsplink_mod/gpp/inc" -i"D:/dsplink_mod/gpp/inc/usr" -i"D:/dsplink_mod/gpp/inc/sys/Linux" -i"D:/dsplink_mod/gpp/inc/sys/Linux/2.6.18" -i"D:/dsplink_mod/gpp/src/samples/loop" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux/2.6.18" -i"D:/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include" -i"D:/dsplink_mod/gpp/BUILD/INCLUDE/USER" -d"_DEBUG" -d"OS_LINUX" -d"MAX_DSPS=1" -d"MAX_PROCESSORS=2" -d"ID_GPP=1" -d"OMAPL1XX" -d"PROC_COMPONENT" -d"POOL_COMPONENT" -d"NOTIFY_COMPONENT" -d"MPCS_COMPONENT" -d"RINGIO_COMPONENT" -d"MPLIST_COMPONENT" -d"MSGQ_COMPONENT" -d"MSGQ_ZCPY_LINK" -d"CHNL_COMPONENT" -d"CHNL_ZCPY_LINK" -d"ZCPY_LINK" -d"KFILE_DEFAULT" -d"DA8XXGEM" -d"DA8XXGEM_PHYINTERFACE=SHMEM_INTERFACE" -d"GPP_SWI_MODE" -d"_REENTRANT" -d"VERIFY_DATA" -d"DDSP_DEBUG" -m
e -mv5e --abi=eabi --gcc --elf --verbose -c -@"../Debug.lkf" "loop.c"
TMS470 C/C++ Compiler v4.4.12
Tools Copyright (c) 1996-2008 Texas Instruments Incorporated
"loop.c" ==> LOOP_Create
"loop.c" ==> LOOP_VerifyData
"loop.c" ==> LOOP_Execute
"loop.c" ==> LOOP_Delete
"loop.c" ==> LOOP_Main

[Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
<Linking>
fatal error: file "C:\\CCStudio_v3.3\\MyProjects\\loopgpp\\Debug\\loop.obj" has
a Tag_ABI_PCS_wchar_t attribute value of "2" that is different than one
previously seen ("4"); combining incompatible files

>> Compilation failure

Build Complete,
1 Errors, 0 Warnings, 0 Remarks.

PLEASE HELP.

Thank you,

Bindu

  • I don't know much about DSPLINK but I have seen the linker error before. You have a memory model mismatch between various object files.

    Explained in more detail here:

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/48840.aspx

    Thanks

    ki

  • Ki-Soo,

    Thank you for taking the time to answer my question. However, I could still not fix the problem. None of the libraries available in the C:\CCStudio_v3.3\C6000\cgtools\lib\ folder are compatible types and it says "liba.c could not resolve library".

    Here are more details of my project:

    I'm using the OMAPL137 EVM and trying to compile the GPP side of code for DSPLINK applications in CCStudio v3.3 (samples/loop.c). 

    Compiler options I'm using: -g -pdsw225 -o2 -fr"$(Proj_dir)\Debug" -i"D:\angstrom\arm\lib\gcc\arm-angstrom-linux-gnueabi\4.3.3\include" -i"D:\linux-03.20.00.14\include" -i"D:\dsplink_mod\gpp\inc" -i"D:\dsplink_mod\gpp\inc\usr" -i"D:\dsplink_mod\gpp\inc\sys\Linux" -i"D:\dsplink_mod\gpp\inc\sys\Linux\2.6.18" -i"D:\dsplink_mod\gpp\src\samples\loop" -i"D:\dsplink_mod\gpp\src\samples\loop\Linux" -i"D:\dsplink_mod\gpp\src\samples\loop\Linux\2.6.18" -i"D:\angstrom\arm\arm-angstrom-linux-gnueabi\usr\include" -i"D:\dsplink_mod\gpp\BUILD\INCLUDE\USER" -d"_DEBUG" -d"OS_LINUX" -d"MAX_DSPS=1" -d"MAX_PROCESSORS=2" -d"ID_GPP=1" -d"OMAPL1XX" -d"PROC_COMPONENT" -d"POOL_COMPONENT" -d"NOTIFY_COMPONENT" -d"MPCS_COMPONENT" -d"RINGIO_COMPONENT" -d"MPLIST_COMPONENT" -d"MSGQ_COMPONENT" -d"MSGQ_ZCPY_LINK" -d"CHNL_COMPONENT" -d"CHNL_ZCPY_LINK" -d"ZCPY_LINK" -d"KFILE_DEFAULT" -d"DA8XXGEM" -d"DA8XXGEM_PHYINTERFACE=SHMEM_INTERFACE" -d"GPP_SWI_MODE" -d"_REENTRANT" -d"VERIFY_DATA" -d"DDSP_DEBUG" -me -mv5e --verbose -c

    Linker options used: -c -m".\Debug\loopgpp.map" -o".\Debug\loopgpp" -w -x -i"C:\CCStudio_v3.3\C6000\cgtools\lib" -i"D:\linux-03.20.00.14\include" -l"C:\CCStudio_v3.3\C6000\cgtools\lib\rts6700.lib" --runtime=rts

    Linker cmd:

    -stack 0x2000
    -heap 0x2000

    MEMORY
    {
    DSPL2ROM o = 0x00700000 l = 0x00010000 /* 1MB L2 Internal ROM */
    DSPL2RAM o = 0x00800000 l = 0x00040000 /* 256kB L2 Internal RAM */
    DSPL1PRAM o = 0x00E00000 l = 0x00008000 /* 32kB L1 Internal Program RAM */
    DSPL1DRAM o = 0x00F00000 l = 0x00008000 /* 32kB L1 Internal Data RAM */
    SHDSPL2ROM o = 0x11700000 l = 0x00100000 /* 1MB L2 Shared Internal ROM */
    SHDSPL2RAM o = 0x11800000 l = 0x00040000 /* 256kB L2 Shared Internal RAM */
    SHDSPL1PRAM o = 0x11E00000 l = 0x00008000 /* 32kB L1 Shared Internal Program RAM */
    SHDSPL1DRAM o = 0x11F00000 l = 0x00008000 /* 32kB L1 Shared Internal Data RAM */
    EMIFASDRAM o = 0x40000000 l = 0x08000000 /* 64MB SDRAM Data (CS0) */
    EMIFACS2 o = 0x60000000 l = 0x02000000 /* 32MB Async Data (CS2) */
    EMIFACS3 o = 0x62000000 l = 0x02000000 /* 32MB Async Data (CS3) */
    EMIFACS4 o = 0x64000000 l = 0x02000000 /* 32MB Async Data (CS4) */
    EMIFACS5 o = 0x66000000 l = 0x02000000 /* 32MB Async Data (CS5) */
    SHRAM o = 0x80000000 l = 0x00020000 /* 128kB Shared RAM */
    SDRAM o = 0xC0000000 l = 0x10000000 /* 256MB SDRAM Data */
    ARMRAM o = 0xFFFF0000 l = 0x00002000 /* 8kB ARM local RAM */
    }

    SECTIONS
    {
    .text > SDRAM
    .stack > SDRAM
    .bss > SDRAM
    .cio > SDRAM
    .const > SDRAM
    .data > SDRAM
    .switch > SDRAM
    .sysmem > SDRAM
    .far > SDRAM
    .args > SDRAM
    .ppinfo > SDRAM
    .ppdata > SDRAM

    /* TI-ABI or COFF sections */
    .pinit > SDRAM
    .cinit > SDRAM

    /* EABI sections */
    .binit > SDRAM
    .init_array > SDRAM
    .neardata > SDRAM
    .fardata > SDRAM
    .rodata > SDRAM
    .c6xabi.exidx > SDRAM
    .c6xabi.extab > SDRAM
    }

    The project consists of loop.c from the \dsplink\gpp\src\samples\loop and the linker cmd file.

    Error I get:

    [loop.c]
    "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -g -pdsw225 -o2 -fr"C:/CCStudio_v3.3/MyProjects/loopgpp/Debug" -i"D:/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include" -i"D:/linux-03.20.00.14/include" -i"D:/dsplink_mod/gpp/inc" -i"D:/dsplink_mod/gpp/inc/usr" -i"D:/dsplink_mod/gpp/inc/sys/Linux" -i"D:/dsplink_mod/gpp/inc/sys/Linux/2.6.18" -i"D:/dsplink_mod/gpp/src/samples/loop" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux/2.6.18" -i"D:/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include" -i"D:/dsplink_mod/gpp/BUILD/INCLUDE/USER" -d"_DEBUG" -d"OS_LINUX" -d"MAX_DSPS=1" -d"MAX_PROCESSORS=2" -d"ID_GPP=1" -d"OMAPL1XX" -d"PROC_COMPONENT" -d"POOL_COMPONENT" -d"NOTIFY_COMPONENT" -d"MPCS_COMPONENT" -d"RINGIO_COMPONENT" -d"MPLIST_COMPONENT" -d"MSGQ_COMPONENT" -d"MSGQ_ZCPY_LINK" -d"CHNL_COMPONENT" -d"CHNL_ZCPY_LINK" -d"ZCPY_LINK" -d"KFILE_DEFAULT" -d"DA8XXGEM" -d"DA8XXGEM_PHYINTERFACE=SHMEM_INTERFACE" -d"GPP_SWI_MODE" -d"_REENTRANT" -d"VERIFY_DATA" -d"DDSP_DEBUG" -m
    e -mv5e --verbose -c -@"../Debug.lkf" "loop.c"
    TMS470 C/C++ Compiler v4.4.12
    Tools Copyright (c) 1996-2008 Texas Instruments Incorporated
    "loop.c" ==> LOOP_Create
    "loop.c" ==> LOOP_VerifyData
    "loop.c" ==> LOOP_Execute
    "loop.c" ==> LOOP_Delete
    "loop.c" ==> LOOP_Main

    [Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
    <Linking>
    fatal error: attempt to link an object file that is not built for Advanced RISC
    Machines ARM ("C:/CCStudio_v3.3/C6000/cgtools/lib/rts6700.lib<boot.obj>" =
    TI C6x)

    >> Compilation failure

    Build Complete,
    1 Errors, 0 Warnings, 0 Remarks.

    As again, please help.

    Bindu

  • We are further investigating the first issue.

    Regarding your second issue...

    Bindu Jagannatha said:
    [Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
    <Linking>
    fatal error: attempt to link an object file that is not built for Advanced RISC
    Machines ARM ("C:/CCStudio_v3.3/C6000/cgtools/lib/rts6700.lib<boot.obj>" =
    TI C6x)

    Now I'm confused. You are using the ARM tools to build but your project is referencing C6000 libraries. I think you are building for ARM, judging from your build options. And I see it references files from the gcc build tools. What kind of project are you building?

  • Bindu Jagannatha said:
    Linker options used: -c -m".\Debug\loopgpp.map" -o".\Debug\loopgpp" -w -x -i"C:\CCStudio_v3.3\C6000\cgtools\lib" -i"D:\linux-03.20.00.14\include" -l"C:\CCStudio_v3.3\C6000\cgtools\lib\rts6700.lib" --runtime=rts

    Ok I see the problem. You are building an ARM project but you are including the C6000 run-time library. You need to grab a library from C:\CCStudio_v3.3\tms470\cgtools\lib

  • Bindu,

    After consulting with some other experts, my initial assumption was incorrect. It is not related to memory models. You probably manually added that library to try to address it when you did not need to.

    I'm afraid I cannot help much because I am simply not familiar with building DSPLINK. I will move your query into the BIOS forum where the folks there are more familiar with it.

    Thanks

    ki

  • Thanks again Ki-Soo.

    Here are the updated details. The compilation error that occurs when I don't provide any options for the linker library (flag -l). I repeat, I only have one source file (dsplink\gpp\src\samples\loop\loop.c) in the project, since the SOURCES file in the same folder contained only this file too:

    ---------------------------- loopgpp.pjt - Debug ----------------------------
    [loop.c]
    "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -g -pdsw225 -o2 -fr"C:/CCStudio_v3.3/MyProjects/loopgpp/Debug" -i"D:/angstrom/arm/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/include" -i"D:/linux-03.20.00.14/include" -i"D:/dsplink_mod/gpp/inc" -i"D:/dsplink_mod/gpp/inc/usr" -i"D:/dsplink_mod/gpp/inc/sys/Linux" -i"D:/dsplink_mod/gpp/inc/sys/Linux/2.6.18" -i"D:/dsplink_mod/gpp/src/samples/loop" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux" -i"D:/dsplink_mod/gpp/src/samples/loop/Linux/2.6.18" -i"D:/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include" -i"D:/dsplink_mod/gpp/BUILD/INCLUDE/USER" -d"_DEBUG" -d"OS_LINUX" -d"MAX_DSPS=1" -d"MAX_PROCESSORS=2" -d"ID_GPP=1" -d"OMAPL1XX" -d"PROC_COMPONENT" -d"POOL_COMPONENT" -d"NOTIFY_COMPONENT" -d"MPCS_COMPONENT" -d"RINGIO_COMPONENT" -d"MPLIST_COMPONENT" -d"MSGQ_COMPONENT" -d"MSGQ_ZCPY_LINK" -d"CHNL_COMPONENT" -d"CHNL_ZCPY_LINK" -d"ZCPY_LINK" -d"KFILE_DEFAULT" -d"DA8XXGEM" -d"DA8XXGEM_PHYINTERFACE=SHMEM_INTERFACE" -d"GPP_SWI_MODE" -d"_REENTRANT" -d"VERIFY_DATA" -d"DDSP_DEBUG" -m
    e -mv5e --verbose -c -@"../Debug.lkf" "loop.c"
    TMS470 C/C++ Compiler v4.4.12
    Tools Copyright (c) 1996-2008 Texas Instruments Incorporated
    "loop.c" ==> LOOP_Create
    "loop.c" ==> LOOP_VerifyData
    "loop.c" ==> LOOP_Execute
    "loop.c" ==> LOOP_Delete
    "loop.c" ==> LOOP_Main

    [Linking...] "C:\CCStudio_v3.3\tms470\cgtools\bin\cl470" -@"Debug.lkf"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    _main C:\CCStudio_v3.3\TMS470\cgtools\lib\rtsv5_A_le_tiarm9.lib<args_main.obj>

    error: unresolved symbols remain
    "SHARED/args_main.c", line 39 (approximate): warning: relocation from function
    "_args_main" to symbol "_main" overflowed; the 32-bit relocated address
    0x9fffee40 is too large to encode in the 25-bit signed PC-Relative field
    (type = 'R_PCR24W' (23), file =
    "C:\CCStudio_v3.3\TMS470\cgtools\lib\rtsv5_A_le_tiarm9.lib<args_main.obj>",
    offset = 0x00000018, section = ".text")
    error: errors encountered during linking; "./Debug/loopgpp" not built

    >> Compilation failure

    Build Complete,
    1 Errors, 1 Warnings, 0 Remarks.

    What I'm trying to do, it avoid using the make files that come with /dsplink, and instead use CCStudio v3.3 to achieve the same goal -- produce the DSP side .out file and the GPP executable. I have been successful in the former, but miserably failing at the latter.

    Bindu

  • Bindu,

    DSPLink applications were designed to be build via command line (Makefiles) since most of the development is expected to be done on the Linux PC. When DSPLink was developed CCS was very limited in its Linux support.

    I see you have succeeded in build the DSP-side. Here a a good link for future reference.  http://processors.wiki.ti.com/index.php/Building_DSPLink_Applications

    As for building GPP-side applications with CCS, it's going to be a difficult task.  If you are already building DSPLink on the Linux PC (via Makefile), you may be better suited to continue to build the GPP-side examples via the same method for a few reason.

    1. Your Linux kernel header needed to build the application are located within the kernel's directory structure which your CCS build machine may not have access to.

    2. You'll need to use the same ARM cross-compiler that was used to build the DSPLink GPP-side libraries.  Using the TI ARM compiler will result in incompatible binaries that may not link.

  • Thank you Arnie, maybe I'll try compiling the GPP-side app as just another C/C++ project, where I will have more control over what compiler and linker its using.