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.

[FAQ] 66AK2H12: NIMU EMAC example client for K2H family devices (66AK2H06, 66AK2H12, 66AK2H14 and K2H EVM)

Part Number: 66AK2H12

How to run NIMU EMAC examples from TI-RTOS SDK on K2H devices?

  • To run the NIMU EMAC example for K2H devices make sure the pre-requisites are present.

    1. Install CCS (https://www.ti.com/tool/download/CCSTUDIO/9.3.0.00012),
    2. Install PROCESSOR-SDK-RTOS-K2HK  06_03_00_106 https://software-dl.ti.com/processor-sdk-rtos/esd/K2HK/latest/index_FDS.html
    3. Generate the Example Projects (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1083353/faq-66ak2h14-how-to-generate-the-ccs-pdk-examples-for-66ak2h14---k2h-evm/4010024#4010024).

    Now Import the CCS project into CCS and go on

    1. To Import the project goto File -> Import -> "CCS projects" in "C/C++" -> Browse "Select Search-directory". make sure to uncheck the "Copy Projects into Workspace" (This is to avoid compilation errors only If TI-RTOS SDK was installed in a different location than "C:\ti\").
    2. Now, we have DSP example project ("NIMU_emacExample_EVMK2HC66BiosExampleProject") and ARM example project ("NIMU_emacExample_EVMK2H_armBiosExampleProject") (Do not open ARM and DSP examples at same time, CCS will throw project out-of-sync error dialog).
      1. Both DSP and ARM project uses "HelloWorld.c" where NIMU IP configuration is stored. Same code changes are applicable for ARM and DSP projects.
      2. Code changes are shown below,
        1. Static IP configuration:
          //---------------------------------------------------------------------------
          // Local IP and gateway IP can be modified to our requirement
          //
          char *HostName    = "tidsp";
          char *LocalIPAddr = "192.168.1.4";
          char *LocalIPMask = "255.255.255.0";    // Not used when using DHCP
          char *GatewayIP   = "192.168.1.1";    // Not used when using DHCP
          char *DomainName  = "demo.net";         // Not used when using DHCP
          char *DNSServer   = "0.0.0.0";          // Used when set to anything but zero
          
          
          //
          // Main Thread
          //
          int StackTest()
          {
              ...
              // If the IP address is specified, manually configure IP and Gateway
              #if defined(_SCBP6618X_) || defined (DEVICE_C6678) || defined(_EVMTCI6614_) || defined(DEVICE_K2H) || defined(DEVICE_K2K) || defined(DEVICE_K2L) || defined(DEVICE_K2E)
          
              /* SCBP6618x, EVMTCI6614, EVMK2H, EVMK2K always uses DHCP */
              if (1) // set it as 1 for Manual IP configuration
              {
                  //Manual IP configuration code
              }
              else
              {
                  //DHCP IP configuration code
              }
              ...
          }
          1. Output for static IP in DSP core
          2. Verification
          3. Output for static IP in the ARM core
        2. DHCP configuration: 
          //
          // Main Thread
          //
          int StackTest()
          {
              ...
              // If the IP address is specified, manually configure IP and Gateway
              #if defined(_SCBP6618X_) || defined (DEVICE_C6678) || defined(_EVMTCI6614_) || defined(DEVICE_K2H) || defined(DEVICE_K2K) || defined(DEVICE_K2L) || defined(DEVICE_K2E)
          
              /* SCBP6618x, EVMTCI6614, EVMK2H, EVMK2K always uses DHCP */
              if (0) // set it as 0 for DHCP IP configuration
              {
                  //Manual IP configuration code
              }
              else
              {
                  //DHCP IP configuration code
              }
              ...
          }
          1. Output for DHCP for DSP core
          2. Verification
          3. Output for DHCP in the ARM core

          4. Unlike C665x and C667x examples, Telnet and HTTP service were not included in the source code. So, TCP Ports 23 and 80 remain closed and only verification can be done using the Ping utility.

    Thanks & Regards,

    Rajarajan U