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.

Working Ethernet example for EVM6678L

Does anyone have a complete example program (source) that puts a packet (any packet) on the EVM6678L Ethernet so that a PC connected to the Ethernet connector can see some activity?

I received a suggestion to look at \ti\pdk_C6678_1_0_0_21\packages\ti\drv\exampleProjects\PA_emacExample_exampleProject. While this builds and does something when executed, it generates no observable activity on the Ethernet. The limited documentation I have found for this example (comments in the source) is ambiguous, stating both:

   The packets sent by the application are sent onto wire and
   since the destination MAC on the packet is the Ethernet Switch
   MAC address, the packets are received by simulator and passed
   back up to the example application for processing.

and elsewhere:

   Default test configuration for the silicon
   To run test at the CCS simulator ...

Further investigation indicates that the example, as presented, is indeed intended to be used with the simulator and not the real hardware.

   The following SERDES configuration is required for chip simulator only.
   The platform-dependent SERDES configuration should be done by the corresponding
   CCS GEL scripts or platformLib

I have tried running the gel scripts, but the program still fails to generate any activity on the Ethernet.

Does anybody have a simple example that just runs and generates detectable activity on the Ethernet without requiring esoteric changes?

  • Hi Peter,

    Try - mcsdk_2_00_09_21\examples\ndk\client\evmc6678l, than you can ping or use the winapp under ndk_2_21_01_38\packages\ti\ndk\winapps

    HR

  • I have found the example you mention and built it without any obvious problems. However, when I run it (Code Composer Studio  Version: 5.2.1.00018), it generates no output but appears to jump to random places.

    For example, after the latest run, pausing the program leaves the PC at 00878004:

    00878004:   0000D121            .word         0x0000d121
    00878008:   FFFFFFFF ||         .word         0xffffffff
    0087800c:   8603FFFF ||  [ A1]  STW.D2T2      B12,*+B15[1023]
    00878010:   04060008 ||         EXTU.S1       A1,16,0,A8
    00878014:   50000100     [!B1]  SMPYH.M1      A0,A0,A0
    00878018:   8CADC47F     [ A1]  STW.D2T2      B25,*+B14[11716]
    0087801c:   0101A8C0 ||         SUB.D1        A0,A13,A2
    00878020:   00000000            NOP           
    00878024:   A8C00000     [ A2]  NOP           
    00878028:   00000E01            MPYSP.M1      A0,A0,A0
    0087802c:   00000000 ||         NOP           
    00878030:   00000000            NOP           
    00878034:   00000000            NOP           
    00878038:   00000000            NOP           
    0087803c:   69CCDF0B     [ B2]  EXTU.S2       B19,6,31,B19
    00878040:   00000000 ||         NOP           
    00878044:   5F400000     [!B1]  NOP           
    00878048:   D121B9C2     [!A0]  SUBAB.D2      B8,0xd,B2
    0087804c:   00000000            NOP           
    00878050:   00000000            NOP           
    00878054:   69740000     [ B2]  NOP           
    00878058:   6F6F622D     [ B2]  LDB.D2T1      *+B14[28514],A30
    0087805c:   61742D74 ||         .word         0x61742d74
    00878060:   2D656C62     [ B0]  SHL.S2        B25:B24,B11,B27:B26
    00878064:   00727673            MPY32US.M2X   B19,A28,B1:B0

    Is anything special needed to get this program to run correctly?

  • Hi Peter,

    For building the Client project  I'm using the below, the ping and winapp works fine, If you are using DHCP than user switch "1" should be ON for static address it should be OFF, put all the boot switches to "ON" beside Pin 1 of SW3 which should be "OFF" for little Endian - 

    CCS 5.2.0.00069

    XDCtools - 3.23.3.53

    NDK - 2.21.1.38

    SYS/BIOS - 6.33.6.50

    MCSDK - 2.0.9.21

    BR,

    HR

  • I'm not sure how your response matches my previous post. The application is clearly not doing anything sensible. If the switches were wrong, then I would expect

    the program to be running under control, but not behaving the way I would want; I would not expect it to jump to random places in memory.

  • Peter,

    What I meant is that I compiled the client project and it is working as expected without stooping or jumping to unpredicted places, 

    BR,

    HR

  • OK.

    Does anyone have any suggestions for why the same program, untouched from the installation, fails to behave sensibly when built on a fresh install of CCS v5.2.1.00018 and run on an EVM6678L?

    Are there any magic settings needed? is there any documentation on how to build & run this example?

  • Peter,

    Can you compare the CCS components version I have sent with the one you are using,

    HR

  • CCS 5.2.1.18

    XDCtools - 3.23.3.53

    NDK - 2.21.1.38

    SYS/BIOS - 6.33.5.46

    MCSDK - 2.0.9.21

  • Peter,

     

    I suggest you run the HUA demo, present in the “..\MCSDK2.1\mcsdk_2_01_00_02\demos\hua\evmc6678l”.  the Release directory should also contain a pre-built binary.

     

    MCSDK user page has instructions on running this demo.

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

    http://processors.wiki.ti.com/index.php/MCSDK_HUA_Demonstration_Guide

     

    I suggest you run with static IP address settings. 

  • I do not think switching to a different example is going to be helpful. I know the board is working; the on-board example works without problems and I can load and run my application (albeit with no host communication) using the bootloader over Ethernet.

    This morning after doing nothing in particular, I started to get the following behaviour that seems to change each time I try it.

    The switch settings are as described in BiosMulticoreSDK...gettingstarted:

     sw3:off,off,on,off
     sw4: on, on,on,on
     sw5: on, on,on,off
     sw6: on, on,on,on
     
    Here's what I have done:
    1: power cycle the EVM6678L
    2: connect core 0
    3: load evmc6678.gel
    4: run Global_Default_Setup - sometimes it works, sometimes it fails (see later)
    5: run client_evmc6678
    6: either silence or a popup saying 'The function "count" returned an error condition (0x80780001).'

    Repeating the procedure (including power-cycling the board) results in:
    C66xx_0: GEL Output: Setup_Memory_Map...
    C66xx_0: GEL Output: Setup_Memory_Map... Done.
    C66xx_0: GEL Output:
    Connecting Target...
    C66xx_0: GEL Output: DSP core #0
    C66xx_0: GEL Output: No initialization performed since bootmode = 0x00000005
    C66xx_0: GEL Output: You can manually initialize with GlobalDefaultSetup
    C66xx_0: GEL Output: C6678L GEL file Ver is 2.004
    C66xx_0: GEL Output: Global Default Setup...
    C66xx_0: GEL Output: Setup Cache...
    C66xx_0: GEL Output: L1P = 32K   
    C66xx_0: GEL Output: L1D = 32K   
    C66xx_0: GEL Output: L2 = ALL SRAM   
    C66xx_0: GEL Output: Setup Cache... Done.
    C66xx_0: GEL Output: Main PLL (PLL1) Setup ...
    C66xx_0: GEL Output: PLL1 Setup for DSP @ 1000.0 MHz.
    C66xx_0: GEL Output:            SYSCLK2 = 333.3333 MHz, SYSCLK5 = 200.0 MHz.
    C66xx_0: GEL Output:            SYSCLK8 = 15.625 MHz.
    C66xx_0: GEL Output: PLL1 Setup... Done.
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains...
    C66xx_0: GEL Output: Security Accelerator disabled!
    C66xx_0: GEL Output: Power on all PSC modules and DSP domains... Done.
    C66xx_0: GEL Output: PA PLL (PLL3) Setup ...
    C66xx_0: GEL Output: PA PLL Setup... Done.
    C66xx_0: GEL Output: DDR3 PLL (PLL2) Setup ...
    C66xx_0: GEL Output: DDR3 PLL Setup... Done.
    C66xx_0: GEL Output: DDR begin (1333 auto)
    C66xx_0: GEL Output: XMC Setup ... Done
    C66xx_0: Trouble Writing Memory Block at 0x210000e4 on Page 0 of Length 0x4: (Error -1060 @ 0x210000E4) Device is not responding to the request.
    Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
    (Emulation package 5.0.747.0)
    Global_Default_Setup() cannot be evaluated.
    target access failed
        at (*((unsigned int *) (0x21000000+0x000000E4))&=~(0x00008000)) [evmc6678l.gel:262]
        at ddr3_setup_auto_lvl_1333(0) [evmc6678l.gel:877]
        at Global_Default_Setup_Silent() [evmc6678l.gel:1576]
        at Global_Default_Setup()
    C66xx_0: Trouble Reading Memory Block at 0x8158d328 on Page 0 of Length 0xc1: (Error -1060 @ 0x8158D328) Device is not responding to the request.
    Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
    (Emulation package 5.0.747.0)
    C66xx_0: Trouble Reading Memory Block at 0x8158d328 on Page 0 of Length 0xf9: (Error -1060 @ 0x8158D328) Device is not responding to the request.
    Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK).
    (Emulation package 5.0.747.0)

    Repeating yet again, the GEL script reports no errors and I can load the application which stops at main.

    Running the program gives the following output:

    [C66xx_0] QMSS successfully initialized
    [C66xx_0] CPPI successfully initialized
    [C66xx_0] PA successfully initialized
    [C66xx_0]
    [C66xx_0] TCP/IP Stack Example Client
    [C66xx_0] Configuring DHCP client
    [C66xx_0] PASS successfully initialized
    [C66xx_0] Ethernet subsystem successfully initialized
    [C66xx_0] Ethernet eventId : 48 and vectId (Interrupt) : 7
    [C66xx_0] Timeout waiting for reply from PA to Pa_addMac command
    [C66xx_0] Add_MACAddress failed
    [C66xx_0] Error: Unable to register the EMAC
    [C66xx_0] NIMUIOCTL Failed with error code: -22
    [C66xx_0] Service Status: DHCPC    : Failed   :          : 000
    [C66xx_0] Service Status: Telnet   : Enabled  :          : 000
    [C66xx_0] Service Status: HTTP     : Enabled  :          : 000

    I note that this problem has been reported by several people going back over one year, but no definitive solution has been proposed. I have tried the suggestions given in
    (http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/106033.aspx) but the problem persists.

    If this is what happens with a supposedly-working out-of-box example provided by TI, I dread to think what horrors await when I try to do something real!

    Has TI addressed this problem and found a solution? I would have thought that more than a year would be enough time to resolve it.

  • Peter,

    Please try - 

     sw3: off, on,on,on - little Endian
     sw4: on, on,on,on
     sw5: on, on,on,on
     sw6: on, on,on,on

    sw1: off, off - Static IP,

    HR

  • That made it work. Thanks.

    Have I missed something, or has nobody bothered to document the switch settings needed by this example?

  • Great ! good-luck,

    HR

  • ... although when I say 'working', I mean it is no longer generating the errors. It comes up and waits for activity, but, as usual, there is zero Ethernet activity detectable and it is not responding to pings....

    one step forward,...

  • Peter,

    Check if you are on the same subnet, I assume you are connected to a PC/laptop than try disable/enable your local area Eth. connection

    HR

  • As far as I can tell, everything is correct, but no activity. The connection status on the laptop shows 0 packets received (firewall disabled).

    Disabling/Enabling has no observable effect.

    The on-board demo works, so the connection can be made to operate correctly, but this example still fails.

  • Extra information:

    Every time while loading the example I get pages of message like the following:

    20b00058:    Earlier errors prevented reading of target memory at 0x20B00058 [code=0x40000]

    These disappear as soon as the problem appears to have been loaded.

  • Peter,

    This could be Gel memory map issue,

    On running the program what are you getting on the output?

    HR

  • [C66xx_0] QMSS successfully initialized
    [C66xx_0] CPPI successfully initialized
    [C66xx_0] PA successfully initialized
    [C66xx_0]
    [C66xx_0] TCP/IP Stack Example Client
    [C66xx_0] Configuring DHCP client
    [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] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: Telnet   : Enabled  :          : 000
    [C66xx_0] Service Status: HTTP     : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Fault    : 002
    [C66xx_0] Service Status: DHCPC    : Disabled :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  :          : 000
    [C66xx_0] Service Status: DHCPC    : Enabled  : Running  : 000

  • Peter,

    Can you try static IP - SW1 both to OFF,

    HR

  • I assume you meant SW9 (the block of two switches next to SW6).

    [C66xx_0] QMSS successfully initialized
    [C66xx_0] CPPI successfully initialized
    [C66xx_0] PA successfully initialized
    [C66xx_0]
    [C66xx_0] TCP/IP Stack Example Client
    [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.105
    [C66xx_0] Service Status: Telnet   : Enabled  :          : 000
    [C66xx_0] Service Status: HTTP     : Enabled  :          : 000

    Still no visible activity on the wire.

  • Peter,

    OK, this is weird, I assume you see the Eth. lights on the RJ45 connection,

    HR

  • Yes. There is an orange led illuninated.

  • ... and a flashing green one.

  • The strangeness continues. I have just disconnected the Ethernet cable from the 6678 while it was still running. On reconnecting it, I could ping the device from the laptop.

    Restarting the 6678 and reloading the program puts the device into the same, unresponsive state. Disconnecting and reconnecting the cable makes it work again.

    At least I can get something to happen.

  • Try replacing the cable but as you said at least you have something working...

  • I have tried that. I get hte same behaviour with several different cables. The only thing I can think of is a problem with the connector.

  • HI HR,

    I've had the same problems and I tried using the same settings but that does not seem to work.

    I know this is a old thread, but is any solution provided to this problem ?

  • Don't hold your breath.

  • Hi Harsha,

    Can you try running the example mcsdk_2_01_02_05\examples\ndk\client and than check if ping is working, you can use also applications from ndk_2_21_01_38\packages\ti\ndk\winapps,

    Thanks,

    HR

  • Hi Peter,

    You could use Wireshark a free and open-source packet analyzer. It is used for network troubleshooting and analysis. With that you might be able to see what's going on in your Network interface. Also you should be able to see what is happening to the network packets.

  • Thanks for the suggestion, but WireShark was the way I knew there was no network activity.

    The problem was eventually resolved with the help of TI staff who provided more source code that I was able to get working in a non-loopback mode.

  • I would like to know if you are working on WIndows or Linux ?

    Can you give more details on that.

    I am trying to run NDK helloworld client example for C6678 but unable to do the same on simulator.

    Details: 

    I am using Windows 8.

  • Can you also explain what you mean by the below statement

    Peter Robertson said:
    non-loopback mode.

    Regards,

  • I use Windows XP.

    The TI example I based my work on was written for hardware configured in loopback mode, where output packets never actually get out of the device but are bounced back into the receiver. It's as though the device outputs were connected back to its inputs.

  • Hi Peter,

    Thanks for the Information.