Serial Boot and Flash Loading Utility for OMAP-L138
From Texas Instruments Embedded Processors Wiki
Contents |
TI Flash and Boot Utilities
This package contains a set of utilities running from the command-line on Windows for flashing the NAND, NOR, and SPI Flash of the OMAP-L138 EVM via the serial port.
The Serial Flashing Host Utility (which offers the same functionality as a previous program called DVFlasher) executable is called sfh_OMAP-L138.exe.
These programs each encapsulate a distinct binary UBL which is transferred via the UART. This implies that the chip must be operating in the UART boot mode, showing the BOOTME prompt.
NOTE: The assumption is made that the UART of the device operates at 115200, 8N1. If the oscillator used with the device does not match the one used on the EVM (e.g. on a custom platform), the baud rate assumption may be incorrect.
Obtaining the software
The latest source code and binaries can be download from here.
Compiling
A makefile is included for compiling the host and target parts of each utility. The target portions are built first since they are embedded into the the host executables. These target portions are loaded to the OMAP-L138 device via the UART boot mode.
Under Windows
The currently supported method is to use the Cygwin environment (such as the one provided with the Montavista Linux tools for Windows) and put the C sharp compiler's (the csc.exe executable) install location in the user's path. This compiler comes with the .NET Framework installation and can usually be found in C:\WINDOWS\Microsoft.NET\Framework\<version number>. Then go to the top level directory of the package and run:
make
Under Linux
The Mono Framework must be installed and in the path. RPMs are available at 'http://www.mono-project.com/Downloads'. Then go to the top level directory of the package and run:
make
The above instructions assume the that GNU ARM cross-compiler tools (arm-none-linux-gnueabi-gcc, etc.) are in the current PATH.
Running
Under Windows
This utility can be run from the command line under Windows with the .Net Framework 2.0 or later installed through the following steps:
- 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 OFF ON ON - Connect a serial cable from the host computer to the OMAP-L138 EVM
- Open a command prompt on the host computer and change directory to where the flashing utility was saved (ex. c:\flasher).
- Run the flashing utility with this command:
- C:\flasher>sfh_OMAP-L138.exe [options]
- 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
There are three modes for using the serial flasher:
- Erase the target flash type - This will erase the entire contents of the flash.
- C:\flasher>sfh_OMAP-L138.exe -erase
- Flash the memory with a single application image - This will place an application image at address 0x0 of the flash.
- C:\flasher>sfh_OMAP-L138.exe -flash_noubl <binary application file>
- Flash the memory with a UBL and application image - This will place a UBL at address 0x0 of the flash and an application image, such as u-boot, at address 0x10000.
- C:\flasher>sfh_OMAP-L138.exe -flash <UBL binary file> <binary application file>
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)
Once any command is run, the "Waiting for BOOTME..." prompt shows. Power cycle the board or press the reset button to continue.
Restoring the OMAP-L138 EVM SPI Flash
If the contents of the OMAP-L138 SPI flash become corrupted, they can be restored through the following steps:
- 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 OFF ON ON - Obtain the UBL and u-boot binary files and place them in the same directory as the SPI flashing utility.
- A pre-built UBL bin file is located in the OMAP-L138/GNU/ubl/ directory of this serial flashing project
- A pre-built u-boot image is located in the images/u-boot/ directory of the PSP installation.
- Run the following command to flash the UBL and u-boot binary files:
- C:\flasher>sfh_OMAP-L138.exe -flash <UBL binary file> <u-boot binary file>
- 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.
- Turn on the board
- After the UBL and u-boot files have 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 OFF OFF OFF - Once u-boot has loaded, follow the instructions in the Getting Started Guide to copy the Linux kernel and filesystem to the SPI flash.
- Booting from SPI Flash
- Note: This step requires that the setup procedures in the Getting Started guide have been followed:
License
These tools are provided as freeware, with no guarantee.

