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.

programming the flash on the EVM board to make it work as standalone

Jeff,

 

I have a code that writes into the flash. I could execute it and see a message on the console as "successfully programmed and verifying....files matched"

With reference to the thread on http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/97307/344791.aspx#344791

I used gel file named  evmomapl137_dsp.gel as the initialization script in the subpath for the dsp. 1) Do I need to remove this? (as one of the some posts suggest to check if there's any attached initialization does not occur while booting from SPI  if I should remove how would the omap initialize?

I found some debug gel files to know the status of the boot at http://processors.wiki.ti.com/index.php/OMAP-L1x_Debug_Gel_Files

How to use this file ?Do I simply replace the evmomapl137_dsp.gel file to debug . I did his and got an msg on console when I connect the target along with some device info msgs

 

 

C674X_0: Output: ---------------------------------------------

C674X_0: Output: |               BOOTROM Info                |

C674X_0: Output: ---------------------------------------------

C674X_0: Output: ROM ID: d800k001 

C674X_0: Output: Silicon Revision 1.0

C674X_0: Output: Boot Mode: SPI0 Flash

C674X_0: Output: 

ROM Status Code: 0x00000000 

Description:C674X_0: Output: No error

C674X_0: Output: 

Program Counter (PC) = 0xC000C604

 

 

 

But I cannot execute the code with this gel file replaced to  the evmomapl137 one . Suggestions ??

 

Secondly  I want to debug the boot process in the spi0 flash boot mode with" JTAG disconnected" . Can this be done with the help of debug gel file ? As probably this one gives msg on console but once I disconnect JTAG ( boot up from SPI0 flash ) how do I debug boot up 

I do not see data exchange on the SPI pins when I reset the board but I can see data streaming on the SPI pins while programming the flash through the code

 

Any suggestions

. Also if there's any link to know how to use the gel files to debug if its different from what I described or if anyone  can describe that would be great 

 

 

Regards

NIKHIL RAJPAL

  • 1)  If you are unable to execute your code when you remove the EVM GEL file, that means it is performing some initialization that you are not doing in your code. Look at the "OnTargetConnect" function in the GEL file, and you will see it is performing the following:

        Setup_System_Config( );         // Setup Pin Mux and other system module registers
        Setup_PLL();                    // Setup PLL0 (300MHZ ARM, 300MHz DSP, 133MHz EMIFs
        Setup_Psc_All_On( );            // Setup All Power Domains
        Setup_EMIFA();                  // Async EMIF
        Setup_EMIFB();                  // Setup SDRAM
        Enable_ARM();

    You probably need to perform some of these steps in your code in order for your code to run.

    2) The best way to debug boot would be to disconnect JTAG, reset the device, and then connect the JTAG and CCS with the debug GEL file. This will print out any ROM errors and the current PC.

    Jeff


  • I have posted the message I got with the help of that debug file as 

     

     

    C674X_0: Output: 

    ---------------------------------------------

    C674X_0: Output: |             Device Information            |

    C674X_0: Output: ---------------------------------------------

    C674X_0: Output: DEV_INFO_00 = 0x8B7DF02F

    C674X_0: Output: DEV_INFO_01 = 0x00000000

    C674X_0: Output: DEV_INFO_02 = 0x0000F37D

    C674X_0: Output: DEV_INFO_03 = 0x00000021

    C674X_0: Output: DEV_INFO_04 = 0x00000000

    C674X_0: Output: DEV_INFO_05 = 0x000003F0

    C674X_0: Output: DEV_INFO_06 = 0x00000000

    C674X_0: Output: DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 8-0-120428-7-10-44

    C674X_0: Output: DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 1,0,0,13278

    C674X_0: Output: -----

    C674X_0: Output: DEV_INFO_17 = 0x00030003

    C674X_0: Output: DEV_INFO_18 = 0x00000000

    C674X_0: Output: DEV_INFO_19 =C674X_0: Output: 0C674X_0: Output: 0C674X_0: Output: 0C674X_0: Output: 0C674X_0: Output: 0C674X_0: Output: 

    C674X_0: Output: -----

    C674X_0: Output: DEV_INFO_20 = 0x30303864

    C674X_0: Output: DEV_INFO_21 = 0x3130306B

    C674X_0: Output: DEV_INFO_22 = 0x00000000

    C674X_0: Output: DEV_INFO_23 = 0x00000000

    C674X_0: Output: -----

    C674X_0: Output: DEV_INFO_24 = 0x0702C00A

    C674X_0: Output: DEV_INFO_25 = 0x0801D66C

    C674X_0: Output: DEV_INFO_06 = 0x00000000

    C674X_0: Output: DEV_INFO_26 = 0x67BC0001

    C674X_0: Output: 

     

    C674X_0: Output: ---------------------------------------------

    C674X_0: Output: |               BOOTROM Info                |

    C674X_0: Output: ---------------------------------------------

    C674X_0: Output: ROM ID: d800k001 

    C674X_0: Output: Silicon Revision 1.0

    C674X_0: Output: Boot Mode: SPI0 Flash

    C674X_0: Output: 

    ROM Status Code: 0x00000000 

    Description:C674X_0: Output: No error

    C674X_0: Output: 

    Program Counter (PC) = 0x800067A4

     

    I can neither see the application program running nor any activity on the SPI data pins on boot up .. I can see data transfer while the programming of flash occurs on SPI pins 

     

     

    Can you suggest me something based upon the message on the CCS .I combined the initialization and debug gel file and used as one to intiialize and debug 

  • It looks like your application loaded successfully. The ROM has no errors and the PC is the share RAM region of the memory map. I assume that is where your code is loaded as well?

    You can debug the code in CCS by choosing Load Symbols, and then loading the original .out file (not the created AIS file). This should help you step through your code and debug the issue.

    Check the PINMUX registers at this point to make sure they were set up. Keep in mind you must be in supervisor mode in order to change the SYSCFG registers from your code, so that might be your issue. An easy solution would be to use AISgen and select Configure Pinmux, and have the AIS command set the pinmux for you.

    Jeff

  • Jeff,

     

    Do you mean I should debug the application that I am loading?? Is that what you meant to debug with the Load symbols??

    I programmed the flash again with an application (which I saw running without the gel file)

    I checked the PINMUX when I powered on the board by just Target-> connect target in the CCS and I could see the PINMUX settings as fine. I also checked the disassembly and the program counter was at location

     

    0x800067A4:   with it having few NOPs and then probably the code as shown below

     

    0x800067A4:   0001A120            BNOP.S1       C$L1 (PC+4 = 0x800067a4),5

    0x800067A8:   00000000            NOP

    0x800067AC:   00000000            NOP

    0x800067B0:   00000000            NOP

    0x800067B4:   00000000            NOP

    0x800067B8:   00000000            NOP

    0x800067BC:   00000000            NOP

                remove:

    0x800067C0:   0FFF9010            B.S1          unlink (PC-896 = 0x80006440)

    0x800067C4:   00008000            NOP           5

    0x800067C8:   00000000            NOP

    0x800067CC:   00000000            NOP

    0x800067D0:   00000000            NOP

    0x800067D4:   00000000            NOP

    0x800067D8:   00000000            NOP

    0x800067DC:   00000000            NOP

                etext, __etext, _stack:

    0x800067E0:   A3B4CF15            .word         0xa3b4cf15

    0x800067E4:   17E1547C ||         ADDAW.D1X     B14,24916,A15

    0x800067E8:   3A07E864     [!B0]  LDW.D1T1      *-A1[A31],A20

    0x800067EC:   40145C70     [ B1]  SADDUS2.S1X   A2,B5,A0

    0x800067F0:   8A40927D     [ A1]  STW.D2T1      A20,*+B14[16530]

    0x800067F4:   1D0F1CB1 ||         .word         0x1d0f1cb1........................................................................................................goes on 

     

     

    Does that mean the code was there at desired location ??  

    But still I do  not see any data trafffic on the SPI data pins on boot up as I could see while SPI flash getting programmed 

     

    Regards

    NIKHIL RAJPAL

  • Yes in CCS debug your program by choosing Load Symbols. If you have the source files open, you should see the PC line up with where you are in the code. If you are just looking at the disassembly, do the function names line up with the addresses found in your .map file?

    Jeff

  • Jeff, 

     

    Thanks . I debugged the application without first disconnecting the JTAG and hiting reset and then loading symbols from the project containing the application and found that the execution of the application was not proper(i.e stops at breakpoint inside the if loop but not at breakpoint on if statement- wierd behaviour) . But then we realized that the application was writing on to the memory location of the BOOTLOADER space which should not have been done. 

    Solving that last observation solved the problem. Thanks though .... learnt a lot as a process of debugging with new CCS