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.

C674x Nor Flash Boot Problem

Other Parts Discussed in Thread: ALP

Hi

We are having problem with custom board C6748  Silicon Revision 2.0 "Nor Flash boot" with aisgen binary image.

After unsuccessful boot, the diagnostic gel shows "invalid aisgen sync opcode", with code partially residing on the  memory. PSC, PLL and DDR settings are OK.

After a lot of inspection , I may only suspect aisparse  copy count gets corrupted  while copying the code from flash to internal memory, therefore parser believes a code part is a sync code.

My questions are as follows:

1 ) Is there a way to manipulate PC to debug boot process with CCS? (change PC to start of bootloader program etc)

Do we have the source of ROM bootloader (in assembly or C) which may be loaded as symbols to bootloader?

2) Can I stall the bootloader to be continued after I connect  to the DSP via JTAG?

3) Is there any unwritten restriction regarding NOR Flash Bootloader ( unallowed internal memory addresses etc)

Please advise, we are having hard time with project schedules and require dire assistance. I may share the binary image with you via PM if required. Thanks

  • Not sure if I can help. Some questions that may move the things along:
    Which NOR boot mode are you using?
    Did you write the NOR boot config word to NOR flash?
    Where are in NOR flash are you programming your image?
    Are you using AISGEN?
    Did you develop on an eval board? Did you get NOR boot working on the eval board?

    The ROM bootloader source code is TI proprietary and I have personally never seen it released. You are forced to trust that that the bootloader is functioning correctly.
  • Hi Titus & Norman ,

    I have double checked the Pinmux configuration, ROM configuration on aisgen, and CE2 setup variables,  used two different AisGen versions (v1.7c and v1.13).

    a )I am using NOR aisgen boot mode.

    b) It is written automatically by ais output.

    c) First Sector is used

    d) Yes, I am using Aisgen.

    e) Yes we use a ZOOM OMAP L138 eval board, but Eval board has no NOR Flash Boot option. 

    Attached is a shortened out aisparser  output of my binary file from aisgen v1.7c for you to comment (Hopefully it attached correctly). Binary file starts with ordinary settings, then moves to section copy commands. After unsuccessful boot, I see the pll pinmux  etc setup correctly done, and code partially residing on memory.


    I have my complete trust in TI :). However my board is not working, and I have a problem to solve and I need a toolset.
    Having the bootloader code, and replicating the boot within controlled CCS environment is the thing in our mind.  Please advise if bootloader uses L2 & L3.

    We still need some help from bootloader experts.

    // Generated by aisparse v1.14
    
    const unsigned int nvram_image[] = {
    
    /* 0x00000000 */ 0x00000021, // NOR Configuration
    
    /* 0x00000004 */ 0x41504954, // MAGIC
    
    /* 0x00000008 */ 0x5853590D, // Function Execute
    /* 0x0000000C */ 0x00020000, //   Function[0] PLL Configuration
    /* 0x00000010 */ 0x00170001, //   Arg[0]
    /* 0x00000014 */ 0x00000205, //   Arg[1]
    
    /* 0x00000018 */ 0x5853590D, // Function Execute
    /* 0x0000001C */ 0x00080003, //   Function[3] EMIFA SDRAM Configuration
    /* 0x00000020 */ 0x17010001, //   Arg[0]
    /* 0x00000024 */ 0x00000002, //   Arg[1]
    /* 0x00000028 */ 0x000000C4, //   Arg[2]
    /* 0x0000002C */ 0x02034622, //   Arg[3]
    /* 0x00000030 */ 0x1C923209, //   Arg[4]
    /* 0x00000034 */ 0x38111100, //   Arg[5]
    /* 0x00000038 */ 0x00000492, //   Arg[6]
    /* 0x0000003C */ 0x00000000, //   Arg[7]
    
    /* 0x00000040 */ 0x5853590D, // Function Execute
    /* 0x00000044 */ 0x00050005, //   Function[5] PLL & Peripheral Clock Configuration
    /* 0x00000048 */ 0x8432432D, //   Arg[0]
    /* 0x0000004C */ 0x00000000, //   Arg[1]
    /* 0x00000050 */ 0x00000000, //   Arg[2]
    /* 0x00000054 */ 0x00000000, //   Arg[3]
    /* 0x00000058 */ 0x00000000, //   Arg[4]
    
    /* 0x0000005C */ 0x5853590D, // Function Execute
    /* 0x00000060 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000064 */ 0x00000000, //   Arg[0]
    /* 0x00000068 */ 0x00000000, //   Arg[1]
    /* 0x0000006C */ 0x00000000, //   Arg[2]
    
    /* 0x00000070 */ 0x5853590D, // Function Execute
    /* 0x00000074 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000078 */ 0x00000001, //   Arg[0]
    /* 0x0000007C */ 0x00000000, //   Arg[1]
    /* 0x00000080 */ 0x00000000, //   Arg[2]
    
    /* 0x00000084 */ 0x5853590D, // Function Execute
    /* 0x00000088 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x0000008C */ 0x00000002, //   Arg[0]
    /* 0x00000090 */ 0xFFFFFFF0, //   Arg[1]
    /* 0x00000094 */ 0x88888880, //   Arg[2]
    
    /* 0x00000098 */ 0x5853590D, // Function Execute
    /* 0x0000009C */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000000A0 */ 0x00000003, //   Arg[0]
    /* 0x000000A4 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x000000A8 */ 0x88888888, //   Arg[2]
    
    /* 0x000000AC */ 0x5853590D, // Function Execute
    /* 0x000000B0 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000000B4 */ 0x00000004, //   Arg[0]
    /* 0x000000B8 */ 0x0FFFFFFF, //   Arg[1]
    /* 0x000000BC */ 0x08442288, //   Arg[2]
    
    /* 0x000000C0 */ 0x5853590D, // Function Execute
    /* 0x000000C4 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000000C8 */ 0x00000005, //   Arg[0]
    /* 0x000000CC */ 0xFFFF0FFF, //   Arg[1]
    /* 0x000000D0 */ 0x11110118, //   Arg[2]
    
    /* 0x000000D4 */ 0x5853590D, // Function Execute
    /* 0x000000D8 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000000DC */ 0x00000006, //   Arg[0]
    /* 0x000000E0 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x000000E4 */ 0x11111111, //   Arg[2]
    
    /* 0x000000E8 */ 0x5853590D, // Function Execute
    /* 0x000000EC */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000000F0 */ 0x00000007, //   Arg[0]
    /* 0x000000F4 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x000000F8 */ 0x11111111, //   Arg[2]
    
    /* 0x000000FC */ 0x5853590D, // Function Execute
    /* 0x00000100 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000104 */ 0x00000008, //   Arg[0]
    /* 0x00000108 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x0000010C */ 0x11111111, //   Arg[2]
    
    /* 0x00000110 */ 0x5853590D, // Function Execute
    /* 0x00000114 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000118 */ 0x00000009, //   Arg[0]
    /* 0x0000011C */ 0xFFFFFFFF, //   Arg[1]
    /* 0x00000120 */ 0x11111111, //   Arg[2]
    
    /* 0x00000124 */ 0x5853590D, // Function Execute
    /* 0x00000128 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x0000012C */ 0x0000000A, //   Arg[0]
    /* 0x00000130 */ 0xFFFFFFF0, //   Arg[1]
    /* 0x00000134 */ 0x11111110, //   Arg[2]
    
    /* 0x00000138 */ 0x5853590D, // Function Execute
    /* 0x0000013C */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000140 */ 0x0000000B, //   Arg[0]
    /* 0x00000144 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x00000148 */ 0x11111111, //   Arg[2]
    
    /* 0x0000014C */ 0x5853590D, // Function Execute
    /* 0x00000150 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000154 */ 0x0000000C, //   Arg[0]
    /* 0x00000158 */ 0xFFFFFFFF, //   Arg[1]
    /* 0x0000015C */ 0x11111111, //   Arg[2]
    
    /* 0x00000160 */ 0x5853590D, // Function Execute
    /* 0x00000164 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000168 */ 0x0000000D, //   Arg[0]
    /* 0x0000016C */ 0x0000FFF0, //   Arg[1]
    /* 0x00000170 */ 0x00008880, //   Arg[2]
    
    /* 0x00000174 */ 0x5853590D, // Function Execute
    /* 0x00000178 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x0000017C */ 0x0000000E, //   Arg[0]
    /* 0x00000180 */ 0x00000000, //   Arg[1]
    /* 0x00000184 */ 0x00000000, //   Arg[2]
    
    /* 0x00000188 */ 0x5853590D, // Function Execute
    /* 0x0000018C */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x00000190 */ 0x0000000F, //   Arg[0]
    /* 0x00000194 */ 0x00000F00, //   Arg[1]
    /* 0x00000198 */ 0x00000200, //   Arg[2]
    
    /* 0x0000019C */ 0x5853590D, // Function Execute
    /* 0x000001A0 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000001A4 */ 0x00000010, //   Arg[0]
    /* 0x000001A8 */ 0x00000000, //   Arg[1]
    /* 0x000001AC */ 0x00000000, //   Arg[2]
    
    /* 0x000001B0 */ 0x5853590D, // Function Execute
    /* 0x000001B4 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000001B8 */ 0x00000011, //   Arg[0]
    /* 0x000001BC */ 0x000000F0, //   Arg[1]
    /* 0x000001C0 */ 0x00000080, //   Arg[2]
    
    /* 0x000001C4 */ 0x5853590D, // Function Execute
    /* 0x000001C8 */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000001CC */ 0x00000012, //   Arg[0]
    /* 0x000001D0 */ 0xFF0FFF00, //   Arg[1]
    /* 0x000001D4 */ 0x11022200, //   Arg[2]
    
    /* 0x000001D8 */ 0x5853590D, // Function Execute
    /* 0x000001DC */ 0x00030008, //   Function[8] FASTBOOT
    /* 0x000001E0 */ 0x00000013, //   Arg[0]
    /* 0x000001E4 */ 0x00FFFFFF, //   Arg[1]
    /* 0x000001E8 */ 0x00822211, //   Arg[2]
    
    /* 0x000001EC */ 0x58535901, // Section Load
    /* 0x000001F0 */ 0x11804000, //   Address (DSP L2 RAM, Global)
    /* 0x000001F4 */ 0x00000200, //   Size
    /* 0x000001F8 */             //   Data
    /* 0x000001F8 */ 0x003C30F6,
    ...
    /* 0x000003F4 */ 0xE4000000,
    
    /* 0x000003F8 */ 0x58535901, // Section Load
    /* 0x000003FC */ 0x11804200, //   Address (DSP L2 RAM, Global)
    /* 0x00000400 */ 0x00017440, //   Size
    /* 0x00000404 */             //   Data
    ..........................
    /* 0x0001783C */ 0x00000000,
    /* 0x00017840 */ 0xE4400000,
    
    /* 0x00017844 */ 0x58535901, // Section Load
    /* 0x00017848 */ 0x1181C818, //   Address (DSP L2 RAM, Global)
    /* 0x0001784C */ 0x00000144, //   Size
    /* 0x00017850 */             //   Data
    ..........................
    /* 0x00017990 */ 0x11811224,
    
    /* 0x00017994 */ 0x58535901, // Section Load
    /* 0x00017998 */ 0x1181C95C, //   Address (DSP L2 RAM, Global)
    /* 0x0001799C */ 0x00000150, //   Size
    /* 0x000179A0 */             //   Data
    ..........................
    /* 0x00017AEC */ 0x1181B640,
    
    /* 0x00017AF0 */ 0x58535901, // Section Load
    /* 0x00017AF4 */ 0x80004000, //   Address (L3 CBA RAM)
    /* 0x00017AF8 */ 0x00000630, //   Size
    /* 0x00017AFC */             //   Data
    /* 0x00017AFC */ 0x6D726554,
    ..........................
    /* 0x00018128 */ 0x00000000,
    
    /* 0x0001812C */ 0x58535906, // Jump N Close
    /* 0x00018130 */ 0x11819220, //   Address (DSP L2 RAM, Global)
    
    };
    


     

  • Hi again,

    Thanks for your valuable inputs. After deeper analysis, we have found the culprit as unexpected performance of fread function, which returns prematurely before completing binary file. Bootloader seems to work fine. :)

    Thanks again for your time and consideration.
  • Dear Alp Nail,
    Sounds good.
    Thanks for your update.