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.

[DM365] How to flash ubl+uboot to IPNC from Serial

HI all,

   I try to use "ubl_297arm_270ddr_ipnc_dm365_1.0.0.bin" & "u-boot-1.3.4_ipnc_dm365_1.0.0.bin" to flash IPNC. But the IPNC board can't work.
   I do from this web http://processors.wiki.ti.com/index.php/SD_card_boot_and_flashing_tool_for_DM355_and_DM365
   I copy the log message here.

-----------------------------------------------------
   TI Serial Flasher Host Program for DM36x
   (C) 2009, Texas Instruments, Inc.
   Ver. 1.50
-----------------------------------------------------


Platform is Windows.
Flashing NAND with ubl_297arm_270ddr_ipnc_dm365_1.0.0.bin and u-boot-1.3.4_ipnc_
dm365_1.0.0.bin.


Attempting to connect to device COM1...
Press any key to end this program at any time.


Waiting for the DM36x...
BOOTME commmand received. Returning ACK and header...
ACK command sent. Waiting for BEGIN command...
        Target:   BEGIN
BEGIN commmand received. Sending CRC table...
 100% [                                                              ]
                           CRC table sent....

 

Waiting for DONE...
DONE received.  Sending the UBL...
 100% [                                                              ]
                              UBL sent....


DONE received.  UBL was accepted.
UBL transmitted successfully.


Waiting for SFT on the DM36x...
        Target: Starting UART Boot...
        Target: BOOTUBL
BOOTUBL commmand received. Returning CMD and command...
CMD value sent.  Waiting for DONE...
        Target:    DONE
DONE received. Command was accepted.
Sending the UBL image
Waiting for SENDIMG sequence...
SENDIMG received. Returning ACK and header for image data...
ACK command sent. Waiting for BEGIN command...
BEGIN commmand received.
 100% [                                                              ]
                           Image data sent...


Waiting for DONE...
DONE received.  All bytes of image data received...
        Target: Writing UBL to NAND flash
        Target: Unprotecting blocks 0x00000001 through 0x00000018.
        Target: Number of blocks needed for header and data: 0x0x00000001
        Target: Attempting to start in block number 0x0x00000001.
        Target: Erasing block 0x00000001 through 0x00000001.
        Target: Writing header and image data to Block 0x00000001, Page 0x000000
00
        Target: Erasing block 0x00000002 through 0x00000002.
        Target: Writing header and image data to Block 0x00000002, Page 0x000000
00
        Target: Erasing block 0x00000003 through 0x00000003.
        Target: Writing header and image data to Block 0x00000003, Page 0x000000
00
        Target: Erasing block 0x00000004 through 0x00000004.
        Target: Writing header and image data to Block 0x00000004, Page 0x000000
00
        Target: Erasing block 0x00000005 through 0x00000005.
        Target: Writing header and image data to Block 0x00000005, Page 0x000000
00
        Target: Erasing block 0x00000006 through 0x00000006.
        Target: Writing header and image data to Block 0x00000006, Page 0x000000
00
        Target: Erasing block 0x00000007 through 0x00000007.
        Target: Writing header and image data to Block 0x00000007, Page 0x000000
00
        Target: Erasing block 0x00000008 through 0x00000008.
        Target: Writing header and image data to Block 0x00000008, Page 0x000000
00
        Target: Erasing block 0x00000009 through 0x00000009.
        Target: Writing header and image data to Block 0x00000009, Page 0x000000
00
        Target: Erasing block 0x0000000A through 0x0000000A.
        Target: Writing header and image data to Block 0x0000000A, Page 0x000000
00
        Target: Erasing block 0x0000000B through 0x0000000B.
        Target: Writing header and image data to Block 0x0000000B, Page 0x000000
00
        Target: Erasing block 0x0000000C through 0x0000000C.
        Target: Writing header and image data to Block 0x0000000C, Page 0x000000
00
        Target: Erasing block 0x0000000D through 0x0000000D.
        Target: Writing header and image data to Block 0x0000000D, Page 0x000000
00
        Target: Erasing block 0x0000000E through 0x0000000E.
        Target: Writing header and image data to Block 0x0000000E, Page 0x000000
00
        Target: Erasing block 0x0000000F through 0x0000000F.
        Target: Writing header and image data to Block 0x0000000F, Page 0x000000
00
        Target: Erasing block 0x00000010 through 0x00000010.
        Target: Writing header and image data to Block 0x00000010, Page 0x000000
00
        Target: Erasing block 0x00000011 through 0x00000011.
        Target: Writing header and image data to Block 0x00000011, Page 0x000000
00
        Target: Erasing block 0x00000012 through 0x00000012.
        Target: Writing header and image data to Block 0x00000012, Page 0x000000
00
        Target: Erasing block 0x00000013 through 0x00000013.
        Target: Writing header and image data to Block 0x00000013, Page 0x000000
00
        Target: Erasing block 0x00000014 through 0x00000014.
        Target: Writing header and image data to Block 0x00000014, Page 0x000000
00
        Target: Erasing block 0x00000015 through 0x00000015.
        Target: Writing header and image data to Block 0x00000015, Page 0x000000
00
        Target: Erasing block 0x00000016 through 0x00000016.
        Target: Writing header and image data to Block 0x00000016, Page 0x000000
00
        Target: Erasing block 0x00000017 through 0x00000017.
        Target: Writing header and image data to Block 0x00000017, Page 0x000000
00
        Target: Erasing block 0x00000018 through 0x00000018.
        Target: Writing header and image data to Block 0x00000018, Page 0x000000
00
        Target: Protecting the entire NAND flash.
        Target:    DONE
Sending the Application image
Waiting for SENDIMG sequence...
SENDIMG received. Returning ACK and header for image data...
ACK command sent. Waiting for BEGIN command...
BEGIN commmand received.
 100% [                                                              ]
                           Image data sent...


Waiting for DONE...
DONE received.  All bytes of image data received...
        Target: Writing APP to NAND flash
        Target: Unprotecting blocks 0x00000019 through 0x00000032.
        Target: Number of blocks needed for header and data: 0x0x00000002
        Target: Attempting to start in block number 0x0x00000019.
        Target: Erasing block 0x00000019 through 0x0000001A.
        Target: Writing header and image data to Block 0x00000019, Page 0x000000
00
        Target: Erasing block 0x0000001B through 0x0000001C.
        Target: Writing header and image data to Block 0x0000001B, Page 0x000000
00
        Target: Erasing block 0x0000001D through 0x0000001E.
        Target: Writing header and image data to Block 0x0000001D, Page 0x000000
00
        Target: Erasing block 0x0000001F through 0x00000020.
        Target: Writing header and image data to Block 0x0000001F, Page 0x000000
00
        Target: Erasing block 0x00000021 through 0x00000022.
        Target: Writing header and image data to Block 0x00000021, Page 0x000000
00
        Target: Erasing block 0x00000023 through 0x00000024.
        Target: Writing header and image data to Block 0x00000023, Page 0x000000
00
        Target: Erasing block 0x00000025 through 0x00000026.
        Target: Writing header and image data to Block 0x00000025, Page 0x000000
00
        Target: Erasing block 0x00000027 through 0x00000028.
        Target: Writing header and image data to Block 0x00000027, Page 0x000000
00
        Target: Erasing block 0x00000029 through 0x0000002A.
        Target: Writing header and image data to Block 0x00000029, Page 0x000000
00
        Target: Erasing block 0x0000002B through 0x0000002C.
        Target: Writing header and image data to Block 0x0000002B, Page 0x000000
00
        Target: Erasing block 0x0000002D through 0x0000002E.
        Target: Writing header and image data to Block 0x0000002D, Page 0x000000
00
        Target: Erasing block 0x0000002F through 0x00000030.
        Target: Writing header and image data to Block 0x0000002F, Page 0x000000
00
        Target: Erasing block 0x00000031 through 0x00000032.
        Target: Writing header and image data to Block 0x00000031, Page 0x000000
00
        Target: Protecting the entire NAND flash.
        Target:    DONE
        Target:    DONE

Operation completed successfully.

Can someone give me some suggestions?

Thanks

  • I don't see any error in this output. Where your get ubl and u-boot?

  • HI Kirill

      Thanks for your quick reply.

      I got it from appro.

    BR
       Terry K.G

  • Hello, Terry!

    I use this ubl for my DM365 board, I think it solve you problem.

    6278.ubl.zip

  • Hello Terry,

    What happens after the serial programming is done? Do you see any logs on the terminal?

    I believe you are trying this on IPNC hardware. How did you put the IPNC to boot in UART boot mode?

    Regards,

    Anshuman

  • HI Kirill,

       I try your ubl + u-boot-1.3.4_ipnc_dm365_1.0.0.bin. But it fail yet. Now there is some log for UBL from debug port, after I flash it, and change to boot from Nand Flash.

    Here is my log message.
    M36x initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000019.
       DONE
    Jumping to entry point at 0x81080000.

     Need I add a new block or address when call the command sfh_DM36x.exe. 
     My command was "sfh_DM36x.exe -nandflash ubl_DM36x_nand.bin  u-boot-1.3.4_ipnc_dm365_1.0.0.bin"

    BR
         Terry K.G

  • Hi  Anshuman,

     This Post is for your quession "How did you put the IPNC to boot in UART boot mode?"

     1. On TI's EVM board, I found that  BITSEL0=1, BITSEL1=1.

    S4:1 (BITSEL2) S4:2 (BITSEL1) S4:3 (BITSEL0) S4:4 (AECFG2) S4:5 (AECFG1) S4:6 (AECFG0)
    OFF ON ON OFF OFF OFF

    2. I look over the SCH file from Appro. That means that it will boot from serial when do as following:
       A.  Connect R63, disconnect R65
       B. Connect R66, disconnect R68.


     C. If you now connect to a serial port viewer yet, you will see there is a string "BOOTME".-----In fact, It need't this step.

    BR
        Terry K.G

  • Did you modify the resistors again to bring IPNC back to NAND boot mode?

    Regards,

    Anshuman

  • HI Anshuman,

      Yes. I use those 2 old resistors again & disconnect R63 and R66, when booting from Nand Flash.

    BR
        Terry K.G

  • Terry K.G said:

    HI Kirill,

       I try your ubl + u-boot-1.3.4_ipnc_dm365_1.0.0.bin. But it fail yet. Now there is some log for UBL from debug port, after I flash it, and change to boot from Nand Flash.

    Here is my log message.
    M36x initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000019.
       DONE
    Jumping to entry point at 0x81080000.

    Terry, this is a very strange. My output is equal.
    TI UBL Version: 1.50                                                                                                                                                                                               
    Booting Catalog Boot Loader                                                                                                                                                                                        
    BootMode = NAND                                                                                                                                                                                                    
    Starting NAND Copy...                                                                                                                                                                                              
    Valid magicnum, 0xA1ACED66, found in block 0x00000019.                                                                                                                                                             
       DONE                                                                                                                                                                                                            
    Jumping to entry point at 0x81080000.                                                                                                                                                                              
                                                                                                                                                                                                                       
                                                                                                                                                                                                                       
    U-Boot 1.3.4-dirty (Dec  2 2010 - 14:29:44)                                                                                                                                                                        
                                                                                                                                                                                                                       
    I2C:   ready                                                                                                                                                                                                       
    DRAM:  128 MB                                                                                                                                                                                                      
    NAND:  NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit)                                                                                                                          
    Bad block table found at page 131040, version 0x00                                                                                                                                                                 
    Bad block table found at page 131008, version 0x00                                                                                                                                                                 
    NAND device: Manufacturer ID: 0x20, Chip ID: 0x36 (ST Micro NAND 64MiB 1,8V 8-bit)                                                                                                                                 
    Bad block table found at page 131040, version 0x00                                                                                                                                                                 
    Bad block table found at page 131008, version 0x00                                                                                                                                                                 
    128 MiB                                                                                                                                                                                                            
    In:    serial                                                                                                                                                                                                      
    Out:   serial                                                                                                                                                                                                      
    Err:   serial 
                                                                                                                                                                                                                       
    EEPROM @ 0x50 read FAILED!!!                                                                                                                                                                                       
    Ethernet PHY: RTL8201 @ 0x03                                                                                                                                                                                       
    Hit any key to stop autoboot:  0                                                                                                                                                                                   
    DM365 EVM :>

    Try this u-boot 6303.uboot.zip

     

     

  • HI Kirill,

       Thanks for your quick reply at first.

       The IPNC board can run after flashing your ubl + uboot from serial port.

      But my board was IPNC-DM365 board and your ubl & uboot was for EVM board.  Is it OK to let IPNC board to run EVM board's ubl + uboot?

      And there is no effect to load the following kernel + fils system for IPNC-DM365?

      Here are the log.

    M36x initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000019.
       DONE
    Jumping to entry point at 0x81080000.


    U-Boot 1.3.4-dirty (Dec  2 2010 - 14:29:44)

    I2C:   ready
    DRAM:  128 MB
    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
    Bad block table found at page 65472, version 0x01
    Bad block table found at page 65408, version 0x01
    No NAND device found!!!
    128 MiB
    *** Warning - bad CRC or NAND, using default environment

    In:    serial
    Out:   serial
    Err:   serial
    Ethernet PHY: GENERIC @ 0x00
    Hit any key to stop autoboot:  0
    DM365 EVM :>

    BR
        Terry K.G

  • Terry K.G said:

      But my board was IPNC-DM365 board and your ubl & uboot was for EVM board.  Is it OK to let IPNC board to run EVM board's ubl + uboot?

    Hello, Terry!

    I don't think whereas is a problem. Also I don't see config for IPNC in U-Boot source, you can see it in include/configs. I have this:
    $ ls include/configs/davinci_*
    include/configs/davinci_dm355_evm.h   include/configs/davinci_dvevm.h
    include/configs/davinci_dm357.h       include/configs/davinci_schmoogie.h
    include/configs/davinci_dm365_evm.h   include/configs/davinci_sffsdr.h
    include/configs/davinci_dm6467_evm.h  include/configs/davinci_sonata.h

    Terry K.G said:

      And there is no effect to load the following kernel + fils system for IPNC-DM365?

    Can you post output printenv command?

     

  • HI Kirill

    Here I post printenv command:

    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000019.
       DONE
    Jumping to entry point at 0x81080000.


    U-Boot 1.3.4 (May 22 2009 - 11:25:39)

    I2C:   ready
    DRAM:  128 MB
    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
    Bad block table found at page 65472, version 0x01
    Bad block table found at page 65408, version 0x01
    NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
    Bad block table found at page 65472, version 0x01
    Bad block table found at page 65408, version 0x01
    256 MiB
    In:    serial
    Out:   serial
    Err:   serial

    EEPROM @ 0x50 read FAILED!!!
    Ethernet PHY: GENERIC @ 0x01
    Hit any key to stop autoboot:  0
    DM365 EVM :>printenv
    baudrate=115200
    bootfile="uImage"
    bootdelay=4
    ethaddr=00:0e:99:02:50:18
    gateway=192.168.1.1
    nfshost=192.168.1.110
    filesize=C3C000
    fileaddr=82000000
    netmask=255.255.255.0
    ipaddr=192.168.1.222
    serverip=192.168.1.119
    bootargs=mem=46M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,14M ip=dhcp
    bootcmd=nand read 0x82000000 0x700000 0xD00000
    ;nboot 0x80700000 0 0x500000;bootm 0x80700000
    stdin=serial
    stdout=serial
    stderr=serial
    ver=U-Boot 1.3.4 (May 22 2009 - 11:25:39)

    Environment size: 477/262140 bytes

    BR
        Terry K.G

  • Terry K.G said:

    bootargs=mem=46M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,14M ip=dhcp
    bootcmd=nand read 0x82000000 0x700000 0xD00000
    ;nboot 0x80700000 0 0x500000;bootm 0x80700000

    Terry, I think you have error therein. In Users_Guide_IPNC_DM36x.pdf Release Version: 2.0.0 July 2010  p. 2-11 (29) I see another addresses for DM365 - 0x400000 for system and 0x200000 for kernel. I think you swap values for DM365 and DM368, please check this.

  • HI Kirill

     You are right. I make a mistake. It shall be :
    setenv bootargs mem=46M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,14M ip=dhcp
    setenv bootcmd 'nand read 0x82000000 0x400000 0xD00000;nboot 0x80700000 0 0x200000;bootm 0x80700000'

     I compiled the uboot source code came from Appro. I found it is a very strange.
     I use serial flash tool to flash them to nand flash,and their ubl both are your attached file 6278.ubl.zip .

     If I set configuration as dm365_evm, and compile, the uboot-evm can be running on IPNC board. 
     If I set configuration as dm365_ipnc, and compile, the uboot-ipnc run fail without any message from debug port.


    BR
        Terry K.G