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.

how to download OMAP L137 uboot?

Other Parts Discussed in Thread: OMAP-L137

Hi,

     I have SEED-OMAP L137 board , and the omap L137 's ROM ID is D800K001,it boot from 8bits nandflash.Now, I designed a new board ,It's ROM ID is D800K003, I download Aisgen for D800K003,but the board doesn't work,there is no message from UART2. My new board pass all the test under CCS3.3(NAND,SDRAM etc).Could somebody tell me , why?Is there anything new about D800K003? Hardware has no error.

  • Hi Shuai

    Can you make sure that you uncheck the PINMUX/PSC boxes when using Aisgen with D800K003.

    Please see if the discussion in the following thread helps some (look for Urmil's responses)

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/31904/187298.aspx#187298

    Regards

    Mukul

     

  • Mukul Bhatnagar said:

    Hi Shuai

    Can you make sure that you uncheck the PINMUX/PSC boxes when using Aisgen with D800K003.

    Please see if the discussion in the following thread helps some (look for Urmil's responses)

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/p/31904/187298.aspx#187298

    Regards

    Mukul

     

    yes,I uncheck , but it doesn't work either.

  • The new D800K003 ROM changes the baud rate for boot from 230.4 Kbaud (assuming 24 MHz clock input) to 115.2 kBaud.  The original baud rate (of the K001 ROM) was not the intended baud rate and was considered a bug that was corrected in the K003 ROM.  If this information doesn't help,please let us know.

    Regards, Daniel

  • My boot mode is 8 NANDFlash , not the UART2, so I think 230.4 Kbaud to 115.2kBaud doesn't matter.

    I download uboot to SEED-OMAPL137(ROM ID is D800K001) like this(refer to the seed Manual);

    1.compile uboot , get u-boot.bin under linux.

    2.use raw2coff under AisGEN for D800K001 to convert u-boot.bin. command line is: raw2coff u-boot.out 0xc10800000 u-boot.bin

    3. then,open AISgen for D800K001,conver .out to .bin

    4.Last, open nandwriter ,download the uboot.

    5.power on the board again, uart2 send start message.

     the following codes are part of SEED board 's nandwriter .

    static Uint32 nandwriter()
    {
      Uint32 numPagesUBL;

      NANDWRITER_Boot  gNandBoot;
      NAND_InfoHandle  hNandInfo;

      FILE  *fPtr;
      Uint8  *ublPtr;
      Int32  ublFileSize = 0,ublAllocSize = 0;
      Int8  fileName[256];
      Int32 i=0;
      Int32  uiHeaderLen = 0;//sizeof(NANDWRITER_Boot);

      printf( "Starting OMAPL137 NANDWriter.\r\n" );
     // Initialize NAND Flash
      hNandInfo = NAND_open((Uint32)&NANDStart);
     // hNandInfo = NAND_open(0x62000000);
     
      if (hNandInfo == NULL)
      {
        DEBUG_printString( "\tERROR: NAND Initialization failed.\r\n" );
        return E_FAIL;
      }
       // Read the file from host
     fwrite("Enter the AIS binary file Name",1,sizeof("Enter the AIS binary file Name"),stdout);
     
     fflush(stdout);
     scanf("%s", fileName);
     fflush(stdin);
     
      if (strcmp(fileName,"none") != 0)
      {
       // Open an File from the hard drive
       fPtr = fopen(fileName, "rb");
       if(fPtr == NULL)
       {
          DEBUG_printString("\tERROR: File ");
          DEBUG_printString(fileName);
          DEBUG_printString(" open failed.\r\n");
          return E_FAIL;
        }

        // Read file size
        fseek(fPtr,0,SEEK_END);
     //happydog
        ublFileSize = ftell(fPtr);

        if(ublFileSize == 0)
        {
          DEBUG_printString("\tERROR: File read failed.. Closing program.\r\n");
          fclose (fPtr);
          return E_FAIL;
        }

     ublFileSize += uiHeaderLen;

        numPagesUBL = 0;
        while ( (numPagesUBL * hNandInfo->dataBytesPerPage)  < ublFileSize )
        {
          numPagesUBL++;
        }

        //We want to allocate an even number of pages.
        ublAllocSize = numPagesUBL * hNandInfo->dataBytesPerPage;

        // Setup pointer in RAM
        ublPtr = (Uint8 *) UTIL_allocMem(ublAllocSize);
     if(ublPtr == NULL) {
      DEBUG_printString("\tERROR: Unable to allocate memory sized %d bytes for file read\n", ublAllocSize);
      return E_FAIL;
     }

        for (i=0; i<ublAllocSize; i++)
          ublPtr[i]=0x00;

        fseek(fPtr,0,SEEK_SET);

        if ((ublFileSize-uiHeaderLen) != fread(ublPtr + uiHeaderLen, 1, ublFileSize-uiHeaderLen, fPtr))
        {
          DEBUG_printString("\tWARNING: File Size mismatch.\r\n");
        }

        fclose (fPtr);

        gNandBoot.magicNum    = UBL_MAGIC_SAFE;
        gNandBoot.block       = DEVICE_NAND_RBL_SEARCH_START_BLOCK;
        gNandBoot.page        = 0;
        gNandBoot.numPage     = numPagesUBL;
        gNandBoot.entryPoint  = 0x800066c0;       // This fixed entry point will work with the UBLs
        gNandBoot.ldAddress   = 0;            // This doesn't matter for the UBL
     
     memcpy(ublPtr,(void*)&gNandBoot,uiHeaderLen);
        if (LOCAL_writeHeaderAndData(hNandInfo,&gNandBoot,ublPtr) != E_PASS)
        {
          printf("\tERROR: Write failed.\r\n");
          return E_FAIL;
        }
      }
     
      return E_PASS;
    }

     now my board's omapl137,its ROM ID is D800K003, How will I do?By the way ,I saw many documents said that , flash dspubl,armubl and uboot, but the SEED omapL137 only flash the uboot, is it OK?

  • Hi Shuai

    From your email it seems like you have a custom board and you are comparing its behavior with SEED OMAPL137 board, is that correct? The difference that you are concerned about between the 2 boards is rom revision , correct? I believe that apart from the 2 changes that we mentioned above there shouldn't be something drastically different impacting your boot behavior for device with ROM ID D800K003. Our team is also not familiar with the SEED boards.

    Although you have simple tests working, is there a possibility of trying a simpler boot test, rather then trying to flash uboot etc? That should help isolate, if you have a board problem w.r.t to booting/flashing  the device.

    Are there any differences in the NAND used on the SEED board vs your board?

    If possible, when your device fails to show any activity on the hyperterminal, can you try to connect to CCS and provide a print out of the debug gel file

    http://processors.wiki.ti.com/index.php/OMAP-L1x_Debug_Gel_Files

     

    Regards

    Mukul

  • Thank you for your reply,

    YEs,you are right.And the NAND is same.I designed my board according to SEED board.

    NAND read page failed???What mean? I think there are no codes in nandflash。
    ---------------------------------------------
    |             Device Information            |
    ---------------------------------------------
    DEV_INFO_00 = 0x9B7DF02F
    DEV_INFO_01 = 0x00000000
    DEV_INFO_02 = 0x0000FB7F
    DEV_INFO_03 = 0x00000022
    DEV_INFO_04 = 0x00000000
    DEV_INFO_05 = 0x000003E0
    DEV_INFO_06 = 0x00000000
    DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 8-0-62617-7-28-41
    DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 0,1,0,15829
    -----
    DEV_INFO_17 = 0x00030003
    DEV_INFO_18 = 0x00000000
    DEV_INFO_19 = 00000
    -----
    DEV_INFO_20 = 0x30303864
    DEV_INFO_21 = 0x3330306B
    DEV_INFO_22 = 0x00000000
    DEV_INFO_23 = 0x00000000
    -----
    DEV_INFO_24 = 0x0702901C
    DEV_INFO_25 = 0x0800F499
    DEV_INFO_06 = 0x00000000
    DEV_INFO_26 = 0x7BAA0020


    ---------------------------------------------
    |               BOOTROM Info                |
    ---------------------------------------------
    ROM ID: d800k003
    Silicon Revision 2.0
    Boot Mode: NAND 8

    ROM Status Code: 0x0000001A
    Description: NAND read page failed

    Program Counter (PC) = 0x00712144

  • 1. get u-boot.bin from linux.

    2.run raw2coff conver u-boot.bin to u-boot.out。raw2coff u-boot.out 0xc10800000 u-boot.bin

    3.run HexAIS_OMAP-L137 conver u-boot.out to uboot.bin 。hexais_omap-L137 -otype binary -o uboot.bin u-boot.out.

    ini file is

    [General]
    BootMode = NAND
    busWidth = 8
    crcCheckType = NO_CRC

    [PLLCONFIG]
    PLLCFG0 = 0x18010202
    PLLCFG1 = 0x000501B9

    ; CE2CFG
    [AIS_Set]
    TYPE    = INT
    ADDRESS = 0x68000010
    DATA    = 0x3FFFFFFC
    SLEEP   = 0

    [EMIF3SDRAM]
    SDCR    = 0x00018421
    SDTIMR  = 0x0E9129C8
    SDTIMR2 = 0x78080005
    SDRCR   = 0x000003FC

    [PSCCONFIG]
    LPSCCFG = 0x00000003

    [PSCCONFIG]
    LPSCCFG = 0x00010003

    [PSCCONFIG]
    LPSCCFG = 0x00020003

    [PSCCONFIG]
    LPSCCFG = 0x00030003

    [PSCCONFIG]
    LPSCCFG = 0x00040003

    [PSCCONFIG]
    LPSCCFG = 0x00050003

    [PSCCONFIG]
    LPSCCFG = 0x00060003

    [PSCCONFIG]
    LPSCCFG = 0x00080003

    [PSCCONFIG]
    LPSCCFG = 0x00090003

    [PSCCONFIG]
    LPSCCFG = 0x000A0003

    [PSCCONFIG]
    LPSCCFG = 0x000B0003

    [PSCCONFIG]
    LPSCCFG = 0x000C0003

    [PSCCONFIG]
    LPSCCFG = 0x000D0003

    [PSCCONFIG]
    LPSCCFG = 0x01010003

    [PSCCONFIG]
    LPSCCFG = 0x01020003

    [PSCCONFIG]
    LPSCCFG = 0x01030003

    [PSCCONFIG]
    LPSCCFG = 0x01040003

    [PSCCONFIG]
    LPSCCFG = 0x01050003

    [PSCCONFIG]
    LPSCCFG = 0x01060003

    [PSCCONFIG]
    LPSCCFG = 0x01070003

    [PSCCONFIG]
    LPSCCFG = 0x01080003

    [PSCCONFIG]
    LPSCCFG = 0x01090003

    [PSCCONFIG]
    LPSCCFG = 0x010A0003

    [PSCCONFIG]
    LPSCCFG = 0x010B0003

    [PSCCONFIG]
    LPSCCFG = 0x010C0003

    [PSCCONFIG]
    LPSCCFG = 0x010D0003

    [PSCCONFIG]
    LPSCCFG = 0x01100003

    [PSCCONFIG]
    LPSCCFG = 0x01110003

    [PSCCONFIG]
    LPSCCFG = 0x01140003

    [PSCCONFIG]
    LPSCCFG = 0x01150003

    [PSCCONFIG]
    LPSCCFG = 0x01180003

    [PSCCONFIG]
    LPSCCFG = 0x01190003

    [PSCCONFIG]
    LPSCCFG = 0x011A0003

    [PSCCONFIG]
    LPSCCFG = 0x011F0003

    then I RUN DEBUG,Nand is ok,but when i boot from nand, there is no effect.---------------------------------------------
    |             Device Information            |
    ---------------------------------------------
    DEV_INFO_00 = 0x9B7DF02F
    DEV_INFO_01 = 0x00000000
    DEV_INFO_02 = 0x0000F37F
    DEV_INFO_03 = 0x00000022
    DEV_INFO_04 = 0x00000000
    DEV_INFO_05 = 0x000003E0
    DEV_INFO_06 = 0x00000000
    DEV_INFO_07-DEV_INFO_08-DEV_INFO_09-DEV_INFO_10-DEV_INFO_11-DEV_INFO_12 = 8-0-62617-7-28-41
    DEV_INFO_13,DEV_INFO_14,DEV_INFO_15,DEV_INFO_16 = 0,1,0,15829
    -----
    DEV_INFO_17 = 0x00030003
    DEV_INFO_18 = 0x00000000
    DEV_INFO_19 = 00000
    -----
    DEV_INFO_20 = 0x30303864
    DEV_INFO_21 = 0x3330306B
    DEV_INFO_22 = 0x00000000
    DEV_INFO_23 = 0x00000000
    -----
    DEV_INFO_24 = 0x0702901C
    DEV_INFO_25 = 0x0800F499
    DEV_INFO_06 = 0x00000000
    DEV_INFO_26 = 0x7BAA0020

     


    ---------------------------------------------
    |               BOOTROM Info                |
    ---------------------------------------------
    ROM ID: d800k003
    Silicon Revision 2.0
    Boot Mode: NAND 8

    ROM Status Code: 0x00000000
    Description: No error

    Program Counter (PC) = 0xC0F1EFFC

  • Shuai Zhu said:

    ---------------------------------------------
    |               BOOTROM Info                |
    ---------------------------------------------
    ROM ID: d800k003
    Silicon Revision 2.0
    Boot Mode: NAND 8

    ROM Status Code: 0x00000000
    Description: No error

    Program Counter (PC) = 0xC0F1EFFC

    This indicates that your device did boot past the ROM boot loader.  It now appears to be executing somewhere in the u-boot code. 

    Also, note that if you use the latest AISGen program for D800K003, you do not need to run the raw2coff program.  The AIS generator can take binary files directly.  It can also take u-boot ELF executable (usually just a file called u-boot) and parse it directly as well.

    In any case, your primary boot procedure passed but we cannot tell you why your u-boot for your custom platform is not outputting what you expect.

    Regards, Daniel

  • hi,have you resolved the problem?  I met the same question.

  • Hi ! I met the same problem!

  • "Also, note that if you use the latest AISGen program for D800K003, you do not need to run the raw2coff program. The AIS generator can take binary files directly. It can also take u-boot ELF executable (usually just a file called u-boot) and parse it directly as well."

     

    The AISgen couldn't take bin files directly, only ".out" .

  • Binary files require a load address to be specified with the file name, since binary files only contain the data to be loaded and no information about where it is to be loaded to.  You do this by using the following syntax:

    <filename>@<load address>

    For example:

    HexAIS_OMAP-L137.exe -otype binary -o u-boot.ais u-boot.bin@0xC1080000

     

    Regards, Daniel