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.

Compiler/TMS320C6678: unresolved symbols in code calling methods from ipc, xdc and sysbios

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

Hello,

I have created a new CCS 7 empty project with PDK 4.01 in which I test a sample code from a tutorial. I kept all automatic parameters. The problem is that several source files of the application call methods from ipc, xdc and sysbios which are not found at link time (but the compilation is fine, and the communication test with the DSP is fine). I guess it comes from my installation parameters or from a configuration I missed.

I tried to add several libraries from the installation folders of xdc, ipc and pdk but it just created more unresolved symbols. Do you have any idea of what I did wrong ?

I put the main part of the error and the cfg file below. In the link command you can see the folders where I tried to find the missing libraries (with -i"/home/ahonorat/ti/...").

Thanks

----------------------------------------------

Building target: sobel-6678.out
Invoking: C6000 Linker
"/home/ahonorat/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/bin/cl6x" -mv6600 -g --define=SOC_C6678 --define=EVM_C6678 --define=USE_BIOS --define=DEVICE_C6678 --diag_wrap=off --display_error_number --diag_warning=225 -z -m"sobel-6678.map" -i"/home/ahonorat/ti/pdk_c667x_2_0_7/packages/ti/platform/evmc6678l/platform_lib/lib/debug/" -i"/home/ahonorat/ti/ti-cgt-c6000_8.1.3/lib/" -i"/home/ahonorat/ti/dsplib_c66x_3_4_0_0/packages/ti/dsplib/lib/" -i"/home/ahonorat/ti/ipc_3_46_02_04/packages/ti/sdo/ipc/lib/ipc/instrumented" -i"/home/ahonorat/ti/ipc_3_46_02_04/packages/ti/sdo/utils/lib/utils/instrumented" -i"/home/ahonorat/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/lib" -i"/home/ahonorat/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="sobel-6678_linkInfo.xml" --rom_model -o "sobel-6678.out" "./generated/Core0.obj" "./generated/Core1.obj" "./generated/Core2.obj" "./generated/Core3.obj" "./generated/Core4.obj" "./generated/Core5.obj" "./generated/Core6.obj" "./generated/Core7.obj" "./src/cache.obj" "./src/communication.obj" "./src/dump.obj" "./src/fifo.obj" "./src/main.obj" "./src/memory.obj" "./src/semaphore6678.obj" "./src/sobel.obj" "./src/splitMerge.obj" "./src/utils.obj" "./src/yuvDisplay.obj" "./src/yuvRead.obj"  -llibc.a
<Linking>
warning #10247-D: creating output section ".neardata" without a SECTIONS specification
warning #10247-D: creating output section ".rodata" without a SECTIONS specification
warning #10247-D: creating output section ".bss" without a SECTIONS specification
warning #10247-D: creating output section ".text" without a SECTIONS specification
warning #10247-D: creating output section ".const" without a SECTIONS specification
warning #10247-D: creating output section ".fardata" without a SECTIONS specification
warning #10247-D: creating output section ".cinit" without a SECTIONS specification
warning #10247-D: creating output section ".stack" without a SECTIONS specification
warning #10247-D: creating output section ".far" without a SECTIONS specification
warning #10247-D: creating output section ".switch" without a SECTIONS specification
warning #10247-D: creating output section ".mySharedMem" without a SECTIONS specification
warning #10247-D: creating output section ".MSMCSRAM" without a SECTIONS specification
warning #10247-D: creating output section ".myInputVideoMem" without a SECTIONS specification
warning #10210-D: creating ".stack" section with default size of 0x400; use the -stack option to change the default size

 undefined                        first referenced       
  symbol                              in file            
 ---------                        ----------------       
 GateMP_Params_init               ./src/semaphore6678.obj
 GateMP_close                     ./src/semaphore6678.obj
 GateMP_create                    ./src/semaphore6678.obj
 GateMP_delete                    ./src/semaphore6678.obj
 GateMP_enter                     ./src/semaphore6678.obj
 GateMP_leave                     ./src/semaphore6678.obj
 GateMP_open                      ./src/semaphore6678.obj
 Ipc_start                        ./src/communication.obj
 MultiProc_self                   ./src/communication.obj
 Notify_registerEvent             ./src/communication.obj
 Notify_sendEvent                 ./src/communication.obj
 ti_sysbios_BIOS_exit__E          ./src/main.obj         
 ti_sysbios_BIOS_start__E         ./src/main.obj         
 ti_sysbios_knl_Semaphore_create  ./src/communication.obj
 ti_sysbios_knl_Semaphore_pend__E ./src/communication.obj
 ti_sysbios_knl_Semaphore_post__E ./src/communication.obj
 xdc_runtime_System_abort__E      ./src/communication.obj
 xdc_runtime_System_printf__E     ./src/dump.obj         
 xdc_runtime_Timestamp_get32__E   ./src/dump.obj         

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

>> Compilation failure
makefile:159 : la recette pour la cible « sobel-6678.out » a échouée
makefile:155 : la recette pour la cible « all » a échouée
gmake[1]: *** [sobel-6678.out] Erreur 1
gmake: *** [all] Erreur 2

**** Build Finished ****
--------------------------------------------


var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
var Memory = xdc.useModule('xdc.runtime.Memory');

/*
 *  Get the list of names that the build device supports.
 *  I.e. ["CORE0", "CORE1", "CORE2" ... ]
 */
var nameList = MultiProc.getDeviceProcNames();

/*
 *  Since this is a single-image example, we don't (at build-time) which
 *  processor we're building for.  We therefore supply 'null'
 *  as the local procName and allow IPC to set the local procId at runtime.
 */
MultiProc.setConfig(null, nameList);

/*
 *  The SysStd System provider is a good one to use for debugging
 *  but does not have the best performance. Use xdc.runtime.SysMin
 *  for better performance.
 */
var System   = xdc.useModule('xdc.runtime.System');
var SysStd   = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
/* Support for %f in printf */
System.extendedFormats = "%f%$S";

/* Modules explicitly used in the application */
var MessageQ    = xdc.useModule('ti.sdo.ipc.MessageQ');
var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP   = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var MultiProc   = xdc.useModule('ti.sdo.utils.MultiProc');
var Notify = xdc.useModule('ti.sdo.ipc.Notify');
var Timestamp = xdc.useModule('xdc.runtime.Timestamp');


/* BIOS/XDC modules */
var BIOS        = xdc.useModule('ti.sysbios.BIOS');
BIOS.heapSize   = 0x8000;
var Task        = xdc.useModule('ti.sysbios.knl.Task');

var tsk0 = Task.create('&tsk0_func');
tsk0.instance.name = "tsk0";

/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;

/* Shared Memory base address and length */
var SHAREDMEM           = 0x0C000000;
var SHAREDMEMSIZE       = 0x000FFFFC; // 1 MByte - 4 byte

/*
 *  Need to define the shared region. The IPC modules use this
 *  to make portable pointers. All processors need to add this
 *  call with their base address of the shared memory region.
 *  If the processor cannot access the memory, do not add it.
 */
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
    { base: SHAREDMEM,
      len:  SHAREDMEMSIZE,
      ownerProcId: 0,
      isValid: true,
      name: "DDR2 RAM",
    });

/* Create a heap */
/* Uncomment the following lines only if you are using the dynamic allocation
var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
SharedRegion.setEntryMeta(1,
    { base: 0x80000000,
      len:  0x10000000,
      ownerProcId: 0,
      isValid: true,
      name: "DDR3",
      createHeap: true,
    });
    */


/** SharedMemory Section */
Program.sectMap[".mySharedMem"] = "DDR3";
Program.sectMap[".MSMCSRAM"] = "MSMCSRAM";

/** Const Section DDR3*/
Program.sectMap[".myConstMem"] = "DDR3";

Program.sectMap[".myInputVideoMem"] = new Program.SectionSpec();
Program.sectMap[".myInputVideoMem"].loadSegment ="DDR3";
Program.sectMap[".myInputVideoMem"].type = "NOINIT";

  • Hi,

    Which example are you using? Also please share which sdk version is this?

    Best Regards,
    Yordan
  • Hi,

    here is a sum-up of my ti folder:

    CCS7, bios_6_46_05_55, pdk_c667x_2_0_7, ti-cgt-c6000_8.1.3, ctoolslib_2_2_0_0, dsplib_c66x_3_4_0_0, processor_sdk_rtos_c667x_4_01_00_06, xdctools_3_50_03_33_core, ipc_3_46_02_04, uia_2_00_06_52, xdais_7_24_00_04.

    The example I used is not from TI, however it works completely with CCS5.

    Regards,

    Alexandre

  • Alexandre,

    Have you setup the Processor SDK RTOS environment as described in the Getting started guide:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_Getting_Started_Guide

    If you are creating SYSBIOS and IPC projects from scratch then you need to make sure that the RTSC products that will be used in your project are linked to your project. For Examples right click on the project and go to Build Settings in the CCS General option select RTSC tab and make sure BIOS, IPC, XDC tools options are selected.

    From .cfg perspective, we provide examples for IPC BIOS usage for this device under ipc_3_44_01_01\examples\C6678_bios_elf. Have you referred to the .cfg that is provided in that project.

    Just from your build log it appears it appears, your project is not linking to the basic product libraries. Can you provide full log in a text file and attach it here. This will provide additional insight for us to provide guidance.

    Regards,
    Rahul
  • Hi,

    thanks for your reply, I checked the binary of the same project in CCS5 with mcsdk and it appears that some libraries it uses are not present in my installation with CCS7 and PDK (libs that should be located in bios and xdctools folder). From the ipc example you mentioned I've seen that some lines like the followings are missing in my cfg file:

    /* select ipc libraries */
    var Build = xdc.useModule('ti.sdo.ipc.Build');
    Build.libType = (RB ? Build.LibType_NonInstrumented : Build.LibType_Debug);
    Build.assertsEnabled = (RB ? false : true);
    Build.logsEnabled = (RB ? false : true);

    and

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);

    To be sure, does that mean that bios and xdc libs for c6678 are compiled at the same time as the project? (so the binaries are not provided during the installation of the PDK) Are the above line of codes enough to trigger the compilation of these libs ? Moreover, where can I find some details about the .cfg files syntax and semantic ?

    In my project configuration RTSC, BIOS and XDC products are indeed selected, and they add some paths to the compiler and the linker options through environment variables. Unfortunately these environment variables, like {XDC_LIBRARY_PATH} are not set and refer to nothing. Is there a way to set them autmatically?

    Regards,

    Alexandre

  • Hi Alexandre,

    Looking at the release notes: processors.wiki.ti.com/.../Processor_SDK_RTOS_Release_Notes

    Your version of XDC tools (3.50.3.33) may not be compatible with the SDK components. Can you try using the version that comes with the SDK (3.32.1.22)?

    Regards,
    Sahin
  • Hi,

    I tried by modifying the direct path to the xdc directory in the C6000 compiler include options, and it didn't work.

    However I tried to remove the cfg file and to add it again and this time ccs7 opened a dialog asking if I wanted to use xdc. Of course I said yes and it seems that it added the following lines in my .cproject file.

    ------------------------------- .cproject

                                <tool id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.330522260" name="XDCtools" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool">
                                    <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR.1653546474" name="Compiler tools directory (-c)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.CODEGEN_TOOL_DIR" value="${CG_TOOL_ROOT}" valueType="string"/>
                                    <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET.1838215961" name="Target (-t)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.TARGET" value="ti.targets.elf.C66" valueType="string"/>
                                    <option id="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE.139404455" name="Build-profile (-r)" superClass="com.ti.rtsc.buildDefinitions.XDC_3.16.tool.BUILD_PROFILE" value="debug" valueType="string"/>
                                </tool>
    ------------------------------ .cproject

    The XDC version in this automatically added configuration is not the same, but the xdc tool is correctly called anyway. After xdc being called, the compilation is still not working with the modified, now I get the following error :

    ---------------------------------------

    Building file: ../modelPreesm.cfg
    Invoking: XDCtools
    "/home/ahonorat/ti/xdctools_3_50_03_33_core/xs" --xdcpath= xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -r debug -c "/home/ahonorat/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4" "../modelPreesm.cfg"
    making package.mak (because of package.bld) ...
    making package.mak (because of package.bld) ...
    subdir_rules.mk:10 : la recette pour la cible « build-477185169-inproc » a échouée
    gmake[1] : on quitte le répertoire « /home/ahonorat/Documents/logiciels/sources/preesm-tutorials/sobel/org.ietr.preesm.sobel/CodeC6678/Debug »
    subdir_rules.mk:7 : la recette pour la cible « build-477185169 » a échouée
    js: "./config.bld", line 10: Error: Can't find the target named 'ti.targets.elf.C66' along the path '/home/ahonorat/ti/xdctools_3_50_03_33_core/packages;..;': please check the spelling of the target's name and that it exists along this path.

    ---------------------------------------

    This file is indeed neither existing in the ti folder nor in my project folder.

    I guess this is configuration problem since after looking at the release notes, there is no known problem for the functions that I am using. I would bet on two possible reasons : a missing or wrong configuration variable (like the environment variables I mentioned in my previous post), and a wrong installation of XDC.

    Regards,

    Alexandre

  • Hi Alexandre,

    You can set your XDC tools version by going to Project Properties -> CCS General -> RTSC tab and selecting the version from the drop-down menu. Once you have the correct version set, go to Project Properties -> CCS Build -> XDCtools -> Package Repositories and ensure that the paths listed are correct.

    Please try the above and let us know where you are at.

    Best,
    Sahin
  • Hi Sahin,

    I tried again by copying all my files in a new project and I selected the XDC version 3.32.2.25 that you mentioned. The compilation process takes more time so I guess it's better than before but I still have some errors at the end. Two variables are said to be undefined. However I checked in the include folders and  they are well defined in some files. The two undefined variables are :

    CSL_C66X_COREPAC_REG_BASE_ADDRESS_REGS

    CSL_DSP_DSP_XMC_CTRL_REGS

    Regards,

    Alexandre

  • Hi Alexandre,

    If the header files are included and it's still giving that error then I suspect you're missing the SOC_C6678 predefined symbol in your project settings. To add this, right click on your project and go to Properties -> CCS Build -> C6000 Compiler -> Advanced Options -> Predefined Symbols and add SOC_C6678 under Pre-define NAME.

    Hope this resolves the issue. Let us know if you run into any other problems.

    Best,
    Sahin
  • Hi Sahin,

    the compilation didn't work with the SOC_C6678 symbol, but it worked with DEVICE_C6678. Any idea why?

    Now I will test the execution of the code on the device, I'll close the topic if it is successful.

    Thanks,

    Alexandre

  • Hi Alexandre,

    You are right, you need to define DEVICE_C6678 as well. Generally you would need to define both, but the example you are using may not require it.

    If your issue has been resolved, mark the thread as resolved so we can close it. If not, just post a reply below. Thanks!

    Best,
    Sahin

  • It apparently worked, thank you Sahin!