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.

6678 NDK, Hello World example, core0 working but not cores1-7

Other Parts Discussed in Thread: SYSBIOS

For the NDK Hello world example, should cores other than 0 work?

Core0 runs and it echos packets from the ndk winapp helloWorld.exe (well it does in DHCP mode anyway):
            [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 017

Core1 exits on error:
            [C66xx_1] Error: Inserting memory region 0, Error code : -135
            [C66xx_1] Failed to initialize the QMSS subsystem

If Core0 was already running when Core1 started, Core1 follows the "Failed to initialize the QMSS..." with a register dump.

Here are my revisions:
          TMDXEVM6678L Rev 1.0
          CCS5.1.1.00028
          C:\Program Files\Texas Instruments\mcsdk_2_00_05_17\examples\ndk\helloWorld

If I can't get this example to work, I won't know how to make multicore ethernet work.

  • Can anybody help please?
    I responded to my own email so it doesn't get lost on the list.
    I hope that's not rude.

  • Even if nobody helps, can somebody tell me if they got non-0 cores to work with the example?

  • Greg,

    It can run on other cores, but requires changes to the NIMU library.  Check out the similar thread:

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/165415.aspx#606263

    Again, I'll have to ask some of the experts to comment on the code changes required.  Are you trying to run it on multiple cores, or just a core other than core 0?

    Regards,

    Travis

  • Thanks for the reply Travis.

    We are trying to use Ethernet with multiple cores.

    I am using TMDXEVM6678L for now because our new board is in schematic capture.
    The 6678 cores will be connected by Ethernet to a QorIQ.
    The 6678 cores get boot-loaded over Ethernet and use it to communicate with QorIQ.
    I think it's reasonable to use UDP, and assign each core a unique UDP port number.

    "HelloWorld" seemed to be a reasonable starting point, and SPRU523G recommends it.
    I even figured out how to add transmit and receive UDP sockets, but if only core0 works, I'm in trouble.

    "MulticoreExample" runs as-is on multiple cores, but only does loopback, and then terminates.
    I don't know what to do with that.

    I'll be needing more help.  I hope to get instructions for changing the NIMU library, or maybe you have different recommendation than "HelloWorld".

    I apologize for being slow.  I'm an EE with signal processing experience, but not multi-core/Ethernet/RTOS.

    Greg

  • Greg,

    I've asked a few others to jump in here.  My understanding is that substantial changes would have to be made to the NIMU driver to get the NDK running on multiple cores. 

    On the MulticoreExample, I guess you are referring to C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_17\packages\ti\drv\pa\example\multicoreExample after you install the MCSDK?  There is a Readme.txt in that directiory explaining this example.  To my knowledge, it doesn't use the NDK though.  If you don't need the full NDK stack, this example will get you going much quicker on running ethernet to multiple cores.

    Regards,

    Travis

  • Hi Travis,

    Since NDK doesn't support multi-core, I will abandon it.

    We're talking about the same multicoreExample path.
    Readme.txt briefly describes multicoreExample but its purpose appears to be instructions for running it a simulator.
    I will try to use multicoreExample.

    Thanks,

    Greg

  • Hi Greg,

    Example: \pdk_C6678_x_xx_x_x\packages\ti\drv\pa\example\multicoreExample

    It’s  CCS project files are at : \pdk_C6678_x_xx_x_x\packages\ti\drv\exampleProjects\PA_multicoreExample_exampleProject

     You can build the code.

    It should should work on the hardware too. No simulator required. Group the cores - Core0-core3. Load the executable on all and start 'run'.

    Please let us know if this suffices your current design requirements.

    Thanks

  • Hi Varanda,

    I was able to transmit UDP by changing variable initialization:
          Int cpswSimTest = 0;
          Int cpswLpbkMode = CPSW_LOOPBACK_NONE;
          Int cpswEvm6678 = 1;
    I think multicoreExample will suffice for the requirments I'm aware of.
    I am experimenting with transmit now, but haven't tried receive yet.
    If things go well, I should know later this week if multicoreExample will suffice.

    My boss is asking me when NDK will be available for multi-core (6678).
    I don't know how to answer.  What is the plan for that?

    Greg

  • Hi Travis,

     1.        I want to implement communication between C6678 EVM and PC through ethernet interface . So I am trying to run the project named client

    which is located at ti/mcsdk_2_00_05_17/examples/ndk/client/evmc6678l . The IP address for my PC is 192.168.1.124.

    I have changed several places of client.c  to fit for my situation:

    line 81    *LocalIPAddr is changed to 192.168.1.122;

    line 83    *GatewayIP  is changed to 192.168.1.1;

    line  90    clientMACAddress is changed to MAC address for my PC.

            When i build and run the project ,the console window shows:

    QMSS successfully initialized

    CPPI successfully initialized

     PA successfully initialized

     Tcp/IP stack Example client

    configuring DHCP client

    PASS successfully initialized

    Ethernet eventId  :  48  and  VectId (Interrupt)  :  7

    Registration of the EMAC successful ,waiting for link up...

    Service status   :  DHCPC  :     Enabled  :                   : 000

    Service status   :  Telnet  :       Enabled  :                   : 000

    Service status   :  HTTP  :        Enabled  :                   : 000

    Service status   :  DHCPC  :   Enabled  :   running   : 000

    Service status   :  DHCPC  :   Enabled  :   Fault        : 002

    Service status   :  DHCPC  :   Disabled:                   : 000

     

            When I open the cmd window on my PC and input "ping 192.168.1.122",then the cmd window outputs:

    Pinging 192.168.1.122 with 32 bytes of data:

    Request timed out

    Request timed out

    Request timed out

    Request timed out

    Ping statistics for 192.168.1.122

    packets : Sent = 4,  Received = 0 ,  Lost = 4(100% loss).

             Are there any codes should be changed in project client to successfully  run it?

    2.    I also want to transfer data between C6678 A and C6678 B through ethernet interface on my own board. But i don't know how to do it.

     Could you tell me the steps to implement the goal ? 

    Best Regards,

    Nuoxi

     

  • Have you tried to run the client example without modifications to client.c ?

     

    I am seeing the logs you posted. When the network IP address ‘bind’ happens, usually there is a print like  the example below :

     [C66xx_0] Network Added: If-1:192.168.2.102

     I see that is not getting printed in your case.

     If you are using the c6678L EVM, then please confirm that the EVM is using static IP address, through the switch setting. User switch #2.

    http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Hardware_Setup_Steps

     

     About question #2 : On single board, there are two devices 6678A and 6678B. And they need to communicate over Ethernet – is that correct ? so there is no PHY in between. Am I right ? Please clarify the setup.

     

    Also in future – please start a new e2e forum post as the discussion on this post was related to running NDK on different cores of same device. If you start a new post with a appropriate title, then it will be beneficial for future reference as well.

     

    Hope this helps. Thanks

  • Hi,tscheck:

    I am using client example of mcsdk_2_01_02_05. My client example is running successfully on core0 or core1 separately  without any changes of the NIMU library. But what I really want to do is to run this example simultaneously on both cores but i failed to do that.

    I let core0 go first.When Network is created I let core1 go. It seems that core1 can not run normally after core0,and vice versa..Here is my code and console output:

    code of QMSS,CPPI, PA config:

    if (platform_get_coreid() == 0 || platform_get_coreid() == 1)                   
         {                                                                         
             qmss_cfg.master_core        = 1;                                      
             qmss_cfg.max_num_desc       = MAX_NUM_DESC;                           
             qmss_cfg.desc_size          = MAX_DESC_SIZE;                          
             qmss_cfg.mem_region         = Qmss_MemRegion_MEMORY_REGION0;          
             if (res_mgr_init_qmss (&qmss_cfg) != 0)                               
             {                                                                     
              platform_write ("Failed to initialize the QMSS subsystem \n");      
              goto main_exit;                                                     
             }                                                                     
          else                                                                    
             {                                                                     
              platform_write ("QMSS successfully initialized \n");                
             }                                                                     
                                                                                    
         }                                                                         
         else                                                                      
         {                                                                         
             qmss_cfg.master_core        = 0;                                      
             qmss_cfg.max_num_desc       = MAX_NUM_DESC;                           
             qmss_cfg.desc_size          = MAX_DESC_SIZE;                          
             qmss_cfg.mem_region         = Qmss_MemRegion_MEMORY_REGION0;          
             if (res_mgr_init_qmss (&qmss_cfg) != 0)                               
             {                                                                     
              platform_write ("Failed to initialize the QMSS subsystem \n");      
              goto main_exit;                                                     
             }                                                                     
          else                                                                    
             {                                                                     
              platform_write ("QMSS successfully initialized \n");                
             }                                                                     
                                                                                    
         }                                                                         
                                                                                    
                                                                                    
         /* Initialize CPPI */                                                     
         if (platform_get_coreid() == 0 ||  platform_get_coreid() == 1)            
         {                                                                         
             cppi_cfg.master_core        = 1;                                      
             cppi_cfg.dma_num            = Cppi_CpDma_PASS_CPDMA;                  
             cppi_cfg.num_tx_queues      = NUM_PA_TX_QUEUES;                       
             cppi_cfg.num_rx_channels    = NUM_PA_RX_CHANNELS;                     
             if (res_mgr_init_cppi (&cppi_cfg) != 0)                               
             {                                                                     
                 platform_write ("Failed to initialize CPPI subsystem \n");        
                 goto main_exit;                                                   
             }                                                                     
             else                                                                  
             {                                                                     
                 platform_write ("CPPI successfully initialized \n");              
             }                                                                     
         }                                                                         
         else                                                                      
         {                                                                         
             cppi_cfg.master_core        = 0;                                      
             cppi_cfg.dma_num            = Cppi_CpDma_PASS_CPDMA;                  
             cppi_cfg.num_tx_queues      = NUM_PA_TX_QUEUES;                       
             cppi_cfg.num_rx_channels    = NUM_PA_RX_CHANNELS;                     
             if (res_mgr_init_cppi (&cppi_cfg) != 0)                               
             {                                                                     
                  platform_write ("Failed to initialize CPPI subsystem \n");       
               goto main_exit;                                                    
             }                                                                     
             else                                                                  
             {                                                                     
                   platform_write ("CPPI successfully initialized \n");            
             }                                                                     
                                                                                    
         }                                                                         
                                                                                    
                                                                                    
         /* Initialize PASS */                                                     
         if (platform_get_coreid() == 0 ||  platform_get_coreid() == 1)            
         {                                                                         
                if (res_mgr_init_pass()!= 0)                                        
                {                                                                   
                  platform_write ("Failed to initialize the Packet Accelerator \n");
                  goto main_exit;                                                  
             }                                                                     
             else                                                                  
             {                                                                     
                  platform_write ("PA successfully initialized \n");               
             }                                                                     
         }                                                                         
         else                                                                      
         {                                                                         
                if (res_mgr_init_pass()!= 0)                                        
             {                                                                     
                 platform_write ("Failed to initialize the Packet Accelerator \n");
                 goto main_exit;                                                  
            }                                                                     
            else                                                                  
            {                                                                     
                 platform_write ("PA successfully initialized \n");               
            }                                                                     
         }

    cosoleoutput:

    [C66xx_0] Test Start...
    [C66xx_0] QMSS successfully initialized
    [C66xx_0] CPPI successfully initialized
    [C66xx_0] PA successfully initialized
    [C66xx_0] PASS successfully initialized
    [C66xx_0] Ethernet subsystem successfully initialized
    [C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
    [C66xx_0] Registration of the EMAC Successful, waiting for link up ..
    [C66xx_0] Network Added: If-1:192.168.2.100
    [C66xx_1] Test Start...
    [C66xx_1] QMSS successfully initialized
    [C66xx_1] CPPI successfully initialized
    [C66xx_1] PA successfully initialized
    [C66xx_1] PASS successfully initialized
    [C66xx_1] Ethernet subsystem successfully initialized
    [C66xx_1] Ethernet eventId : 48 and vectId (Interrupt) : 7
    [C66xx_1] Timeout waiting for reply from PA to Pa_addMac command
    [C66xx_1] ti.sysbios.heaps.HeapMem: line 354: assertion failure: A_invalidFree: Invalid free
    [C66xx_1] xdc.runtime.Error.raise: terminating execution

     I know that I shouldn't assume both cores as master core. However i don't know how to modify that.Can you give me a hand ?

  • The Nimu driver doesn't support simultaneous multicore operation.  It is not something we currently plan to support moving forward either.  Why are you needing to do this?

    Regards,

    Travis