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.

NDK on TI C6678 Simulator



Hi, I am new to NDK and trying to run NDK on C6678 simulator. I am using CCS5.0.3.00028 and mcsdk 2_00_01_12.  After all the configuration required to run NDK on simulator , i am able to run the client program and debug console shows me the following prints

[TMS320C66x_0] QMSS successfully initialized 

[TMS320C66x_0] CPPI successfully initialized 

[TMS320C66x_0] PA successfully initialized 

[TMS320C66x_0] 

[TMS320C66x_0] TCP/IP Stack Example Client

[TMS320C66x_0] PASS successfully initialized 

[TMS320C66x_0] Ethernet subsystem successfully initialized 

[TMS320C66x_0] Ethernet eventId : 48 and vectId (Interrupt) : 7 

[TMS320C66x_0] Registration of the EMAC Successful, waiting for link up ..

[TMS320C66x_0] Network Added: If-1:192.168.5.100

[TMS320C66x_0] Service Status: Telnet   : Enabled  :          : 000

[TMS320C66x_0] Service Status: HTTP     : Enabled  :          : 000

Then, i changes my PC network adapter ip address to 192.168.5.101 and network mask to 255.255.254.0. Now , i try to ping 192.168.5.100 but failed to do so.I have also done configuration mentioned on somewhat related thread but still not get any success. 

MSDK reference: http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Building_and_running_NDK_client_example_with_simulator

Thread on E2E community: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/113723.aspx

1. Application code/configuration changes.

1a. Change C:\Program Files\Texas Instruments\mcsdk_2_00_00_11\examples\ndk\client\evmc6678l\client.cfg as below.

var PlatformLib  = xdc.loadPackage('ti.platform.evmc6678l');

change to

 var PlatformLib  = xdc.loadPackage('ti.platform.simc6678');

1b.  change C:\Program Files\Texas Instruments\mcsdk_2_00_00_11\examples\ndk\client\client.c as below. This would select always static ip address for the Client application since the simulator does not support the DHCP mode.

Around LIne #301,

    if (!platform_get_switch_state(1)) {  ===> change this to if (1) {

        CI_IPNET NA;
        CI_ROUTE RT;

....

....

....    

        if( IPTmp )
            CfgAddEntry( hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_DOMAINNAMESERVER,
                         0, sizeof(IPTmp), (UINT8 *)&IPTmp, 0 );

}

else {

2. Platform Library for Simulator Changes

Around line #120 of  C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_11\packages\ti\platform\simc6678\platform_lib\src\evmc6678_phy.c

change

#ifdef SIMULATOR_SUPPORT
 void Init_SGMII (uint32_t macPortNum)
 {
to
#if  1
 void Init_SGMII (uint32_t macPortNum)
 {
3. Nimu Eth Driver Changes
C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_11\packages\ti\transport\ndk\nimu\src\nimu_eth.c file changes
Please delete all the highlighted code as below.
@@ -47,12 +47,8 @@
  *  the knowledge on the QMSS, CPPI, PA LLD configurations/programs.
  *
  */
-#ifdef SIMULATOR_SUPPORT
-#include <ti/csl/csl_chipaux.h>
-#else
 #include <ti/platform/platform.h>
 #include "resource_mgr.h"
-#endif
 
 #include <nimu_eth.h>
 #include <include/nimu_internal.h>
...
...
...
in EmacSend (NETIF_DEVICE* ptr_net_device, PBM_Handle hPkt) function,
 
 
     /* Get the core number. */
-#ifdef SIMULATOR_SUPPORT
-    coreNum = CSL_chipReadDNUM();
-#else
     coreNum = platform_get_coreid();
-#endif
 
     count = Qmss_getQueueEntryCount (gTxReturnQHnd);
...
...
... 
In static int EMACInit_Core (STKEVENT_Handle hEvent) function
     uint32_t coreNum;
 
     /* Get the core number. */
-#ifdef SIMULATOR_SUPPORT
-    coreNum = CSL_chipReadDNUM();
-#else
     coreNum = platform_get_coreid();
-#endif
 
     /* Allocate memory for the private data */
     ptr_pvt_data    = Osal_nimuMalloc (platform_roundup(sizeof(EMAC_DATA), PLATFORM_CACHE_LINE_SIZE), PLATFORM
Please let me know what step i am doing wrongly.
Regards,
Parshant

  • Is it possible to give a description on the setup you have? If you have followed everything that the link says that means there might be a routing problem.

     

    Thanks,

    Arun.

  • Hi Arun,

     

    I am running ccs 5.0.3.0028 and mcsdk  2_00_01_12 on host PC having Windows 7. I am new to TI NDK, so using TI examples to understand the Knowhow of TI NDK kit. 

    I am developing network application for C6678 Functional simulator. My PC has a broadcom Gigabit network card. 

    I am using nimu_eth_evmc6678l and client_evmc6678l as per the steps mentioned in 

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_User_Guide#Building_and_running_NDK_client_example_with_simulator

     

    Could you please elaborate the routing problem you have mentioned in your post.

     

    I have configured my PC NIC as Ip address: 192.168.5.101 mask : 255.255.254.0 as mentioned in mcsdk user guide mentioned above.

    Please help what else i can cross check to make it working.

     

    Thanks,

    Parshant