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.

Openmp

Hi

I would make a project with Openmp and TCP connection that DSP worked as client.

So at first I ran "Image_process_omp" project but when I tried to modefied it and maked tcp client by socket, it didn't work, consequently I ran

"client" example and add my socket program and it worked.

Next I would add OpenMP to it so I added OpenMP in RTSC package and copied the config script of "helloworld_omp" file to config script of my project(client). It makes one error like below.

what should I do? How can I add OpenMP to my project and modify the config script file?

best regards

  • Hi,
    Can you please attach the modified *.cfg file here.
  • Hi Titusrathinaraj

    I added the file.(at line 253 I copied the lines from configuration file of OpenMP "helloworld" example).

    I should mentioned I want load may program on core_0 but ran on all cores like "image_process_omp" demo project.

    client_cfg.txt
    /*
     * client.cfg
     *
     * Memory Map and Program intiializations for the client example Utility
     *
     * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ 
     *  
     *  Redistribution and use in source and binary forms, with or without 
     *  modification, are permitted provided that the following conditions 
     *  are met:
     *
     *    Redistributions of source code must retain the above copyright 
     *    notice, this list of conditions and the following disclaimer.
     *
     *    Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the 
     *    documentation and/or other materials provided with the   
     *    distribution.
     *
     *    Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
    */
    
    /*
     *   @file  client.cfg
     *
     *   @brief   
     *      Memory Map and Program intiializations for the HPDSP Utility.
     *
     */
     
    /********************************************************************************************************************
    *  Specify all needed RTSC MOudles and ocnfigure them.																*
    ********************************************************************************************************************/
    
    var Memory  =   xdc.useModule('xdc.runtime.Memory');
    
    var BIOS    =   xdc.useModule('ti.sysbios.BIOS');
    
    var Task    =   xdc.useModule('ti.sysbios.knl.Task');
    
    var HeapBuf =   xdc.useModule('ti.sysbios.heaps.HeapBuf');
    
    var Log     =   xdc.useModule('xdc.runtime.Log');
    
    /*
    ** Allow storing of task names. By default if you name a task with a friendly display name it will not be saved
    ** to conserve RAM. This must be set to true to allow it. We use friendly names on the Task List display.
    */
    //Defaults.common$.namedInstance = true; 
    Task.common$.namedInstance = true;
    
    var Clock   =   xdc.useModule ('ti.sysbios.knl.Clock');
    
    /* 
    ** Interface with IPC. Depending on the version of BIOS you are using the 
    ** module name may have changed.
    */
    /* Use this for pre BIOS 6.30 */
    /* var Sem	    =	  xdc.useModule ('ti.sysbios.ipc.Semaphore'); */
    
    /* Use this for BIOS 6.30 plus to get the IPC module */
    var Sem	= xdc.useModule ('ti.sysbios.knl.Semaphore');
    
    var Hwi	= xdc.useModule ('ti.sysbios.hal.Hwi');
     
    var Ecm = xdc.useModule ('ti.sysbios.family.c64p.EventCombiner'); 
    
    /*
    ** Configure this to turn on the CPU Load Module for BIOS.
    **
    */
    /*
    var Load       =   xdc.useModule('ti.sysbios.utils.Load');
    Load.common$.diags_USER4 = Diags.ALWAYS_ON;
    */
    
    var Diags       = xdc.useModule('xdc.runtime.Diags');
    
    
    /* Load the CSL package */
    var Csl 					    = 	xdc.useModule('ti.csl.Settings');
    
    /* Load the CPPI package */
    var Cppi                        =   xdc.loadPackage('ti.drv.cppi');     
    
    /* Load the QMSS package */
    var Qmss                        =   xdc.loadPackage('ti.drv.qmss');
    
    /* Load the PA package */
    var Pa 							= 	xdc.useModule('ti.drv.pa.Settings');
    
    /* Load the Platform/NDK Transport packages */
    var PlatformLib  = xdc.loadPackage('ti.platform.evmc6678l');
    var NdkTransport = xdc.loadPackage('ti.transport.ndk');
    
    /* 
    ** Sets up the exception log so you can read it with ROV in CCS 
    */
    var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
    var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
    Exc.common$.logger = LoggerBuf.create();
    Exc.enablePrint = true; /* prints exception details to the CCS console */
    
    /*
    **  Give the Load module it's own LoggerBuf to make sure the
    **  events are not overwritten.
    */
    /* var loggerBufParams = new LoggerBuf.Params();
    loggerBufParams.exitFlush = true;
    loggerBufParams.numEntries = 64;
    Load.common$.logger = LoggerBuf.create(loggerBufParams); 
    */
    
    /*
    ** Use this load to configure NDK 2.2 and above using RTSC. In previous versions of
    ** the NDK RTSC configuration was not supported and you should comment this out.
    */
    //*** var Global       = xdc.useModule('ti.ndk.config.Global');
    
    /* 
    ** This allows the heart beat (poll function) to be created but does not generate the stack threads 
    **
    ** Look in the cdoc (help files) to see what CfgAddEntry items can be configured. We tell it NOT
    ** to create any stack threads (services) as we configure those ourselves in our Main Task
    ** thread hpdspuaStart.
    */  
    //*** Global.enableCodeGeneration = false;
    
    
    /* Define a variable to set the MAR mode for MSMCSRAM as all cacheable */
    var Cache       =   xdc.useModule('ti.sysbios.family.c66.Cache');
    //Cache.MAR224_255 = 0x0000000f;
    
    var Startup     =   xdc.useModule('xdc.runtime.Startup');
    
    var System      =   xdc.useModule('xdc.runtime.System');
    
     /*
    ** Create a Heap. 
    */
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = 0x300000;
    heapMemParams.sectionName = "systemHeap";
    Program.global.heap0 = HeapMem.create(heapMemParams);
    
    /* This is the default memory heap. */
    Memory.defaultHeapInstance  =   Program.global.heap0;
    Program.sectMap["sharedL2"] = "DDR3"; 
    Program.sectMap["systemHeap"] = "DDR3";
    Program.sectMap[".sysmem"]  = "DDR3";
    Program.sectMap[".args"]    = "DDR3";
    Program.sectMap[".cio"]     = "DDR3";
    Program.sectMap[".far"] 	= 	"DDR3";
    Program.sectMap[".rodata"] 	= 	"DDR3";
    Program.sectMap[".neardata"]= 	"DDR3";
    Program.sectMap[".cppi"] 	= 	"DDR3";
    Program.sectMap[".init_array"] 	= 	"DDR3";
    Program.sectMap[".qmss"] 	= 	"DDR3";
    Program.sectMap[".cinit"] 	= 	"DDR3";
    Program.sectMap[".bss"]		=	"DDR3";
    Program.sectMap[".const"]	=	"DDR3";
    Program.sectMap[".text"]	=	"DDR3";
    Program.sectMap[".code"]	=	"DDR3";
    Program.sectMap[".switch"]	=	"DDR3";
    Program.sectMap[".data"]	=	"DDR3";
    Program.sectMap[".fardata"] = 	"DDR3";
    Program.sectMap[".args"] 	= 	"DDR3";
    Program.sectMap[".cio"] 	= 	"DDR3";
    Program.sectMap[".vecs"] 	= 	"DDR3";
    Program.sectMap["platform_lib"] 	= 	"DDR3";
    Program.sectMap[".DbgSection"]  = "DDR3";
    Program.sectMap[".far:taskStackSection"] = "L2SRAM";
    Program.sectMap[".stack"]	=	"L2SRAM";
    Program.sectMap[".nimu_eth_ll2"] = "L2SRAM";
    Program.sectMap[".resmgr_memregion"] = {loadSegment: "L2SRAM", loadAlign:128};	/* QMSS descriptors region 	*/
    Program.sectMap[".resmgr_handles"] = {loadSegment: "L2SRAM", loadAlign:16};	/* CPPI/QMSS/PA Handles			*/
    Program.sectMap[".resmgr_pa"]	= {loadSegment: "L2SRAM", loadAlign:8};		/* PA Memory					*/
    Program.sectMap[".far:IMAGEDATA"] = {loadSegment: "L2SRAM", loadAlign: 8};
    Program.sectMap[".far:NDK_OBJMEM"] = {loadSegment: "L2SRAM", loadAlign: 8};
    Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "L2SRAM", loadAlign: 128};
    
    /* Required if using System_printf to output on the console */
    SysStd          		=   xdc.useModule('xdc.runtime.SysStd');	// M.A: var
    System.SupportProxy     =   SysStd;
    
    /********************************************************************************************************************
    * Define hooks and static tasks  that will always be running.               										*
     ********************************************************************************************************************/
    
    /* 
    ** Register an EVM Init handler with BIOS. This will initialize the hardware. BIOS calls before it starts. 
    **
    ** If yuo are debugging with CCS, then this function will execute as CCS loads it if the option in your 
    ** Target Configuraiton file (.ccxml) has the option set to execute all code before Main. That is the 
    ** default.
    */
    Startup.lastFxns.$add('&EVM_init');
    
    /* 
    ** Create the stack Thread Task for our application.
    */
    var tskNdkStackTest  		=   Task.create("&StackTest");
    tskNdkStackTest.stackSize  	= 	0x1400;
    tskNdkStackTest.priority    = 	0x5;
    
    
    /* 
    ** Create a Periodic task to handle all NDK polling functions. 
    ** If you are using RTSC configuration with NDK 2.2 and above, this is done by default and 
    ** you do not need to do this.
    */
    /*var prdNdkClkParams         =   new Clock.Params ();
    prdNdkClkParams.period      =   0x64;   
    prdNdkClkParams.startFlag   =   true;
    Program.global.clockInst1   =   Clock.create("&llTimerTick", 5, prdNdkClkParams);
    */
    
    /* 
    ** If you are using RTSC configuration with NDK 2.2 and above, this is done by default, else
    ** register hooks so that the stack can track all Task creation 
    Task.common$.namedInstance  =   true;
    Task.addHookSet ({ registerFxn: '&NDK_hookInit', createFxn: '&NDK_hookCreate', });
    
    /* Enable BIOS Task Scheduler */
    BIOS.taskEnabled			=   true;
    
    /*
     * Enable Event Groups here and registering of ISR for specific GEM INTC is done
     * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
     */
    
    Ecm.eventGroupHwiNum[0] = 7;
    Ecm.eventGroupHwiNum[1] = 8;
    Ecm.eventGroupHwiNum[2] = 9;
    Ecm.eventGroupHwiNum[3] = 10;
    
    // ==================== New Parameter That Added from hello world omp project (omp_config.cfg) ==================================
    // allocate out of this shared region heap after IPC has been started.
    
    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    
    // Configure HeapOMP for the shared memory heap
    
    // HeapOMP created in ti/omp/common.cfg.xs
    
    var HeapOMP = xdc.useModule('ti.omp.utils.HeapOMP');
    HeapOMP.sharedRegionId = 2;
    HeapOMP.localHeapSize  = 0x20000;
    HeapOMP.sharedHeapSize = 0x1000000;
    
    // Specify the Shared Region
    SharedRegion.setEntryMeta( HeapOMP.sharedRegionId,
                                {   base: 0x90000000,
                                    len:  HeapOMP.sharedHeapSize,
                                    ownerProcId: 0,
                                    cacheEnable: true,
                                    createHeap: true,
                                    isValid: true,
                                    name: "heapomp",
                                }
    
    );
    
    /* load the common configuration file */
    xdc.loadCapsule('ti/omp/common.cfg.xs');
    
    var System   = xdc.useModule('xdc.runtime.System');
    System.extendedFormats = "%$S";
    
    var OpenMP = xdc.useModule('ti.omp.utils.OpenMP');
    OpenMP.setNumProcessors(4);
    OpenMP.autoDnldCore = false;                          // add this line
    
    Program.sectMap["ddr"] = new Program.SectionSpec();
    Program.sectMap["ddr"].loadSegment = "DDR3";
    
    Program.sectMap[".threadprivate"] = new Program.SectionSpec();
    Program.sectMap[".threadprivate"].loadSegment = "L2SRAM";
    
    
    // Enable Cache Write-back for HEAPOMP
    var Cache        = xdc.useModule('ti.sysbios.family.c66.Cache');
    Cache.setMarMeta(0x80000000, 0x20000000, Cache.PC | Cache.WTE);
    //========================================================================================
    
    

    Best Regard

  • Hi

    Several days I am waiting for answer!! please answer me.

    Regards

  • Hi
    Why nobody answer me?
  • Hi Dariush,

    Using your client_cfg.txt (rename to .cfg) to build image_processing_openmp_evmc6678l Openmp project, I don't see the error 'Cannot read property base from undefined' as shown in your screen snapshot, instead, 'identifier "ddr_heap" is undefined' is reported, which is true as the definition of ddr_heap is missing in your cfg file, see the attached log. What is the xdc version you were using to build the project and would you post your complete build log here?

    On the other hand, you might want to upgrade to the latest OpenMP runtime 2.0, the detail porting guide to keystone 1 device is here: processors.wiki.ti.com/.../Porting_OpenMP_2.x_to_KeyStone_1. We are no longer support OpenMP Runtime 1.0 and expect you to follow the steps outlined in the wiki to build OpenMP Runtime 2.0.

    Regards, Garrett

    clien_build_failure.log
    ' '
    'Building file: ../image_processing_openmp_evmc6678l.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_23_04_60/xs" --xdcpath="C:/ti/bios_6_33_06_50/packages;C:/ti/imglib_c66x_3_1_1_0/packages;C:/ti/omp_1_01_02_06/packages;C:/ti/ipc_1_24_03_32/packages;C:/ti/pdk_C6678_1_1_2_6/packages;C:/ti/ndk_2_24_02_31/packages;C:/ti/mcsdk_2_01_02_06;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p demos.image_processing.openmp.evmc6678l.platform -r debug -b "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/evmc6678l/platform/config.bld" -c "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14" --compileOptions "--gcc" "../image_processing_openmp_evmc6678l.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring image_processing_openmp_evmc6678l.xe66 from package/cfg/image_processing_openmp_evmc6678l_pe66.cfg ...
    warning: xdc.cfg.Program: "C:/ti/omp_1_01_02_06/packages/ti/omp/common.cfg.xs", line 68: [object Object] : Memory.defaultHeapInstance already set!
    cle66 package/cfg/image_processing_openmp_evmc6678l_pe66.c ...
    'Finished building: ../image_processing_openmp_evmc6678l.cfg'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/platform_osal.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/system/platform_osal.pp" --obj_directory="src/system" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/platform_osal.c"
    'Finished building: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/platform_osal.c'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/resourcemgr.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/system/resourcemgr.pp" --obj_directory="src/system" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/resourcemgr.c"
    'Finished building: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/system/resourcemgr.c'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_bmp_utils.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/mcip_bmp_utils.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_bmp_utils.c"
    'Finished building: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_bmp_utils.c'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_core.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/mcip_core.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_core.c"
    'Finished building: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_core.c'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_master_main.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/mcip_master_main.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_master_main.c"
    'Finished building: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_master_main.c'
    ' '
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/mcip_process.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c"
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c", line 94: error #20: identifier "ddr_heap" is undefined
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c", line 165: error #20: identifier "ddr_heap" is undefined
    
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c", line 181: error #20: identifier "ddr_heap" is undefined
    3 errors detected in the compilation of "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_process.c".
    >> Compilation failure
    gmake[1]: *** [src/mcip_process.obj] Error 1
    'Building file: C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6_1/ccsv6/tools/compiler/c6000_7.4.14/include" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/qmss" --include_path="C:/ti/pdk_C6678_1_1_2_6/packages/ti/drv/cppi" --include_path="C:/ti/imglib_c66x_3_1_1_0/inc" --gcc --display_error_number --diag_warning=225 --openmp --preproc_with_compile --preproc_dependency="src/mcip_webpage.pp" --obj_directory="src" --cmd_file="./configPkg/compiler.opt"  "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c"
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c", line 160: error #20: identifier "ddr_heap" is undefined
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c", line 165: error #20: identifier "ddr_heap" is undefined
    "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c", line 169: error #20: identifier "ddr_heap" is undefined
    3 errors detected in the compilation of "C:/ti/mcsdk_2_01_02_06/demos/image_processing/openmp/src/mcip_webpage.c".
    
    >> Compilation failure

  • Hi Garret

    I think I didn't explain the problem clearly so I explain it with a new vision.
    As I have been said, I want to make a project with Openmp and TCP connection that DSP works as client so I did this below steps:

    1)I modified "C:\Program Files\Texas Instruments\mcsdk_2_01_02_05\examples\ndk\client\evmc6678l" project successfully for my TCP connection.

    2)I added IPC and Openmp packages in RTSC and enabled Openmp checkpoint.

    3)I understood that I should modified SYS/BIOS script, so I copied and added the SYS/BIOS script of "helloworld" OpenMP
    project to client project after that, the error has been showed in the snapshot occurred.

    4)I understood that SYS/BIOS and platform have dealt with SYS/BIOS and that was the root of error. (SYS/BIOS script isn't compatible with platform).

    Please, guide me to solve the problem by some instructions step by step.

    Best Regards
  • Hi Garret
    I'm waiting, answer me please.

    Regards
  • Hi Dariush,

    From your description, it seems you updated the ndk clinet program with OpenMP pragma?
    In terms of build error, please post your complete build log so I might be able to pinpoint the cause. You can also compare your log with what I posted above.

    Regards,
    Garrett

  • Hi Garrett

    I didn't add "pragma" yet, as I mentioned I enabled IPC and OMP in client project like below:

    I enabled OMP support check mark in client project too like below:

    Next I pasted "xdc.loadCapsule('ti/omp/common.cfg.xs');"  from  " C:\Program Files\Texas Instruments\omp_1_01_03_02\docs\User_Guide.pdf " at page 7 to client.cfg.

    After that an error occurred like below:

    I uploaded my build log below:

    6170.build_log.txt
    **** Build of configuration Debug for project client_evmc6678l ****
    
    C:\ti\ccsv5\utils\bin\gmake -k all 
    'Building file: ../client.cfg'
    'Invoking: XDCtools'
    "C:/Program Files/Texas Instruments/xdctools_3_23_04_60/xs" --xdcpath="C:/Program Files/Texas Instruments/omp_1_01_03_02/packages;C:/Program Files/Texas Instruments/pdk_C6678_1_1_2_5/packages;C:/Program Files/Texas Instruments/ndk_2_21_01_38/packages;C:/Program Files/Texas Instruments/bios_6_33_06_50/packages;C:/Program Files/Texas Instruments/mcsdk_2_01_02_05/demos;C:/ti/ccsv5/ccs_base;C:/ti/ipc_1_24_03_32/packages;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evm6678 -r debug -c "C:/ti/compilers" "../client.cfg"
    making package.mak (because of .xdcenv.mak) ...
    /cygdrive/c/PROGRA~1/TEXASI~1/xdctools_3_23_04_60/bin/rm: cannot remove `package.mak': Permission denied
    making package.mak (because of .xdcenv.mak) ...
    /cygdrive/c/PROGRA~1/TEXASI~1/xdctools_3_23_04_60/bin/rm: cannot remove `package.mak': Permission denied
    generating interfaces for package configPkg (because package/package.xdc.inc is older than ) ...
    gmake.exe: *** No rule to make target `package.mak', needed by `.interfaces'.  Stop.
    js: "C:/Program Files/Texas Instruments/xdctools_3_23_04_60/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/compiler.opt] Error 1
    gmake: Target `all' not remade because of errors.
    
    **** Build Finished ****
    

    Please, guide me step by step that I can add and enable OpenMP to client example ("C:\Program Files\Texas Instruments\mcsdk_2_01_02_05\examples\ndk\client\evmc6678l") and use it.


    Best Regards

  • Hi Dariush,

    In addition to those modification you have made, you also need to change RTSC platform from ti.platforms.evm6678 to ti.omp.examples.platforms.evm6678 for the ndk client_evmc6678l project if you want to enable OpenMP. The ti/omp/common.cfg.xs is applicable to OpenMP RTSC platform configuration only. To switch the RTSC platform, go to
    Project->Properties->CCS General->RTSC->Platforms (ti.platforms.evm6678 -> ti.omp.examples.platforms.evm6678)

    Again, I highly recommend you follow the steps described at the wiki page processors.wiki.ti.com/.../Porting_OpenMP_2.x_to_KeyStone_1 to upgrade OpenMP to runtime 2.0, and refer to the user guide at ti\openmp_dsp_2_01_16_03\docs\ to build your OpenMP application.

    Regards,
    Garrett
  • Hi Garrett

    I applied your guidance like below:

    But I saw an error like below:

    I think the problem related to platform but I don't know how to solve it!! Did you test it yourself? what should I do? please, help me.

    Best Regards