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.

UIA tcp connect reset

Other Parts Discussed in Thread: TMS320C6678

Hi, all

When I use the UIA in my project, combine the project(http://processors.wiki.ti.com/index.php/TMS320C6678L_Build_Configuration) with my own. I want to transport data via NDK, it doesn’t work. Every time I start to debug the project, A "System Analyzer Welcome" view can open automatically. I can connect the board with telnet, after running the System Analyzer, nothing comes out. I check the tcp connet with wireshark.

 

PC connect the 6678 in port 1234 with SYN, but the 6678 reply RST. TCP connect fail.

I have try it for a long time, please help me.

my develop environment:

CCS 5.3

DSP 6678

XDS100 V2

BIOS 6.34.2.18

NDK 2.21.1.38

UIA 1.2.1.08_eng

  • Have you tried the UIA project alone and not combined with your own code ?
  • Hi Titus S

    Before I asked here, I have searched a lot in TI's website.

    I have tried the UIA project alone. The tcp with port 1234 connect can set up. But in SA window, nothing comes out. But in JTAG mode(processors.wiki.ti.com/.../SystemAnalyzerTutorial1F) , the data comes out correct.

    CCS 5.3

    DSP TMS320C6678

    XDS100 V2

    BIOS 6.34.2.18

    NDK 2.21.1.38

    UIA 1.2.1.08_eng

    Here is my .cfg file.

    /*
     * evm.cfg
     * 
     * Memory Map and Program initialization for the HUA 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  evm.cfg
     *
     *   @brief   
     *      Memory Map and Program initialization for the HUA Utility.
     *
     */
     
    /********************************************************************************************************************
    *  Specify all needed RTSC Modules and configure them.																*
    ********************************************************************************************************************/
    
    var Memory  =   xdc.useModule('xdc.runtime.Memory');
    var Error = xdc.useModule('xdc.runtime.Error');
    var BIOS    =   xdc.useModule('ti.sysbios.BIOS');
    var Telnet = xdc.useModule('ti.ndk.config.Telnet');
    
    /* Enable BIOS Task Scheduler */
    BIOS.taskEnabled  =   true;
    
    var Task    =   xdc.useModule('ti.sysbios.knl.Task');
    
    /*
    ** 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.
    */
    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 BIOS 6.30 plus to get the IPC module */
    var Sem	= xdc.useModule ('ti.sysbios.knl.Semaphore');
    
    /* Hardware Interrupt  module */
    var Hwi	= xdc.useModule ('ti.sysbios.hal.Hwi');
    
    var Ecm = xdc.useModule ('ti.sysbios.family.c64p.EventCombiner');
    
    Timestamp = xdc.useModule('xdc.runtime.Timestamp');
    Log = xdc.useModule('xdc.runtime.Log');
    
    Clock = xdc.useModule('ti.sysbios.knl.Clock');
    Timer = xdc.useModule('ti.sysbios.hal.Timer');
    /*
     * 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;
    
    /*
    ** Load Module - 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;
    */
    
    /*
    * Diagnostic Module
    */
    var Diags       = xdc.useModule('xdc.runtime.Diags');
    
    
    /* 
    ** Log Moudle - 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 DDR2 as all cacheable */
    /*FixUp - changed to C66*/
    var Cache       =   xdc.useModule('ti.sysbios.family.c66.Cache');
    /*FixUp*/ /*Cache.MAR224_255 = 0x0000000f;*/
    
    var Startup     =   xdc.useModule('xdc.runtime.Startup');
    
    var System      =   xdc.useModule('xdc.runtime.System');
    
    /* Required if using System_printf to output on the console */
    SysStd          		=   xdc.useModule('xdc.runtime.SysStd');
    System.SupportProxy     =   SysStd;
    
    var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
    /*
    ** Heap Management Module - Create a default Heap. 
    */
    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
    var heapMemParams = new HeapMem.Params();
    heapMemParams.size = 0xF4240;	/* 1Mb*/
    heapMemParams.sectionName = "systemHeap";
    Program.global.heap0 = HeapMem.create(heapMemParams);
    Memory.defaultHeapInstance = Program.global.heap0;
    
    /* Load the CSL package  - LoadPackage is equivalent to linking the library */
    var Csl 					    = 	xdc.loadPackage('ti.csl');
    
    /* Load the CPPI package - LoadPackage is equivalent to linking the library */
    var Cppi                        =   xdc.loadPackage('ti.drv.cppi');     
    
    /* Load the QMSS package  - LoadPackage is equivalent to linking the library*/
    var Qmss                        =   xdc.loadPackage('ti.drv.qmss');
    
    /* Load the PA package  - LoadPackage is equivalent to linking the library*/
    //var Pa 							= 	xdc.loadPackage('ti.drv.pa');
    
    /* Load Platform Library - LoadPackage is equivalent to linking the library */
    //var Plib						= xdc.loadPackage('ti.platform.evmc6678l');
    
    /* Load Platform Library - LoadPackage is equivalent to linking the library */
    //var Nimulib						= xdc.loadPackage('ti.transport.ndk');
    var Srio = xdc.loadPackage('ti.drv.srio');
    
    
    
    var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
    var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
    //MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);
    MultiProc.setConfig(null, ["CORE0"]);
    
    /* Synchronize all processors (this will be done in Ipc_start) */
    Ipc.procSync = Ipc.ProcSync_ALL;
    
    var heapMemParams1         = new HeapMem.Params;
    var heapMemParams2         = new HeapMem.Params;
    var heapMemParams3         = new HeapMem.Params;
    var heapMemParams4         = new HeapMem.Params;
    
    heapMemParams1.size        = 0x80000;
    heapMemParams1.sectionName = "srioHeap";
    heapMemParams1.align = 8;
    
    heapMemParams2.size        = 0x80000;
    heapMemParams2.sectionName = "nimuSharedHeap";
    heapMemParams2.align = 8;
    //Program.sectMap["systemHeap"] = "DDRCacheData";
    
    heapMemParams3.size        = 0x40000;
    heapMemParams3.sectionName = "qmssSharedHeap";
    heapMemParams3.align = 8;
    
    heapMemParams4.size        = 0x100000;
    heapMemParams4.sectionName = "srioSharedHeap";
    heapMemParams4.align = 8;
    
    Program.global.srioHeap	 =	HeapMem.create(heapMemParams1);
    Program.sectMap["srioHeap"] = "DDR3";//Program.platform.stackMemory;//
    
    Program.global.qmssSharedHeap	=	HeapMem.create(heapMemParams2);
    Program.sectMap["qmssSharedHeap"] = "DDR3";//"MSMCSRAMShareMem";
    
    Program.global.nimuSharedHeap       = HeapMem.create(heapMemParams3);
    Program.sectMap["nimuSharedHeap"] = "DDR3";
    
    Program.global.srioSharedHeap       = HeapMem.create(heapMemParams4);
    Program.sectMap["srioSharedHeap"] = "DDR3";
    /********************************************************************************************************************
    * 	Define our Memory Map. We made up the  memory  names LL2RAM, DDR2 and SL2RAM. They do have special meaning.		*
    *																													*
    *	DDR3 - Anyhting destined for DDR3 always goes into the external RAM on the paltform.							*
    *	L2SRAM - This is data that should be placed into the Local L2 of the core.										*
    *	MCMSRAM - This is data that should go into the shared L2 (if it exists) or could be placed into LL2 if it doesnt.*
    *																													*
    *	These section names are mapped to specific addresses for a paltform using our custom memroy maps which are 		*
    *	defined using the Platform Wizard. Examples are custom.hpdpsua.evm6678l, etc.,.									*
    ********************************************************************************************************************/
    
    Program.sectMap[".vecs"] 		= {loadSegment: "L2SRAM", loadAlign:8};		/* CSL per core data structures 	*/
    Program.sectMap[".switch"] 		= {loadSegment: "L2SRAM", loadAlign:8};		/* CSL per core data structures 	*/
    Program.sectMap[".cio"]  		= {loadSegment: "L2SRAM", loadAlign:8};		/* per core data structures 		*/
    Program.sectMap[".args"] 		= {loadSegment: "L2SRAM", loadAlign:8};		/* per core data structures 		*/
    Program.sectMap[".cppi"] 		= {loadSegment: "L2SRAM", loadAlign:16};	/* per core data structures 		*/
    Program.sectMap[".far:NDK_OBJMEM"]= {loadSegment: "L2SRAM", loadAlign:16}; 	/* NDK structures 					*/
    Program.sectMap[".nimu_eth_ll2"]= {loadSegment: "L2SRAM", loadAlign:16};	/* per core data structures 		*/
    Program.sectMap[".qmss"] 		= {loadSegment: "L2SRAM", loadAlign:16};	/* per core data structures 		*/
    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[".stack"]		= "L2SRAM";
    
    Program.sectMap[".bss"]			= "DDR3";									/* BSS. .neardata and .rodata are GROUPED */
    Program.sectMap[".neardata"]	= "DDR3";
    Program.sectMap[".rodata"]		= "DDR3";
    Program.sectMap["systemHeap"] 	= {loadSegment: "DDR3", loadAlign:128};	  	/* XDC Heap .. eg Memory_alloc () 	*/
    Program.sectMap[".far"] 		= "DDR3";
    Program.sectMap[".cinit"] 		= "DDR3";
    Program.sectMap[".const"]		= "DDR3";
    Program.sectMap[".text"]		= "DDR3";
    Program.sectMap[".code"]		= "DDR3";
    Program.sectMap[".data"]		= "DDR3";
    Program.sectMap[".sysmem"] 		= "DDR3";								/* Malloc memory area 					*/	
    Program.sectMap["platform_lib"]	= "DDR3";								/* Platform Library data structures 	*/
    Program.sectMap[".gBuffer"]		= {loadSegment: "DDR3", loadAlign:32};  	/* Upload buffer used by the Web Server	*/
    Program.sectMap[".far:WEBDATA"]	= {loadSegment: "DDR3", loadAlign: 32}; 	/* Web Pages and web server structures 	*/
    
    /* For newer BIOS 6.32 Program.sectMap[".far:taskStackSection"]= "MSMCSRAM";	*/						/* BIOS task stacks */	 
    Program.sectMap[".far:taskStackSection"]= "MSMCSRAM";
    Program.sectMap[".far:NDK_PACKETMEM"]= {loadSegment: "MSMCSRAM", loadAlign: 128};	/* NDK Buffer Pool */
    
    /********************************************************************************************************************
    * 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.
    */
    /* Add init function */
    Startup.firstFxns.$add('&Usr_Init_Process');
    
    /* Create the task used for the master CPU operations (see netCtrlCallbackFns.c)  */
    var tskMainThread        =  Task.create("&master_main");
    tskMainThread.stackSize  = 0x2000;
    tskMainThread.priority   = 0x5;
    tskMainThread.instance.name = "master_main";
    
    /* 
    ** 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", prdNdkClkParams.period, 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', });
    */
    var Log = xdc.useModule('xdc.runtime.Log');
    var LogSnapshot = xdc.useModule('ti.uia.runtime.LogSnapshot');
    var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
    LoggingSetup.loadLoggerSize = 1024;
    LoggingSetup.mainLoggerSize = 32768;
    LoggingSetup.sysbiosLoggerSize = 32768;
    LoggingSetup.eventUploadMode = LoggingSetup.UploadMode_NONJTAGTRANSPORT
    /*
     *  This example is a single-core example, so UIA's 
     *  ServiceMgr must be configured to collect events from one core only
     */ 
    var ServiceMgr = xdc.useModule('ti.uia.runtime.ServiceMgr');
    ServiceMgr.topology = ServiceMgr.Topology_SINGLECORE;
    //ServiceMgr.masterProcId = 0;
    
    /* The application is using the UIA benchmark events. */ 
    var UIABenchmark  = xdc.useModule('ti.uia.events.UIABenchmark');
    
    /* Register the idle function hook */
    var Idle = xdc.useModule('ti.sysbios.knl.Idle');
    //Idle.addFunc('&myIdleFunc');
    var Diags = xdc.useModule('xdc.runtime.Diags');
    var Main = xdc.useModule('xdc.runtime.Main');
    
    Main.common$.diags_ENTRY = Diags.ALWAYS_ON;
    Main.common$.diags_USER1 = Diags.ALWAYS_ON;
    Main.common$.diags_EXIT = Diags.ALWAYS_ON;
    
    var Logger = xdc.useModule('ti.uia.runtime.LoggerStopMode'); 
    var loggerParams = new Logger.Params();
    loggerParams.transferBufSize = 32768;
    logger = Logger.create(loggerParams);
    logger.instance.name = "Main logger";
    
    Program.global.hLogger = logger;
    
    /*
     * Configure a Timer to interrupt every 100ms
     * timerFunc() provides Hwi load and posts a Swi and Semaphore
     * to provide Swi and Task loads.
     * And adjusts the loads every 5 seconds.
     */
    var timerParams = new Timer.Params();
    timerParams.startMode = Timer.StartMode_AUTO;
    timerParams.period = 100000;        /* 100,000 uSecs = 100ms */
    var timer0 = Timer.create(Timer.ANY, '&timerFunc', timerParams);
    
    /*
     * Create Semaphore for Task thread to pend on
     */
    Program.global.sem = Sem.create(0);
    
    /*
     * Create Swi load thread
     */
    Swi = xdc.useModule('ti.sysbios.knl.Swi'); 
    Program.global.swi = Swi.create('&swiLoad');
    
    /*
     * Create Task load thread
     */
    var taskLoadTask = Task.create('&taskLoad');
    

  • Hi,

    I have tried the UIA project alone. The tcp with port 1234 connect can set up. But in SA window, nothing comes out. But in JTAG mode(processors.wiki.ti.com/.../SystemAnalyzerTutorial1F) , the data comes out correct.

    You mean, able to get expected output (pinging the IP address and verified on wireshark capture) with UIA project alone when you run with JTAG mode (CCS) right ?


    When I use the UIA in my project, combine the project(processors.wiki.ti.com/.../TMS320C6678L_Build_Configuration) with my own. I want to transport data via NDK, it doesn’t work. Every time I start to debug the project, A "System Analyzer Welcome" view can open automatically. I can connect the board with telnet, after running the System Analyzer, nothing comes out. I check the tcp connet with wireshark.

    You mean, not able to get expected output (pinging the IP address and verified on wireshark capture) even when you work with JTAG mode (CCS) right ?

    Could you provide me the exact link (examples) that you are working.
  • Hi Titus S

    thank you for your reply.

    here is the orginal example project. StairstepEthernet_6678.zip

    According to my own board, I have make some changes because of the NIMU. This is the project I have changed.StairstepEthernet_6678_new.zip

    Regards,

    matsumoto.

  • Hi Matsumoto,

    I'm looking into the code and get back to you.
  • Hi Titus S
    Thanks a lot for your help.

    Regards,
    matsumoto.
  • Hi Titus S

    Has there been any progress on the project ahout the UIA. Please reply  me, Thank you very much.

    Best Regards,

    matsumoto.

  • Hi!

    I've got the same issues.

    First of all, all those "ethernet frame check sequence incorrect" errors are related to a bug in NIMU drivers;

    Please take a look here: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/p/288506/1011979#pi317334=2

    Beside that, I've followed this guide to use UIA with ethernet transport (via NDK): processors.wiki.ti.com/.../System_Analyzer_Tutorial_3B

    When I click on the "Run" icon in Live session view, I get this:

    Code composer and the target cpu try a couple of times to estabilish a connection, but ethernet packets have problems both ways.