NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

DM6467 EVM Installation

From Texas Instruments Wiki
Jump to: navigation, search

Build Instructions

UBL[edit]

Getting the Source[edit]

  * Download the 'flash_utils.tar.gz' archive from here.
  * Extract the archive. UBL source is present inside 'flash_utils' directory. 
  * The directories of particular interest are: 'src' - source code, 'include' - include files and 'build' - 
    contains CCS project and configuration files.

Prerequisites[edit]

  * Windows XP host with CCS v 3.3 installed
  * Perl is also required for building UBL binary (recommended version 5.10).

Steps for Building UBL[edit]

  * Open the UBL project in CCS by clicking 'Project->Open' in CCS and selecting the project file 'ubldavinci.pjt' 
    inside 'build' directory.
  * By default, the UBL build is configured for DM6467 @ 594MHz. To build UBL for DM6467T (alpha EVM), open 
    file 'ublconfig.cfg' present inside 'build' directory and uncomment the line "#-d UBL_CONFIG_1GHZ" by removing '#' at the 
    beginning of the line. Save the file and build the project by clicking 'F7' key in CCS. Assuming UBL project is selected 
    in project window, this will build UBL 'out' file and copy it to tools/util/Image directory.
  * Open "Command Prompt" and navigate to directory 'tools/util'
  * Type 'makeublrom.bat' and press 'ENTER' which will create 'ublDaVinci.bin'
  * To create AIS file, use command 'makeUBLbin.exe ublDaVinci.bin'
  * The binaries will be created in tools/util directory.

U-Boot[edit]

Getting the Source[edit]

  * Download the tarball from u-boot-git-snapshot.tar.gz

Prerequisites For Build[edit]

  * A Linux Host machine with Sourcery GNU Toolchain for ARM installed and added in path is required for building the U-Boot. 
    Note that the builds are tested with 2008-Q3 version of toolchain.
  * CROSS_COMPILE variable should be set to point to toolchain. For example, on bash use 
    "export CROSS_COMPILE=arm-none-linux-gnueabi-" to use Sourcery toolchain.

Building U-Boot[edit]

  * Extract the tarball u-boot-git-snapshot.tar.gz on Linux Host.
  * Execute following commands in U-Boot root directory:
  * make davinci_dm6467_evm_config
  * make
  * The above steps will build 'u-boot' ELF file and 'u-boot.bin' binary file in U-Boot root directory.
  * 'mkimage' file will also be built in the ./tools directory. This executable will be required to build kernel uImage.


Flashing UBL and/or U-Boot[edit]

       Note that the binaries and GEL files referred in descriptions below can be found inside respective sub-directory of
       DM6467 or DM6467T under board_utilities directory (eg., board_utilities/dm6467-evm folder in release path 
       for DM6467).

Flashing UBL to I2C EEPROM[edit]

  1 Open CCS and connect to target using ARM gel file for the target.  
  2 Change SW3 to UART boot mode (BM [0-3:0001). Refer EVM technical reference for more details.
  3 Using CCS, File->Load->i2c_eeprom_writer.out and run (F5)
  4 Enter path for UBL binary in the dialog box
  5 I2C EEPROM write will take around 20 seconds to complete writing. "All tests passed and files match" message 
    will be displayed in the CCS output window.

Flashing UBL to SPI EEPROM[edit]

  1 Open CCS and connect to target. ARM gel file can be found in the here
2 Change SW3 to UART boot mode (BM [0-3:0001).
3 Using CCS, File->Load->spi_eeprom_writer.out and run (F5)
4 Enter path for  UBL binary in the dialog box
5 SPI EEPROM write will take around 20 seconds to complete writing. "All tests passed and files match" message 
    will be displayed in the CCS output window.

Flashing UBL to NAND[edit]

  1 Open CCS and connect to target. ARM gel file can be found here
2 Change SW3 to UART boot mode (BM [0-3]:0001).
3 Using CCS, File->Load->nand_flash_writer.out and run (F5)
4 In the dialog box; enter the path of the UBL binary.
5 In the dialog box asking for offset, enter 1
6 Specify 'y' for global erase
7 Wait until the flash writer completes writing ubl is written to NAND.

Flashing U-Boot[edit]

  1 Open CCS and connect to target. ARM gel file can be found here
2 Change SW3 to UART boot mode (BM [0-3]:0001).
3 Using CCS, File->Load->nand_flash_writer.out and run (F5)
4 In the dialog box; enter the path of the u-boot.bin file.
5 In the dialog box asking for offset, enter 6
6 Specify 'n' for global erase
7 Specify 81080000 for the Application Entry Point
8 Specify 81080000 for the Application Load Address 
9 Wait until the flash writer completes writing u-boot to NAND.

Flashing UBL and U-Boot to NAND using Serial Flasher[edit]

Alternately, both UBL and U-Boot can be flashed to NAND by using "Serial Flasher Utility" and use NAND Boot option as described below.

  1 Install .NET Framework 2.0 or later on Windows XP.
  2 Download sfh_DM646x.exe, davinciUBLais.bin and u-boot.bin to a local folder, let's say "C:\tmp".
  3 Open Command Prompt and change working directory to above directory.
  4 Set SW3 switch settings on DM6467T EVM to UART Boot Mode and connect the serial port of board to Windows Host (we assume 
    the board is connected to COM1). The SW3[4:1] positions for this mode are [ON OFF OFF OFF]. Refer EVM technical reference 
    for more details. 
  5 Type following command at command prompt:sfh_DM646x.exe -p COM1 -nandflash  -UBLStartAddr 0x20 davinciUBLais.bin u-boot.bin
6 Following message should be displayed Waiting for the DM646x...
7 Now power on the board.
8 The Serial Flasher application should establish UART communication with EVM and download and flash UBL and U-Boot to NAND 
  flash.
9 Once done, power off the board and set SW3 setings to NAND Boot Mode. The SW3[4:1] positions for this mode are [OFF ON ON 
  ON].
10 Connect serial terminal client (e.g., TeraTerm) to COM1 and power on the board

Serial Flasher can also be built from source downloaded from SourceForge. Refer Serial Flash for more information.

Writing Kernel and Filesystem Image to NAND Flash[edit]

This section describes steps to write kernel and ramdisk images to NAND flash. It is assumed that pre-built kernel image and ramdisk are available on a TFTP server to be downloaded on DM6467/T EVM running U-Boot.

Also, we assume following NAND partition layout when writing the images:

    0x000000160000-0x000000560000 : "kernel"
    0x000000560000-0x000008000000 : "filesystem"

Note that, this layout can be changed as per the need but it is advised to ensure minimum size requirements for bootloader, kernel etc. are met as well as the partition layout assumed in U-Boot and Kernel are consistent.

  • Specify the TFTP server IP address to U-Boot
    DM6467 EVM > setenv serverip <tftp-server-ip-address>
  • Load the kernel uImage in RAM downloading over TFTP. The example below assumes the kernel image name as 'uImage'
    DM6467 EVM > setenv bootfile <kernel-uImage-name>
    DM6467 EVM > dhcp
    Using DaVinci EMAC device
    TFTP from server <tftp-server-ip-address; our IP address is <dhcp-provided-ip-address>
    Filename uImage.
    Load address: 0x80700000
    Loading: #################################################################
             #################################################################
             #########
    done
    Bytes transferred = 2031796 (1f00b4 hex)
The above command sequence will load the kernel image at RAM location starting from 0x80700000. Note the downloaded kernel image size (0x1f00b4 bytes in above example).
  • Before we proceed to write kernel image to NAND, we need to round up the number of bytes to be written to kernel partition to the multiple of page size. In our example, we consider the page size as 2048 bytes as found on NAND flash on DM6467/T EVM. You may need to use different values depending upon the different NAND flash device used.
    Kernel Image Size           = 0x1f00b4
    Rounded to Page Size (0x800)= 0x1f0800
Alternately, you can also round the file size to block size, e.g, 128K (0x20000) for EVM.
  • Erase the kernel partition using rounded size. For our example, we assume the kernel partition as shown in the beginning of this section.
    DM6467 EVM > nand erase 160000 1f0800
    NAND erase: device 0 offset 0x160000, size 0x1f0800
    Erasing at 0x1f0800 -- 5505024% complete.
    OK
  • Write the kernel image to NAND kernel partition.
    DM6467 EVM > nand write 80700000 160000 1f0800
    NAND write: device 0 offset 0x160000, size 0x1f0800
    2033664 bytes written: OK
  • Download the ramdisk image in RAM. If you use dhcp, you will need to temporarily modify 'bootfile' environment variable to specify ramdisk image name on server. This is because the 'dhcp' command tries to download the image with name indicated by 'bootfile'.
    DM6467 EVM > setenv bootfile <ramdisk-image-name>
    DM6467 EVM > dhcp
    Using DaVinci EMAC device
    TFTP from server <tftp-server-ip-address; our IP address is <dhcp-provided-ip-address>
    Filename '<ramdisk-image-name>'.
    Load address: 0x80700000
    Loading: #################################################################
             :
             ####################################################
    done
    Bytes transferred = 4576007 (45d307 hex)
    DM6467 EVM > setenv bootfile <kernel-uImage-name>
  • Round the size to page size:
    Ramdisk Size                = 0x45d307
    Rounded to Page Size (0x800)= 0x45d800
  • Erase the ramdisk partition using rounded size and write the image. In our example, we assume the filesystem partition as shown at the beginning of this section.
    DM6467 EVM > nand erase 560000 45D800
    NAND erase: device 0 offset 0x560000, size 0x45d800
    Erasing at 0x45d800 -- 10092544% complete.
    OK
    DM6467 EVM > nand write 80700000 560000 45D800
    NAND write: device 0 offset 0x560000, size 0x45d800
    4577280 bytes written: OK
Note that in case you face issues reading the ramdisk during booting from NAND, you can erase complete NAND partition (0x560000 till end in our example) and re-write the ramdisk to NAND.
  • In addition, you will need to set 'bootcmd' and 'bootargs' variables to autoboot from NAND.
    DM6467 EVM > setenv bootcmd 'nand read 81100000 560000 500000; nboot 80700000 0 160000; bootm'
    DM6467 EVM > setenv bootargs 'console=ttyS0,115200n8 root=/dev/ram rw initrd=0x81100000,16M mem=120M'
    DM6467 EVM > saveenv
    DM6467 EVM > boot
In our example, we have read only 5MB for ramdisk from NAND, this can be changed as per actual maximum supported ramdisk image size.

Setting U-Boot Environment Variables[edit]

U-Boot command line parameters

  For using RAMDISK, set 'bootargs' as below form U-Boot prompt (replace size and location as appropriate)

setenv bootargs 'console=ttyS0,115200n8 root=/dev/ram rw initrd=0x81100000,16M mem=120M' * For using NFS, set 'bootargs' as below form U-Boot prompt (replace nfs server/path as applicable)
setenv bootargs 'console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=<pathtoaragofilesystem> * (rw,insecure,sync,no_root_squash),nolock mem=120M ip=dhcp Setup Parameters for Auto Booting over Ethernet

  Set following variables to be able to automatically download and boot kernel image with NFS filesystem mentioned above. 

Note that in case using ramdisk image, it needs to be loaded in RAM (at location specified in 'bootargs') either after downloading it over network or copying it from NAND.

     setenv ipaddr <static-ip-address>
     setenv serverip <server-ip-address>
     setenv bootfile <kernel-uImage>
     setenv loadaddr 0x80700000
     setenv bootcmd 'tftp; bootm'
     saveenv
  In addition, you may need to set 'gatewayip' if required. Instead of static IP address, 'dhcp' command can be used to get IP address dynamically.
  Alternately, kernel (and filesystem) can be written to NAND and can be used for subsequent boot.

Running Kernel[edit]

Once above settings are done, type 'boot' at U-Boot prompt and it will boot the kernel. On subsequent reboots, U-Boot will automatically download and boot kernel

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM6467 EVM Installation here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM6467 EVM Installation here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article DM6467 EVM Installation here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article DM6467 EVM Installation here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article DM6467 EVM Installation here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM6467 EVM Installation here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM6467 EVM Installation here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article DM6467 EVM Installation here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DM6467 EVM Installation here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity