Restoring/Flashing OMAP-L137 Bootloaders

From Texas Instruments Wiki
Jump to: navigation, search

Prerequisites

  • Install Code Composer Studio v3.3 or v4 plus EVM Drivers and
  • Install the target content for MontaVista Linux based SDK in an area accessible from Windows.

NOTE: The pre-built U-Boot binary provided with the PSP package is built for SPI boot mode. To build u-boot for NAND boot mode please refer to this link

Procedure

Booting overview

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

To boot U-Boot, 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

  • Set the SW2 switch on the DSK board as follows. (X indicates the setting is 'don't care')
Pin# 7 2 1 0 3
Position 0 1 0 1 X

Booting from NAND Flash

  • Set the SW2 switch on the DSK board as follows. (X indicates the setting is 'don't care')
Pin# 7 2 1 0 3
Position 0 1 1 1 X

On the User Interface card, set the SW1 switch as follows:

Pin # 1 2 3 4
Position 1 0 1 1

Flashing the EVM

There are two ways of flashing the EVM. The first method does not require an emulator or CCS and uses the serial port on the host PC. More information on this tool can be found here: [[1]http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L137]. Otherwise follow the instructions below.

If you already have a full version of CCS installed you will need to download at least CCS Service Release 12, Code Generation Tools v6.1.5 and DSP/BIOS v5.33.03. These can be obtained through the CCS Update Advisor (Help->Update Advisor->Check for Updates). If you want to know what Service Release you have, please see this page. You also need to install the Target Content (drivers, GEL files) from the CD that comes with the Starter Kit. You can also look for updated Target Content from the Spectrum Digital Support site.

If you install both CCS and Target Content from the CD that comes with the Starter Kit you do not need to update any components.

The OMAP-L137 is different from other TI DSP+ARM devices in that the DSP wakes up the ARM as opposed to the other way around. Because of this a small DSP bootloader must first run to wake the ARM and then load the ARM UBL.

  • Copy the contents of the folder /home/user/OMAPL137_arm_1_00_00_xx/REL_LSP_xx_xx_xx_xx/PSP_02_20_00_xx/bin/ from your Linux machine to your windows machine.
  • Setup the EVM in "emulation debug" mode by setting SW2 switch as follows:

For revisions A and B:

Pin # 7 2 1 0 3
Position 1 1 1 1 1

For all revisions after B:

Pin # 7 2 1 0 3
Position 1 1 1 1 0

NOTE: NAND flash is not present on the OMAP-L137 DSP Starter Kit board. The OMAP-L137 SoC supports interfacing with NAND flash, however. The NAND boot has been tested using a User Interface daughter card from Spectrum Digital. For detail, refer to: http://support.spectrumdigital.com/boards/dskda830.

To flash NAND, on the User Interface card, set the SW1 switch as follows:

Pin # 1 2 3 4
Position 1 0 1 1
  • Power-up the EVM and connect the on-board emulation to the PC using the supplied USB cable.
    • If you have never connected to the Starter Kit through the on-board emulation (USB cable) and Windows opens the Find New Hardware Wizard, see here.
  • Start CCS:
    • If you installed the Target Content from the CD or if you are using the DSK's version of CCS you should have an EVMOMAP-L137 CCStudio v3.3 icon on your desktop to select
    • OR Start CCS Setup and select EVMOMAP_L137 to your System Configuration
  • When you Start CCStudio you are going to see the screen:

Connecting 1.JPG

  • Connect to the DSP:
    • Double click on TMS320C674XP_0
    • CCS screen will open
    • On the menu click on Debug -> Connect
    • When connecting to the DSP the GEL file contains a script which wakes the ARM.
    • If preparing to boot from NAND, run the GEL menu function Setup_EMIFA_PinMux()
  • Connect to the ARM:
    • Double click on ARM9_0
    • Another CCS screen will open
    • On the menu click on Debug -> Connect


For booting from SPI/NAND, a DSP AIS image, SPI/NAND UBL, and U-Boot are required. The steps below will take place inside the ARM CCS Window.

  • First burn the DSP AIS image.
    • Load spiflash_writer_ccsv3.out or nand_writer_ccsv3.out (File->Load Program) and run the program (Debug->Run).
    • Enter dspais as the image type at the first prompt.
    • When prompted for a file name, provide <PATH>/dsp-spi-ais.bin or <PATH>/dsp-nand-ais.bin. NOTE: You cannot have spaces in the path.
    • When the process completes (Stdout window will mention that the files match) select Debug->Restart
  • Next burn the ARM UBL.
    • Run the program (Debug->Run).
    • Enter armubl as the image type at the first prompt.
    • When prompted for a file name, provide <PATH>/ubl-spi.bin or <PATH>/ubl-nand.bin. NOTE: You cannot have spaces in the path.
    • When the process completes (Stdout window will mention that the files match) select Debug->Restart
  • Finally burn U-Boot.
    • Run the program (Debug->Run).
    • Enter uboot as the image type at the first prompt.
    • When prompted for a file name, provide <PATH>/u-boot.bin. NOTE: You cannot have spaces in the path.
    • When the process completes (Stdout window will mention that the files match) close all CCS windows
  • Power-off EVM and setup it to boot from SPI0 Flash
Pin # 7 2 1 0 3
Position 0 1 0 1 X

To boot from NAND Flash:

Pin # 7 2 1 0 3
Position 0 1 1 1 X
  • If you have not already done so connect a NULL modem cable from DB9 connector on EVM to COM port on PC. Then program the COM port per the instructions in the Hardware Setup.
  • Power up the EVM and you should see the U-Boot prompt on the serial console (e.g. TeraTerm Pro).

What's Next?

See the Setting up OMAP-L137 Target File System section in the Getting Started Guide.