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.

Question about HelloWorld example

Hi experts!

I am new with the ccs5 and EVM6678L. I am trying to run the HelloWorld example under the NDK directory. It doesn't run correctly and I got the following message:

[C66xx_0] A0=0x1 A1=0x20

[C66xx_0] A2=0x0 A3=0x857ff0

[C66xx_0] A4=0x2620328 A5=0x0

[C66xx_0] A6=0x0 A7=0x2

[C66xx_0] A8=0x0 A9=0x0

[C66xx_0] A10=0x0 A11=0x814f8578

[C66xx_0] A12=0x0 A13=0x0

[C66xx_0] A14=0x0 A15=0x0

[C66xx_0] A16=0x858010 A17=0x0

[C66xx_0] A18=0x857ff0 A19=0x20

[C66xx_0] A20=0x0 A21=0x4c

[C66xx_0] A22=0x2005000 A23=0xc054888

[C66xx_0] A24=0x2005000 A25=0x825b80

[C66xx_0] A26=0xc054888 A27=0xc054888

[C66xx_0] A28=0x0 A29=0x81506d93

[C66xx_0] A30=0x0 A31=0x1

[C66xx_0] B0=0x0 B1=0x0

[C66xx_0] B2=0x1 B3=0x8000ec84

[C66xx_0] B4=0x0 B5=0x0

[C66xx_0] B6=0x858010 B7=0x0

[C66xx_0] B8=0xe0c28b0a B9=0x0

[C66xx_0] B10=0x15000103 B11=0x814f8574

[C66xx_0] B12=0x0 B13=0x0

[C66xx_0] B14=0x800a33d0 B15=0x857fc0

[C66xx_0] B16=0xfa00000 B17=0x0

[C66xx_0] B18=0x0 B19=0x0

[C66xx_0] B20=0x0 B21=0x108228ec

[C66xx_0] B22=0x0 B23=0x4

[C66xx_0] B24=0x180805d B25=0x48028840

[C66xx_0] B26=0xc9c260a3 B27=0x0

[C66xx_0] B28=0x20000000 B29=0xff

[C66xx_0] B30=0xbc B31=0x7f

[C66xx_0] NTSR=0x1000c

[C66xx_0] ITSR=0x0

[C66xx_0] IRP=0x0

[C66xx_0] SSR=0x0

[C66xx_0] AMR=0x0

[C66xx_0] RILC=0x0

[C66xx_0] ILC=0x0

[C66xx_0] Exception at 0x8000ee28

[C66xx_0] EFR=0x2 NRP=0x8000ee28

[C66xx_0] Internal exception: IERR=0x8

[C66xx_0] Opcode exception

 

What did I do wrong, and what should I expect to see?

 

BR

Chunjian

  • You had an Opcode exception at 0x8000EE28.  Basically it means the CorePac attempted to execute an illegal Opcode. 

    This could be due to a number of different things.

    1.) DDR wasn't configured correctly so you had garbage data in DDR and when you tried to execute from it it was grabbing garbage data

    2.) Your code ran off into the weeds and you're executing garbage data.

    3.) Something such as your stack overflowed into an area where you have program and when it tried to execute it, it was garbage.  I see your SP (B15 is used as SP) is in L2 so this is not likely.

     

    Anyway, you should open up a disassembly window in the debug mode and set the location to where the opcode exception is (0x8000EE28) and start looking at what could be the issue.  Set the PC to that address, make sure you have associated code w/ it, etc.

    Best Regards,

    Chad

  • Thanks Chad for your quick response!

     

    Since I am not experienced in debugging the codes, I am wondering what I have done wrong running the example. I think the purpose of this simple example is to help a newbie like me to get on track quickly, so debuging it is beyond me. If I do everything as is supposed, can I get this out of box example running?

    What I did is:

    -set the boot mode dip to "NOR boot on image 0 (default)"  (the noboot mode is also tried), and power on

    -Make a target configuration file evmc6678l_xds100v1.ccxml, and launch it. (This turned out to be correct, because I have run it with the HUA example successfully)

    -Connect the target C66xx_0, load the gel file evmc6678l.gel, and run the script global_default_setup.

    -Load the program C:\TI\mcsdk_2_00_00_beta2\examples\ndk\helloWorld\evmc6678l\Debug\helloworld_evmc6678l.out to C66xx_0, and run it.

    Is this the right procedure?

     

    I have also tried to step through the codes, and it breaks down at  line 103 of evmc6678.c:

    100 /* PLL WORK AROUND FOR THE SI BUG */ 101 /* Reset the PLL, wait at least 5 us, release reset */ 102 ctl = ctl | 2; 103 PLLCTL_REG = ctl;

    with the error:

    C66xx_0: Trouble Reading PC Register: The target does not have a CPU clock.   (Error -1178) @ -2147423012 (0x8000ECDC)

    C66xx_0: Trouble Reading Register CSR: The target does not have a CPU clock.   (Error -1178) @ 65 (0x41)

    C66xx_0: Trouble Reading Memory Block at 0x857fc0 on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748992 (0x857FC0)

    C66xx_0: Call Stack: Cannot unwind further: Target failed to read memory at 0x00857FC0

    C66xx_0: Trouble Reading Memory Block at 0x857fb4 on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748980 (0x857FB4)

    C66xx_0: Trouble Reading Memory Block at 0x857fa4 on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748964 (0x857FA4)

    C66xx_0: Trouble Reading Memory Block at 0x857fac on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748972 (0x857FAC)

    C66xx_0: Trouble Reading Memory Block at 0x857fb0 on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748976 (0x857FB0)

    C66xx_0: Trouble Reading Memory Block at 0x857fbc on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748988 (0x857FBC)

    C66xx_0: Trouble Reading Memory Block at 0x857fb8 on Page 0 of Length 0x4: The target does not have a CPU clock.   (Error -1178) @ 8748984 (0x857FB8)

    C66xx_0: Trouble Reading Memory Block at 0x857fa8 on Page 0 of Length 0x2: The target does not have a CPU clock.   (Error -1178) @ 8748968 (0x857FA8)

    Something to do with the SI BUG?

     

    Any idea?

     

    BR

    Chunjian

  • Chunjian,

    First, let's get you up to date on your software, the directory that you indicate is beta2 and is very old.  There have been countless updates since then.  Please download and install the latest MCSDK from: http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html.  It will have updated gels as well.

    When you run and load the program via CCS, you need to put the EVM dip switches into "no boot" mode.  Please see: http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup  for instructions on how to do that.  The rest of your steps seem correct.  Let me know how it goes.

    Other up-to-date links of interest will be:

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_Getting_Started_Guide#Hardware_Setup

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

    Regards,

    Travis

     

  • Hi Travis

    It works after I updated the MCSDK to the newest version. Thanks a lot!

    Regards,

    Chunjian