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.

Running PSP Components on da850 Spectrum Digital EVM

From Texas Instruments Wiki
Jump to: navigation, search

Preparing MMC/SD card for MMC/SD boot mode[edit]

The minimal u-boot (SPL) on OMAP-L138 expects the u-boot descriptor to be present in sectors 1 to 25 of the SD card. Sector 0 is used for storing DOS partition information. Hence the u-boot descriptor is stored from sectors 1 till 24. The descriptor is 512 bytes in size and is replicated in each of these sectors. U-Boot binary starts at Sector 117.

The SD card shall be re-partitioned and formated to create some room for storing u-boot. Use fdisk utility (as super user) to delete the existing partition and create a new one.

host$ fdisk /dev/mmcblk0 (device name might change if USB card reader is used)
  1. Delete the existing partitions with 'd' command.
  2. Create a new partition with 'n' command, followed by 'p' command
  3. Mark the first cylinder as 20. Typical cylinder size is 32KBytes. So starting the first cylinder at 20 provides us about 600Kbytes for storing UBL and u-boot. If the fdisk utility displays a different cylinder size, make sure that you are leaving atleast 500K space before the first cylinder.
  4. Leave the last cylinder to default value (or) any other value depending on the partition size requirements.
  5. Save and exit with 'w' command

SD Card Writer Utility (uflash)[edit]

This is a Linux command line tool specific to TI's Davinci platforms, for flashing UBL/U-Boot to SD card.

Building uflash[edit]

uflash is part of u-boot source. Source is present inside the tools/uflash directory of u-boot installation. When u-boot is built, uflash also gets built. uflash executable will be present under the tools/uflash folder.

Booting U-Boot[edit]

U-Boot is an open source boot loader and is responsible for booting the Linux kernel.

Connect a serial cable from the serial port on the EVM to the COM port on the host machine. Set up the serial terminal software as described in Booting the EVM out of the box.
Note: Boot images may not have been pre-flashed on the EVM for all boot modes. In this case, follow the procedures in Flashing images to flash the required boot images.

Booting from SPI Flash[edit]

In order to boot from SPI flash, which has been written with the boot images, set the SW7 switch on the base board as follows:

Pin# 1 2 3 4 5 6 7 8
Position OFF OFF OFF OFF OFF ON ON OFF


Booting from NAND Flash[edit]

In order to boot from NAND flash, which has been written with the boot images, set the SW7 switch on the base board as follows:

Pin# 1 2 3 4 5 6 7 8
Position OFF OFF OFF OFF ON ON ON OFF


Flashing images[edit]

On the OMAP-L138 (or AM18xx) SoC, the ARM boots first. On boot-up, the ARM copies portion of the U-Boot image (SPL) from SPI/NAND to internal ram and starts executing. The purpose of SPL is to initialize the PLLs, mDDR, and other hardware. Once the initializations are done, it relocates to mDDR and continues.

U-Boot is an open source boot loader and is responsible for booting the Linux kernel.

Obtaining the flashing software[edit]

The latest source code and binaries are present in package here under host-tools.

Compiling[edit]

Please refer here for instructions to build the flashing software.

Running[edit]

Under Windows

This utility can be run from the command line under Windows with the .Net Framework 4.0 or later installed through the following steps:

  1. Set the boot pins to UART2 boot mode. This is done by setting switch S7 on the LogicPD OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON OFF ON
  2. Connect a serial cable from the host computer to the OMAP-L138 EVM
  3. Open a command prompt on the host computer and change directory to where the SFH executable is located.
  4. Run the flashing utility with this command:
  5. ..\OMAP-L138\gnu\sfh_OMAP-L138.exe [options] 
    
  6. Turn on the board

Under Linux

The serial flasher can be run on a Linux machine with the latest open-source Mono Framework installed. The steps are identical to the Windows environment except the command:

mono ./sfh_OMAP-L138.exe [options]

Serial Flasher Options[edit]

  1. Erase the target flash type - This will erase the entire contents of the flash.
  2. ..\sfh_OMAP-L138.exe -erase 
    
  3. Flash the memory with a single application image - This will place an application image at address 0x0 of the flash. This must be an AIS format binary.
  4. ..\sfh_OMAP-L138.exe -flash_noubl <binary application file>  
    

For AM1808 devices, use the following option: "-targetType AM1808"

For SDI devices, use the following option: "-targetType DA850_SDI_EVM"

Note: 'The 'flash_noubl' and 'flash' options will automatically erase the necessary amount of memory in order to fit the UBL and/or application image.

Currently, the only supported flash types are NAND, NOR, and SPI.

Additional options are shown below:

-targetType         : Specifies exact target type within OMAP-L138 family (default OMAP-L138)
-flashType          : Specifies exact flash type (default SPI_MEM)
-p <COM PORT NAME>  : Allows specifying com port other than default 'COM1' or '/dev/ttyS0'.
-h                  : Show help text.
-v                  : See verbose output from target device
-baud <BAUD RATE>   : Allows specifying baud rate other than default (115200)
-APPStartAddr       : Changes entry point of application (default 0xC1080000)
-APPLoadAddr        : Changes load address of application (default 0xC1080000)
-APPFlashBlock      : Changes the block to flash the image into (only for no_ubl mode)

Once any command is run, the "Waiting for BOOTME..." prompt shows. Power cycle the board or press the reset button to continue.

Flashing images to SPI Flash[edit]

  1. Set the boot pins to UART2 boot mode. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON OFF ON
  2. Flash the U-Boot AIS file built for SPI flash. A pre-built U-Boot AIS file (u-boot-spi.ais) is located in images/u-boot/omapl1x8/ folder of PSP installation.
  3. Run the following command to flash the AIS u-boot binary file:
  4. ..\sfh_OMAP-L138.exe -flash_noubl <u-boot AIS file> 
    

    For SDI devices, use the following option: "-targetType DA850_SDI_EVM"

  5. Note that if the serial port is not on COM1, the correct port must be specified using the "-p" option. To determine which COM port to use, open HyperTerminal, connect to one of the ports, and make sure the word "BOOTME" appears when the EVM is reset.
  6. After the u-boot has been flashed, set the boot pins to SPI boot mode and reboot the board. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON ON OFF

Flashing images to NAND Flash[edit]

  1. Set the boot pins to UART2 boot mode. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON OFF ON
  2. Flash the U-Boot AIS file built for NAND flash. A pre-built U-Boot AIS file (u-boot-nand.ais) is located in images/u-boot/omapl1x8/ folder of PSP installation.
  3. Run the following command to flash the AIS u-boot binary file:
  4. ..\sfh_OMAP-L138.exe -flash_noubl -flashType NAND <u-boot AIS file> 
    

    For SDI devices, use the following option: "-targetType DA850_SDI_EVM"

  5. Note that if the serial port is not on COM1, the correct port must be specified using the "-p" option. To determine which COM port to use, open HyperTerminal, connect to one of the ports, and make sure the word "BOOTME" appears when the EVM is reset.
  6. After the u-boot has been flashed, set the boot pins to NAND boot mode and reboot the board. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF ON ON ON OFF

Flashing images to NOR Flash[edit]

IMPORTANT
Since NOR flash is an XIP (Execute-in-place) device, instead of flashing the AIS U-Boot image, U-Boot binary (u-boot.bin) can be directly flashed.

  1. Set the boot pins to UART2 boot mode. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON OFF ON
  2. Flash the U-Boot binary file built for NOR flash. A pre-built U-Boot binary file (u-boot-nor.bin) is located images/u-boot/omapl1x8/ folder of PSP installation.
  3. Run the following command to flash the u-boot binary file:
  4. ..\sfh_OMAP-L138.exe -flash_noubl -flashType NOR <u-boot binary file> 
    

    For SDI devices, use the following option: "-targetType DA850_SDI_EVM"

  5. Note that if the serial port is not on COM1, the correct port must be specified using the "-p" option. To determine which COM port to use, open HyperTerminal, connect to one of the ports, and make sure the word "BOOTME" appears when the EVM is reset.
  6. After the u-boot has been flashed, set the boot pins to NOR boot mode and reboot the board. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF ON OFF OFF OFF

Flashing images to MMC/SD[edit]

MMC/SD boot mode support[edit]

Earlier versions of DA850/OMAP-L138/AM18x SoC does not support strict MMC/SD boot mode. To find whether the device supports strict MMC/SD boot mode or not, follow the below steps:

  • Boot the DA850/OMAP-L138/AM18x EVM with a known u-boot image.
  • From u-boot prompt, display the contents of beginning of ROM, 0xFFFD0000.
  • U-Boot > md 0xfffd0000
    fffd0000: ea000006 e1a00000 30303864 3630306b    ........d800k006
    fffd0010: 20091123 00224232 fffd0000 02000102    #.. 2B".........
    fffd0020: e10f0000 e3c0001f e3800013 e38000c0    ................
    fffd0030: e129f000 e59f000c e240d008 e3cdd007    ..).......@.....
    fffd0040: e59f0004 e1a0f000 ffff0700 fffd3980    .............9..
    fffd0050: 00000000 00000000 00000000 00000000    ................
    fffd0060: 00000000 00000000 00000000 00000000    ................
    fffd0070: 00000000 00000000 00000000 00000000    ................
    fffd0080: 00000000 00000000 00000000 00000000    ................
    fffd0090: 00000000 00000000 00000000 00000000    ................
    fffd00a0: 00000000 00000000 00000000 00000000    ................
    fffd00b0: 00000000 00000000 00000000 00000000    ................
    fffd00c0: 00000000 00000000 00000000 00000000    ................
    fffd00d0: 00000000 00000000 00000000 00000000    ................
    fffd00e0: 00000000 00000000 00000000 00000000    ................
    fffd00f0: 00000000 00000000 00000000 00000000    ................
    U-Boot >
    

    If strict MMC/SD boot mode is supported, then the text d800k008 should appear in the memory window at offset 0x08. For earlier ROM revisions, the text could also appear as d800k002, d800k004, or d800k006.

    On SOCs where strict MMC/SD boot mode is not supported, one has to flash the minimal u-boot (SPL) to SPI flash and u-boot image will be flashed to MMC/SD card. EVM will be booted in SPI boot mode. ROM code will start by booting the SPL. SPL does the low level initialization and then boots u-boot from MMC/SD card.

IMPORTANT
Strict MMC/SD boot mode is not supported with PSP Release 03.22.00.04.

Flashing (pseudo MMC/SD boot mode)[edit]

  1. Follow the steps mentioned here to build boot images required for pseudo MMC/SD boot mode.
  2. Above build procedure will provide 2 boot images, AIS file which needs to be flashed to SPI flash and u-boot binary which needs to be written to MMC/SD card. A prebuilt AIS file (u-boot-mmcsd.ais) and u-boot binary (u-boot-mmcsd.bin) are located in images/u-boot/omapl1x8/ folder of PSP installation.
  3. Refer the steps and flash u-boot-spl.ais file to SPI flash.
  4. Format and partition the MMC/SD card.
  5. Write the u-boot.bin to MMC/SD card using the uflash utility which gets built along with u-boot. uflash utility will be preset under the tools/uflash directory of u-boot source.
  6. host$ ./uflash -d /dev/mmcblk0 -b u-boot.bin -p OMAPL138 -vv
            u-boot Size 252087
            U-Boot Magic Number     : a1aced66
            U-Boot Entry Point      : c1080000
            U-Boot Number of Blocks : 000001ec
            U-Boot Starting Block   : 00000075
            Load U-Boot Address     : c1080000
            Writing U-Boot Signature
            Writing U-Boot
            Done...
    
  7. After the u-boot has been flashed, set the boot pins to SPI boot mode. This is done by setting switch S7 on the OMAP-L138 EVM according to the following table:
    Pin# 1 2 3 4 5 6 7 8
    Position OFF OFF OFF OFF OFF ON ON OFF

    Insert the flashed MMC/SD card into the slot and reboot the board.

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 Running PSP Components on da850 Spectrum Digital EVM 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 Running PSP Components on da850 Spectrum Digital EVM here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Running PSP Components on da850 Spectrum Digital EVM 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