GSG: DA8x/OMAP-L1/AM1x DVEVM Additional Procedures
From Texas Instruments Embedded Processors Wiki
^ Up to main Getting Started Guide for OMAP-L1 Table of Contents
Contents |
Flashing images
On the OMAP-L138 (or AM18xx) SoC, the ARM boots first. On boot-up, the ARM runs the ARM UBL in AIS file format. The purpose of the ARM UBL is to initialize the PLLs, mDDR, and other hardware. Once done, it copies the U-Boot into mDDR and starts it.
U-Boot is an open source boot loader and is responsible for booting the Linux kernel.
Flashing images to SPI Flash
There are two ways to flash images to SPI Flash:
- Serial flasher
- See this page for instructions on using the command line serial flashing utility, which requires only a UART cable: Serial Boot and Flash Loading Utility for OMAP-L138
- CCS
- The embedded emulation that comes with the EVM is XDS100 version 1, that does not support the ARM. So to connect to the ARM, an external emulator is necessary. Also, to use an external emulator, you need the full version of CCS, not the one that comes with the evm. If you do not have an external emulator, please use the Serial Flasher above.
- Obtain the latest ARM GEL file from LogicPD (http://www.logicpd.com/products/development-kits/zoom-omap-l138-experimenter-kit) or your local TI representative. Run the CCStudio Setup tool and ensure that the ARM GEL file is correctly specified.
- Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
Pin# 1 2 3 4 5 6 7 8 Position OFF OFF OFF OFF ON OFF OFF ON - Start CCStudio and connect to the ARM. See details at: How to connect to the OMAP-L138/C6748 EVM board using CCS?.
- From the toolbar, execute "GEL-->Full EVM-->SPI1_PINMUX".
- Load the SPI flasher tool on to the ARM. You can either use the pre-built binary shipped in the images/utils directory of the PSP installation (spiflash-writer-ccsv3.out), or you can build your own by following the steps in the section on Rebuilding the SPI Flash writer
- Run the SPI flasher program. You will be prompted for the input file type and the file path. For booting from SPI, an ARM AIS image and U-Boot are required.
- To burn the ARM AIS image, type armais as the image type. When prompted for a file name, provide the path to arm-spi-ais.bin file. A pre-built image is located in the images/boot-strap/ directory of the PSP installation.
- To burn U-Boot, run the SPI flasher program again, and type uboot as the image type. When prompted for a file name, provide the path to the u-boot.bin file. A pre-built image is located in the images/u-boot/ directory of the PSP installation.
- Once the SPI flash has been written with the all the required files, disconnect CCStudio and power off the EVM.
Flashing images to NAND Flash
Follow these steps to flash images to NAND Flash:
- The embedded emulation that comes with the EVM is XDS100 version 1, that does not support the ARM. So to connect to the ARM, an external emulator is necessary. Also, to use an external emulator, you need the full version of CCS, not the one that comes with the evm. If you do not have an external emulator, you cannot load the NAND Flash using these instructions.
- Obtain the latest ARM GEL file from LogicPD (http://www.logicpd.com/products/development-kits/zoom-omap-l138-experimenter-kit). Run the CCStudio Setup tool and ensure that the ARM GEL file is correctly specified.
- Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
Pin# 1 2 3 4 5 6 7 8 Position OFF OFF OFF OFF ON OFF OFF ON - Start CCStudio and connect to the ARM. See details at: How to connect to the OMAP-L138/C6748 EVM board using CCS?.
- From the toolbar, execute "GEL-->Full EVM-->EMIFA_NAND_PINMUX".
- Load the NAND flasher tool on to the ARM. You can either use the pre-built binary shipped in the images/utils directory of the PSP installation (nand-writer-ccsv3.out), or you can build your own by following the steps in the section on Rebuilding the NAND Flash writer
- Run the NAND flasher program. You will be prompted for the input file type and the file path. For booting from NAND, an ARM AIS image and U-Boot are required.
- To burn the ARM AIS image, type armais as the image type. When prompted for a file name, provide the path to arm-nand-ais.bin file. A pre-built image is located in the images/boot-strap/ directory of the PSP installation.
- To burn U-Boot, type uboot as the image type. When prompted for a file name, provide the path to the u-boot.bin file. A pre-built image is located in the images/u-boot/ directory of the PSP installation.
- Once the NAND flash has been written with the all the required files, disconnect CCStudio and power off the EVM.
Flashing images to NOR Flash
Follow these steps to boot from NOR Flash:
- The embedded emulation that comes with the EVM is XDS100 version 1, that does not support the ARM. So to connect to the ARM, an external emulator is necessary. Also, to use an external emulator, you need the full version of CCS, not the one that comes with the evm. If you do not have an external emulator, you cannot load the NOR Flash using these instructions.
- Obtain the latest ARM GEL file from LogicPD. Run the CCStudio Setup tool and ensure that the ARM GEL file is correctly specified.
- Set the boot pins to emulation boot mode. This is done by setting switch S7 on the EVM according to the following table:
Pin# 1 2 3 4 5 6 7 8 Position OFF OFF OFF OFF ON OFF OFF ON - Start CCStudio and connect to the ARM. See details at: How to connect to the OMAP-L138/C6748 EVM board using CCS?.
- From the toolbar, execute "GEL-->Full EVM-->EMIFA_NOR_PINMUX".
- Load the NOR flasher tool on to the ARM. You can either use the pre-built binary shipped in the images/utils directory of the PSP installation (norflash-writer-ccsv3.out), or you can build your own by following the steps in section on or you can build your own by following the steps in the section on Rebuilding the NOR Flash writer.
- Run the NOR flasher program. You will be prompted for the input file type and the file path. For booting from NOR, an ARM AIS image and U-Boot are required.
- To burn the ARM AIS image, type armais as the image type. When prompted for a file name, provide the path to arm-nor-ais.bin file. A pre-built image is located in the images/boot-strap/ directory of the PSP installation.
- To burn U-Boot, type uboot as the image type. When prompted for a file name, provide the path to the u-boot.bin file built for NOR.
- Once the NOR flash has been written with the all the required files, disconnect CCStudio and power off the EVM.
Booting U-Boot
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.
- Setup the S7 switch according to the boot mode selected (see various options below) and power up the board. The U-Boot prompt should appear on the serial terminal running on the host.
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
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 | OFF | OFF | OFF |
Booting from NAND Flash
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 | OFF | OFF | OFF |
Booting from NOR Flash
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 | ON | ON | ON | OFF |
Booting the Linux kernel using U-Boot
Booting the kernel requires a valid kernel image (uImage) and a target filesystem. A pre-built kernel image is included in the images/kernel directory of the PSP installation. Pre-built file system images can be found in your PSP tools installation at images/fs.
Booting Linux kernel using U-Boot describes various methods to boot Linux kernel.
Using extended memory available on EVM board
The OMAP-L138 eXperimenter board has 64MB of memory and the OMAP-L138 EVM has 128 MB available. Out of this 128 MB, some amount is used for Linux and the rest can be used for DSP or as DSP/ARM shared memory. Sometimes it is convenient to allow Linux to use discontinuous blocks of memory. Kernel parameter mem= can be used for this purpose. One example is shown here:
U-Boot> setenv bootargs console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=dhcp mem=32M@0xc0000000 mem=64M@0xc4000000
Loading Linux Kernel Modules
Many of the kernel features can be built as run-time loadable modules so that they are not part of the kernel image, but can be inserted into the kernel at run-time to increase the running kernel’s functionality.
To understand how to configure some features as modules and how to build them, refer to Rebuilding the Linux Kernel and Driver configuration in the Linux kernel.
Pre-built binaries for features configured by default as kernel modules are included in the PSP package in the images/kernel/omapl1x7/modules/lib directory for OMAP-L137 and in the images/kernel/omapl1x8/modules/lib directory for OMAP-L138. To use these modules, copy the contents of this directory to the /lib directory of your root file system.
On the target Linux command prompt use command modprobe command to load the module. rmmod command can be used to remove the module. Below is an example of loading the USB file storage gadget module. Similar steps can be followed for any driver module.
Loading USB 2.0
To load the USB file backed storage gadget:
- Insert the g_file_storage.ko module with the following command where /dev/blockdevX is the storage device acting as the actual storage space. Replace it with the path to the actual block device name acting as physical storage, such as a MMC/SD card.
- Remove the module by using
target$ modprobe g_file_storage file=/dev/blockdevX
target$ rmmod g_file_storage
DSP wakeup in U-Boot
On the OMAP-L138 SoC, the U-Boot wakes up the DSP by default. The DSP reset vector is set to 0x80000000, and after wakeup it executes the idle instruction. To prevent the DSP from being woken up by U-Boot, you can do the following:
- Set the dspwake environment variable to "no".
- Save the environment space.
- Reset the board.
This feature has been added to help DSP users wake up the DSP quickly, since on the OMAP-L138 EVM only the on-board emulation can access the DSP.
Restoring factory default U-Boot environment variables
To restore factory default U-Boot environment variables, the existing environment variables need to be erased from flash. You will need to know the offset in flash were environment variables are stored and the size of flash dedicated to storing the environment variables.
These values are represented by CONFIG_ENV_OFFSET and CONFIG_ENV_SIZE respectively in U-Boot EVM configuration file.
For OMAP-L138 (or DA850, AM18xx) SoCs, this file is include/configs/da850_evm.h inside the U-Boot source tree.
For OMAP-L137 (or DA830, AM17xx) SoCs, this file is include/configs/da830_evm.h inside the U-Boot source tree.
Follow this procedure based on the flash U-Boot stores its environment variables on. The size and offset values given below are to considered representative only.
SPI flash
On SPI flash, environment variables are stored at offset 256 KByes into the flash and environment variables sector size is 64 KBytes.
- On the U-Boot command prompt:
- Erase environment sector length bytes (64 KBytes) from environment sector offset (256 KBytes) as follows:
- Reset the board and it will come up with default environment variables.
- Save the new set of environment variables.
U-Boot> sf probe 0
U-Boot> sf erase 40000 10000
U-Boot> saveenv
NAND Flash
On the NAND flash, env variables are stored at offset 0 (zero) and environment variables sector size is 128 KBytes.
- Erase environment sector length bytes (128 KBytes) from environment sector offset 0 (zero) as follows:
- Reset the board and it will come up with default environment variables.
- Save the new set of environment variables.
U-Boot> nand erase 0 20000
U-Boot> saveenv
NOR Flash
On the NOR flash, env variables are stored at the 4th sector of NOR flash and environment variables sector size is 128 KBytes.
- Unprotect the 4th sector using:
- Erase environment sector length bytes (128 KBytes) from environment sector offset 60060000 as follows:
- Reset the board and it will come up with default environment variables.
- Save the new set of environment variables.
U-Boot> protect off 60060000 +20000
U-Boot> erase 60060000 +20000
U-Boot> saveenv
Linux Functional Test Bench
The Linux Functional Test Bench (LFTB) is the set of tools used to verify the various driver features. The test bench is included in the test-suite directory of the PSP installation. Please use the tar command to extract the LFTB package.
Information on how to use LFTB and its various features is included in the LFTB package itself.
What's next?
Please continue on to the Additional information section of the OMAP-L1 Getting Started Guide.
Leave a Comment
