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.
Flash v1.6 User Guide
Contents
- 1 Applicability
- 2 Installation Instructions
- 3 About Flash v1.6
- 4 Release Notes
- 5 Accessing Online Help
- 6 Setup for USB Peripheral Boot Mode
- 7 Setup for UART Peripheral Boot Mode
- 8 Making Binary Images Accessible to the Windows XP O/S
- 9 Starting the Flash Application
- 10 Details about the Flash GUI
- 11 Example 1: Flashing the AM/DM37x Evaluation Module
- 12 Example 2: Flashing the AM3517A Evaluation Module
- 13 Rebuilding to Change from the Default ECC Scheme
- 14 After Programming Flash: Set EVM for NAND Boot Mode
- 15 Flash v1.6 (Information for Developers)
- 16 Feedback
- 17 Porting Guide
- 18 Archived Versions
Applicability[edit]
This tool can only be used on Sitara AM35x, AM37x devices.
This article applies to Sitara SDK 5.0.3.x. For SDK 5.0.2 see archived versions section.
1. This Windows XP-based Flash Tool can be used to program MLO, u-boot and kernel to NAND flash.
2. As an alternate method, you can use U-Boot to program MLO, u-boot and kernel to NAND flash.
See How_To_Program_NAND_Flash_Using_U-Boot.
3. File systems must be programmed using Linux kernel commands.
Installation Instructions[edit]
- Download "FlashTool for AM35x, AM37x, DM37x and OMAP35x Devices" from here:
Flash_v1.6.0.0 onto a PC running the Windows XP O/S.
2. Open the downloaded FlashTool_vX.X.X.X zip file and run setup.exe to start the Windows Installer.
3. Follow the installer instructions.
4. The default installation directory is "C:\Program Files\Texas Instruments\Flash v1.6", but this
can be changed when running the installer.
5. The FlashTool software can be uninstalled at any time by accessing the Add/Remove Programs
function of Windows (Start -> Control Panel -> Add/Remove Programs).
About Flash v1.6[edit]
This page contains a description of a tool – Flash v1.6 – that can be used to transfer binary images
from a host PC to certain TI ARM-based target platforms. The tool consists of two main components:
- a GUI host application, called Flash v1.6 - a CLI host application, called OMAPFlash.
It is recommended to use the GUI for performing flashing functions. This documentation covers usage
of the GUI. Future documentation will cover the CLI interface in more detail. This application has been
designed with flexibility and portability in mind. It is now possible to modify target register configurations
without rebuilding the tool. This allows for easy modifications to various target peripheral configurations
(such as SDRC, GPMC, Pad Control, etc.). This capability makes it possible to support new DDR devices
and NAND devices without software changes. Check out the section #Porting_Guide for more information
on this feature. Internally, the tool makes use of a ROM code mechanism for peripheral boot from UART
or USB to transfer compatible drivers to the internal memory of the OMAP device. These drivers provide
the mechanism by which the host applications can program binary images into the internal memories
(NAND and SDRAM) of the target. All of this operation is hidden from the user.
Release Notes[edit]
Version 1.6.0.0 (6/24/2011)
New Features
- Added GUI controls for Target OS and 1-Bit ECC Layout.
- Set offset to ECC parity data in spare area based on new GUI controls.
- Added support for ECC offsets used with WinCE for 4/8-bit BCH.
- Eliminated requirement that image size be a mult of 4 bytes.
- Added software NAND unlock command.
Limitations
- Download and execute can only branch to Thumb code
Version 1.5.1.0 (3/25/2011)
New Features
- Programming flash via UART target connection is now supported.
Limitations
- Download and execute can only branch to Thumb code
Version 1.5 (3/13/2011)
New Features
- Added support for programming NAND devices with Internal ECC
Limitations
- Programming flash via UART target connection is not supported
- Otherwise, similar functionality to previous releases.
Version 1.4 (2/16/2011)
New Features
- Added AM35xx and Custom_AM35xx target types
- Updated "What's This?" help text for UART and USB target connection types
- Greyed out 4-bit BCH error correction for OMAP35xx devices (not supported by silicon)
Limitations
On-chip ECC is not supported
- Programming flash via UART target connection is not supported
- Otherwise, similar functionality to previous releases.
Version 1.3 (12/23/2010)
- New Features
- GUI updates, including "What's This?" style help, link to user's guide.
- Defined Custom target types for AM37xx and OMAP35xx, to allow customers to more easily make
changes for custom boards.
- Enhanced NAND capabilities: SW vs. HW ECC Selection, 1b/4b/8b Error Correction, ONFI NAND
selection via check box.
- Limitations
- Still no AM35xx support (coming in future release).
- Otherwise, similar functionality to previous releases.
Version 1.2:
- New Features
- USB Support
- Can install over previous versions without manual uninstall
- Selectable NAND vs. ONFI NAND mode
- Limitations
- Same as before
Version 1.1:
- New Features
- OMAP35xx Support.
- Limitations
- Same as before
Version 1.0:
- Features
- UART support
- AM37xx/DM37xx support
- Can support new NAND devices via text config file modification.
- Can modify target registers via text config file modification (for example SDRC, GPMC, pad config
settings)
- ONFI NAND Support
- Supported operations: Download, Download and Execute (to Thumb mode code), Erase Region,
Erase All.
- Windows GUI (no Linux yet).
- Scriptable Windows CLI (no Linux yet).
- Fully open source, BSD-style license.
- Limitations
- Download and execute can only branch to Thumb code.
- Storing images to NAND uses HWECC. Therefore, you cannot use a standard xloader to load uboot
from NAND. Xloader uses SWECC when reading from NAND. The workaround is to use the uboot
provided on the SD card to flash itself into NAND memory.
- GUI support does not yet exist to define new platforms. However, two memory choices are supplied,
Hynix and Micron. For experimenting with modifications to the configuration text file (for instance, to
port to a new platform) it is recommended that you modify the Micron files (and save a copy if you need
the originals).
Accessing Online Help[edit]
There are two methods to get help from the user interface:
1. Click the "What's This Do?" Button. This changes the cursor type. Move the cursor over a widget
until you see the cursor change to a question mark. Then, you may click and get context sensitive
help.
2. Click the "Open User's Guide" Button. This will open your normal HTML browser to the Flash User's
Guide Page (this page).
Setup for USB Peripheral Boot Mode[edit]
1. Ensure that your EVM is set up for peripheral boot from USB.
For Mistral OMAP EVM (AM37x, DM37x or OMAP35xx devices)
- Set SW4 switches #2 and #3 to the ON position and all others OFF.
- Connect a USB cable from the board's USB "On the Go" port to a USB port on the PC.
- Power on the EVM or press the reset pushbutton (labelled "OMAP_RST")
For LogicPD AM3517EVM:
- Set SW7 switches #1 and #4 to the ON position and all others OFF.
- Connect a USB cable from the board's USB "On the Go" port to a USB port on the PC.
- Power on the EVM
2. If this is the first time to connect the EVM to your PC via USB you will need to perform
the following steps to install the required USB driver:
- You will see the "Found New Hardware Wizard" dialog box. Select "No, not this time",
then "Next".
- Select "Install from a list or specific location (Advanced)".
- Use the browse box to select the following folder: <Flash-install-dir>\usb_drv_windows.
Normally, the full path will be:
C:\Program Files\Texas Instruments\Flash vX.X\usb_drv_windows.
- Make sure the box "search removable media" is unchecked.
- Make sure the box "Include this location in the search" is checked.
- Click Next. The driver should install correctly without error messages.
- Click Finish to exit the Found New Hardware Wizard.
Setup for UART Peripheral Boot Mode[edit]
1. Ensure that your EVM is set up for peripheral boot from UART.
For Mistral OMAP EVM (Rev G):
- Set SW4 switches #2 and #4 to the ON position and all others OFF.
- Connect a 9-pin serial NULL-MODEM cable, from your host PC to the
“UART3” port on the target board.
- Power on the EVM or press the reset pushbutton (labelled "OMAP_RST")
For LogicPD AM3517EVM:
- Set SW7 switches #1 and #4 to the ON position and all others OFF.
- Connect a 9-pin serial NULL-MODEM cable, from your host PC to the
“UART” port on the target board.
- Power on the EVM.
Making Binary Images Accessible to the Windows XP O/S[edit]
The binary images for XLOADER, U-Boot and the Linux Kernel must be made accessible to the
Windows XP O/S. There are a few methods for doing this:
1) If you are running your Linux Host as a virtual machine (using VMWare or using Sun Virtual
Box) you can setup a shared folder that can be accessed by both the Linux Host and the
Windows O/S. (You can also create sub-folders below that as needed - the resulting directory
tree will be accessible to both Linux and Windows.)
See How to Set up a Shared Folder in VMWare or How to Setup a Shared Folder in Virtual Box
for details.
OR
2) You can setup a Samba server that makes a designated location in your Linux Host file system
appear as a drive to the Windows O/S.
The binary images can be copied to the shared folder or be accessed directly via a Samba drive.
1) Pre-built images can be found in the ./psp/prebuilt-images subdirectory of the Sitara SDK installation.
OR
2) Rebuilt images would be found where they were rebuilt under the ./psp subdirectory of the Sitara SDK installation.
Starting the Flash Application[edit]
To start the Flash application under Windows XP:
- Double click the "Shortcut to Flash.exe" icon on the desktop
OR
- Use the Windows Start menu:
"Start -> All Programs -> Texas Instruments -> Flash v1.6 -> Flash.exe".
Below is a screen capture of Flash_v1.6.0.0 upon startup.
Details about the Flash GUI[edit]
1. CHOOSE TARGET (drop-down box)
This allows selection of pre-defined target configuration files for the different EVM boards. The
target configuration files contain register initialization code that mimics what is performed
by XLOADER to initialize clocks and memory interfaces prior to flash programming. The
following pre-defined EVM configurations and custom configurations are provided. Choose a
a custom target configuration and click the "Edit Config File" button to view or modify the target
configuration for your custom design. See the Porting Guide section for more information
on how to design a custom target configuration file.
Target Board | Target Configuration Description |
---|---|
AM35xx (Micron) | LogicPD AM3517EVM with AM3517A SOM and Micron discrete NAND and DDR2 memories |
AM37xx (Hynix) | Mistral OMAP3 EVM with AM37x or DM37x SOM containing Hynix POP Memory |
AM37xx (Micron) | Mistral OMAP3 EVM with AM37x or DM37x SOM containing Micron POP Memory |
OMAP35xx (Micron) | Mistral OMAP3 EVM with OMAP35x SOM containing Micron POP Memory |
Target Board | Configuration Description |
---|---|
Custom AM35xx Board | Same as AM35xx (Micron) - Modify for your custom AM35xx design. |
Custom AM37xx Board | Same as AM37xx (Hynix) - Modify for your custom AM37x/DM37x design. |
Custom OMAP35xx Board | Same as OMAP35xx (Micron) - Modify for your custom OMAP35xx design. |
2. SELECT TARGET CONNECTION TYPE (Radio Buttons)
This allows selection of the target connection. Select USB or UART for communication between
the Host PC and the target board (and also the peripheral boot mode that will be used).
For the UART connection, also select the PC COM port that will be used (typically 1 for COM1).
3. CHOOSE THE DESIRED MEMORY TYPE
This selects the destination memory type. Selecting NAND enables Erase and Download
operations. Selecting SDRAM allows Download and Download and Execute operations.
4. SELECT MEMORY OPTIONS
If you have selected SDRAM, there are no other memory options to select. If you have selected NAND,
choose from the following group of options:
- ECC STYLE (Radio Buttons)
This selects the method used to generate, check and correct ECC data in the NAND spare area. Choose
HWECC, SWECC or NAND ECC. HWECC uses the GPMC controller to calculate ECC parity and
uses software error detection and correction. SWECC uses software to calculates ECC parity
and to detect and correct errors. NAND ECC uses Internal ECC controller on the NAND device
to calculate ECC parity and to perform error detection and correction. Before NAND is programmed
using NAND ECC mode, the Internal ECC of the NAND device is activated.
When programming XLOADER, always choose HWECC and 1-bit ECC, as this is required by the
ROM Boot Loader. When programming U-Boot or the Linux Kernel the ECC style must be set to be
compatible with the software that will read the downloaded image from NAND.
- ONFI COMPLIANT NAND? (check box)
Check this box for operations on an ONFI-compliant NAND device. When checked, data specifying
NAND memory geometry and features are read from the NAND device. Otherwise, this data is taken
from the header in the Target Configuration file.
- ERROR CORRECTION (Radio Buttons)
Select the error correction algorithm that will be used to program the ECC data into the OOB area.
For SWECC ECC format, only 1-Bit ECC (Hamming Code) is allowed. For HWECC ECC format,
1-bit ECC, 4-bit BCH or 8-bit BCH algorithms can be selected. (4-bit BCH is not available for the
OMAP35xx device due to silicon limitations). For NAND ECC mode, the ECC algorithm provided
by the NAND Internal ECC is used.
- TARGET OS (drop-down box)
This GUI control shows only when HWECC 4-bit BCH or 8-bit BCH is selected. The ECC Offset
in spare area is changed to 2 if the WinCE Target OS is selected.
- 1-Bit ECC Layout (drop-down-box)
This GUI control shows only when HWECC 1-bit ECC is selected. Choose "X-Loader/U-Boot"
when programming XLOADER or U-Boot into NAND. For Linux kernel 2.6.37 or later, you must
change this setting to Kernel when programming the Linux kernel into NAND. This changes
the ECC offset in spare area from 2 to 40, as is needed to be compatible with the JFFS2 NAND
file system. For earlier Linux kernels, "X-Loader/Uboot" setting should be used for programming
the Linux kernel into NAND.
5. CHOOSE OPERATION PARAMETERS (Radio Buttons)
Select the operation to be performed:
- DOWNLOAD
Choose this to download a binary image to either NAND or SDRAM.
Before downloading an image to NAND, you must first erase the region where the image will be
downloaded (or Erase All NAND).
Set OFFSET (hexadecimal value) to the offset from the beginning of NAND or SDRAM where the
image will be downloaded.
- DOWNLOAD AND EXECUTE
Choose this to download a binary image and execute it. Applies to SDRAM as destination only.
Supports Thumb Mode ARM code only.
Set OFFSET (hexadecimal value) to the offset from the beginning SDRAM where the image will be
downloaded.
- ERASE REGION
Choose this to erase a region in NAND flash.
Set OFFSET (hexadecimal value) to offset from beginning of NAND device where erasing begins.
Set SIZE (hexadecimal value) to the number of bytes which will be erased. Use a multiple of the
NAND BLOCK size.
- ERASE ALL
Choose this to erase the entire NAND flash.
6. IMAGE SELECTION (Edit Box)
For download operations, you must specify the binary image to be downloaded. Click the BROWSE
button to select an XLOADER, U-Boot, Linux Kernel. File systems cannot be programmed to NAND
flash using this Flash Tool. U-Boot should be used to program file systems to NAND flash.
7. GO (Button)
Once you have successfully made your selections, the GO button will be enabled. Click the GO start
execution of the specified operation.
8. ABORT (Button)
Once the operation is in progress, you will have the option of clicking the ABORT button to cancel it.
This would be used if communication with the target device fails or if the target board fails to complete
the peripheral boot process.
9. OUTPUT (Text Window)
While the operation is in progress, status information is output to the OUTPUT text window. First a
message will be displayed to "Please turn off device" (if powered on) and then "Please turn on device".
At this point you can cycle power to the target EVM or (if already powered on) just press the RESET
button on the EVM (For Mistral OMAP3 EVM, use the button labelled "OMAP_RST", as shown below.)
The Flash Tool will then automatically perform the following operations, as related status information is
displayed in the OUTPUT text window:
- Read the ASIC ID from the target device
- Download the "2nd Loader" program" (for communication with Flash Tool)
- Wait for "2nd Loader" program to start executing on the target board
- Perform register initializations as specified in the Target Configuration file.
- Download a software driver for the specific destination memory device
- Perform the specified Erase or Download operation
If any errors occur, related information will be displayed in the OUTPUT text window. Please cut and
paste the information from the OUTPUT text window if support is needed to diagnose the problem.
10. CLEAR OUTPUT (Button)
At any time, you may clear the OUTPUT text window by clicking the CLEAR OUTPUT button.
Example 1: Flashing the AM/DM37x Evaluation Module[edit]
This example is compatible with the Sitara SDK 5.0.3.x and its u-boot-2011.09-psp04.06.00.03.
and PSP software 04.02.00.07 which is based on the 2.6.37 Linux kernel. Flash Tool settings are shown
for erasing and programming MLO, u-boot and the Linux kernel to NAND flash. It is assumed here that the
image files shown were copied from the AM37x Sitara SDK from the "<SDK-Install-Dir>/board-support/preloaded-images"
folder of the Linux Host. For the AM37x Sitara SDK v5.0.3, the pre-built MLO, u-boot and kernel
images are configured to use the HWECC 1-Bit ECC algorithm. (MLO must always be programmed
into NAND using HWECC 1-Bit ECC as required by the ROM boot loader.)
As an alternative, Erase All could be used instead of the three Erase Region operations below. However,
this would also erase the u-boot parameters partition in NAND. For the erase operations, the ECC
STYLE and ERROR CORRECTION settings are don't cares. They can be left in the default state:
HWECC and 1-bit ECC.
For all of the operations listed below, also use these settings:
CHOOSE TARGET: AM37xx (Hynix)
SELECT TARGET CONNECTION TYPE: USB
CHOOSE THE DESIRED MEMORY TYPE: NAND
Perform NAND ERASE and NAND DOWNLOAD operations using the parameters shown here:
OPERATION | MEMORY OPTIONS | OFFSET | SIZE | IMAGE FILE |
---|---|---|---|---|
Erase Region for MLO |
NON-ONFI | 0 | 80000 | |
Download MLO |
NON-ONFI,HWECC,1-Bit ECC, X-loader/u-boot ECC Layout |
0 | N/A | MLO-am37x-evm |
Erase Region for u-boot |
NON-ONFI | 80000 | 80000 | |
Download u-boot |
NON-ONFI,HWECC,1-Bit ECC, X-Loader/u-boot ECC Layout |
80000 | N/A | u-boot-am37x-evm.img |
Erase Region for Linux kernel | NON-ONFI |
280000 |
400000 | |
Download Linux kernel
|
NON-ONFI,HWECC,1-Bit ECC, Kernel ECC Layout |
280000 | N/A | uImage-am37x-evm.bin |
The u-boot-2011.09-psp04.06.00.03 is a mainline SPL/u-boot. MLO and u-boot are built from the same sources. The ability to rebuild the MLO
to load u-boot using 4-bit BCH and 8-bit BCH is coming soon.
Example 2: Flashing the AM3517A Evaluation Module[edit]
This example is compatible with the Sitara SDK 5.0.3.x and its u-boot-2011.09-psp04.06.00.03.
and PSP software 04.02.00.07 which is based on the 2.6.37 Linux kernel. Flash Tool settings are shown
for erasing and programming MLO, u-boot and the Linux kernel to NAND flash. It is assumed here that the
image files shown were copied from the AM3517 Sitara SDK from the "<SDK-Install-Dir>/board-support/preloaded-images"
folder of the Linux Host. For the AM3517 Sitara SDK v5.0.3, the pre-built MLO, u-boot and kernel
images are configured to use the HWECC 1-Bit ECC algorithm. (MLO must always be programmed
into NAND using HWECC 1-Bit ECC as required by the ROM boot loader.)
As an alternative, Erase All could be used instead of the three Erase Region operations below.
However this would also erase the U-Boot parameters partition in NAND. For the erase
operations, the ECC STYLE and ERROR CORRECTION settings are don't cares. They can be left
in the default state: HWECC and 1-bit ECC.
For all of the operations listed below, also use these settings:
CHOOSE TARGET: AM35xx (Micron)
SELECT TARGET CONNECTION TYPE: USB
CHOOSE THE DESIRED MEMORY TYPE: NAND
Perform NAND ERASE and NAND DOWNLOAD operations using the parameters shown here:
OPERATION | MEMORY OPTIONS | OFFSET | SIZE | IMAGE FILE |
---|---|---|---|---|
Erase Region for MLO |
ONFI | 0 | 80000 | |
Download MLO |
ONFI,HWECC,1-Bit ECC, X-loader/U-Boot ECC Layout |
0 | N/A | MLO-am3517-evm |
Erase Region for u-boot |
ONFI | 80000 | 80000 | |
Download u-boot |
ONFI,HWECC,1-Bit ECC, X-Loader/U-Boot ECC Layout |
80000 | N/A | u-boot-am3517-evm.img |
Erase Region for Linux kernel | ONFI |
280000 |
400000 | |
Download Linux kernel
|
ONFI,HWECC,1-Bit ECC, Kernel ECC Layout |
280000 | N/A | uImage-am3517-evm.bin |
The u-boot-2011.09-psp04.06.00.03 is a mainline SPL/u-boot. MLO and u-boot are built from the same sources. The ability to rebuild the MLO
to load u-boot using 4-bit BCH and 8-bit BCH is coming soon.
Rebuilding to Change from the Default ECC Scheme[edit]
For Sitara SDK 5.0.3.x this feature is coming soon.
After Programming Flash: Set EVM for NAND Boot Mode[edit]
After flash programming has been completed, you need to change the EVM to NAND boot mode
to execute the x-loader and u-boot binaries at boot up from NAND flash.
For Mistral OMAP EVM (AM37x, DM37x or OMAP35xx devices)
- Set SW4 switches #2 and #4 to the ON position and all others OFF. (UART3, NAND boot order)
- OR set SW4 switches #2, #4 and #6 to the ON position and all others OFF. (NAND, UART3 boot order)
- Power cycle the EVM
For LogicPD AM3517EVM:
- Set SW7 switches ALL to the OFF position. (NAND, EMAC, USB, MMC1 boot order)
- Power cycle the EVM
Flash v1.6 (Information for Developers)[edit]
- Source Code SVN repository is located on GForge in project Flash (https://gforge.ti.com/gf/project/flash)
- You can jump directly to this page from the Flash GUI by clicking the "Developers Welcome!" button.
Feedback[edit]
Several options exist for feedback:
- Leave comments using the link at the bottom of the page. For any error conditions, please
copy and paste the text in the output box into the body of the email. Also, identify your
target board, processor, and memory types. Provide a synopsis of what you are trying to do.
- Join the mailing list (arm_mpu_flash_tool@list.ti.com)
- Join the development effort via the GForge page, and provide feedback there.
Porting Guide[edit]
[Remainder of document intended for advanced users]
This is a small porting guide for Flash. It contains an introduction to the modifications that may be necessary in order to get Flash working on a new board or with a new memory device.
Porting to a new platform[edit]
In general, porting to a new platform should not require the modification or recompilation of the code base. The starting point will be to create a board configuration file for the new platform.
Existing board configuration files are found in .\Targets\Configurations. In order to add support for a new platform it is recommended to modify configuration_custom_am37xx.txt (used when selecting target "Custom AM37XX Board") or configuration_custom_omap35xx.txt (used when selecting target "Custom OMAP35xx Board".
Once the board configuration file has been created, it will need to be added to the content of omapflash2nd.txt, present in the application installation folder. (NOTE: in the case of the prebuilt custom files, this is already done for you). This file allows Flash to find the board configuration file. When modifying the file, simply add a new line to it:
<platform> <omap id> <omap version> <omap type> <second loader file> -pheripheralboot_reopen -board_config <board configuration file>
where <platform> is the platform name (use a new name for the new platform), <omap id> is an id number provided by the OMAP device during peripheral boot over UART or USB along with the <omap version> number, <omap type> specifies whether the OMAP detected should be a High Security 'HS' or General Purpose 'GP' type, <second loader file> specifies the second loader to use with the combination of <platform>, <omap id>, <omap version> and <omap type> and the <board configuration file> is the newly added board configuration.
An example could be:
SDP_MDDR_HYNIX_4G 363007 07 GP Targets\2nd-Downloaders\dnld_startup_omap3_gp_4g.2nd -pheriphalboot_reopen -board_config Targets\Configurations\configuration_sdp3630_hynix_4g.txt
Note that the installation currently comes with second loaders supporting memory sizes of 2 Gb, 4 Gb and 8 Gb for GP and HS devices:
dnld_startup_omap3_gp_2g.2nd - OMAP3 GP w 2 Gb SDRAM dnld_startup_omap3_gp_4g.2nd - OMAP3 GP w 4 Gb SDRAM dnld_startup_omap3_gp_8g.2nd - OMAP3 GP w 8 Gb SDRAM dnld_startup_omap3_hs_2g.2nd - OMAP3 HS w 2 Gb SDRAM dnld_startup_omap3_hs_4g.2nd - OMAP3 HS w 4 Gb SDRAM dnld_startup_omap3_hs_8g.2nd - OMAP3 HS w 8 Gb SDRAM dnld_startup_omap4_gp_2g.2nd - OMAP4 GP w 2 Gb SDRAM dnld_startup_omap4_gp_4g.2nd - OMAP4 GP w 4 Gb SDRAM dnld_startup_omap4_gp_8g.2nd - OMAP4 GP w 8 Gb SDRAM dnld_startup_omap4_hs_2g.2nd - OMAP4 HS w 2 Gb SDRAM dnld_startup_omap4_hs_4g.2nd - OMAP4 HS w 4 Gb SDRAM dnld_startup_omap4_hs_8g.2nd - OMAP4 HS w 8 Gb SDRAM
The reason for this is that there is a link-time dependency on the placement of the heap and external memory for the memory device drivers in SDRAM and on the location of the second loader components in internal memory between HS and GP devices. Pick the right one - e.g. if you have a 4 Gbit memory on an OMAP3 GP based board, use 'dnld_startup_omap3_gp_4g.2nd'.
Board configuration[edit]
In order to create the new file it is often useful to start with a copy of one of the existing files. The file has three main sections:
- 'use' directive, pointing to a definition file listing a number of OMAP registers and their addresses
- 'memory' directives, specifying the memories on the platform
- initialization commands, modifying registers to control the configuration of the OMAP to match the platform
Definitions[edit]
A 'use' directive can be used to point to a device definition file, e.g.:
use definitions_omap3.txt
Only one definition file can be used and it must be indicated before the first element using its definitions occurs in the configuration file. The device definition file basically holds a set of paired of labels and values. The labels can be used in the device configuration file in place of the values in order to make the device configuration file more readable. The syntax is as follows:
PRM_CLKSRC_CTRL 0x48307270 CM_CLKEN_PLL 0x48004D00 PRM_CLKSEL 0x48306D40 CM_CLKSEL1_PLL 0x48004D40 CM_CLKSEL2_PLL 0x48004D44 CM_CLKSEL3_PLL 0x48004D48
A maximum of 1000 definition pairs can be present in a definition file.
Memories[edit]
Memories are specified using the 'memory' directive:
memory NAME [driver DRIVER] [parameters PARAMETER1 VALUE1 PARAMETER2 VALUE2 ... PARAMETERN VALUEN]
An example of a memory specification could be:
memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000 bberase 0
where the device name is NAND and the driver required to access it is present in the binary file nand_onfi_16bit_8bit.bin (part of this distribution). The driver needs a number of configuration parameters for correct operation. These are passed directly to driver as written on the line following the 'parameters' keyword. This distribution contains a number of driver binaries for various memory types. At present these are:
File : nand_onfi_16bit_8bit.bin Type : NAND Parameters: gpmc (mandatory) Base address of the GPMC in the OMAP cs (mandatory) Chip select where the device is present (or GPMC-config index) address (mandatory) Address of the device as mapped in the GPMC bberase (mandatory) Erase bad blocks in the device (0 for no, 1 for yes). Caution: erasing bad blocks may cause an irreversible loss of manufacturing information. onfi (optional) Read and use ONFI device description from the device (0 for no, 1 for yes). bpp (mandatory if onfi = 0) Bytes per page if ONFI information is not used. sbpp (mandatory if onfi = 0) Spare bytes per page if ONFI information is not used. ppb (mandatory if onfi = 0) Pages per block if ONFI information is not used bpl (mandatory if onfi = 0) Blocks per logical unit if ONFI information is not used l (mandatory if onfi = 0) Logical unit count (only 1 supported by the driver) acv (mandatory if onfi = 0) Address cycle values - 8 bit value with lower 4 bits for row and upper 4 bits for column. f (mandatory if onfi = 0) Features - 16 bit value with bit 0 = 16 bit data operation, rest are don't-care Examples : memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000 bberase 0
memory NAND driver Targets\Flash-Drivers\nand_onfi_16bit_8bit.bin parameters gpmc 0x6E000000 cs 1 address 0x28000000 bberase 0 onfi 0 bpp 2048 sbpp 64 ppb 64 bpl 4096 l 1 acv 0x23 f 0x0019
For SDRAM, no driver is required, but the memory type must be specified with one parameter stating the base address in the memory map, e.g.:
memory SDRAM parameters address 0x80000000
Initialization of Target Device[edit]
A number of register operation commands can be used to configure the target device:
- WRITE - Write a value to a register
- MODIFY - Modify the value of a register
- POLL_ZERO - Poll a register value until zero
- POLL_NZERO - Poll a register value until not zero
- POLL_VALUE - Poll a register until value
- WAIT_N - Loop n times in a simple while-loop (where n is a value from 0x0000 to 0xFFFF)
- SPIN - Loop forever. This may be used for debugging.
- MODE_16 - Use 16 bit register access mode
- MODE_32 - Use 32 bit register access mode
The command structures are:
- WRITE : WRITE REGISTER VALUE
- MODIFY : MODIFY REGISTER MASK VALUE
- POLL_ZERO : POLL_ZERO REGISTER MASK
- POLL_NZERO : POLL_NZERO REGISTER MASK
- POLL_VALUE : POLL_VAL REGISTER MASK VALUE
- WAIT_N : WAIT_N N
- SPIN : SPIN
- MODE_16 : MODE_16
- MODE_32 : MODE_32
The definitions included from a definition file specified in a 'use' directive can be used with the commands. Definitions can be used for registers, values and masks, e.g.:
MODIFY CM_CLKEN_PLL_MPU EN_XXX_DPLL_MODE_MASK EN_XXX_DPLL_LOCK_MODE WRITE CM_CLKSEL3_PLL 0x00000009 POLL_ZERO CM_IDLEST_CKGEN ST_PERIPH_CLK_DPLL4_LOCKED
Archived Versions[edit]
AM35x/AM37x Flash Tool User's Guide for Sitara SDK 5.0.2 (Archived)