Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

TI816X C6A816x AM389x PSP Flashing Tools Guide

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
TI816X PSP Flashing Tools Guide
Linux PSP


IMPORTANT

TI816X refers to DM816X/AM816X devices unless specified.


Warning Warning: This user guide does not cover using CCS on Linux host and does not support makefile based build.

NoteNote: The pre-built flashing tools binaries provided with this release were tested with CCS 5.1.0.05000. Please re-build if you are using a different CCS version. Before connecting CCS, the bootswitch SW3 should be all 0's (BTMODE[4:0] = 00000). Make sure switch SW4 and SW1(in daughter card) is set as mentioned in EVM switch settings section in u-boot user guide for the respective boot media (NAND/SPI/NOR). Change bootswitch (SW3) to required bootmode only after flashing the image, this applies to all memory device (NAND/SPI/NOR).

 Read This First

About this Manual

This document describes steps to build the different flashing tools and procedure to use them on DM816x platform. In case you are using the pre-built binaries for the flash writers jump to section on Steps for Flashing

Setup

Starting CCS

  • System Requirements – CCS version 5.1.0.05000 installed on Windows XP
  • Make sure the Boot Mode / Configuration Select Switch is set for the respective boot mode
  • Connect the XDS560 emulator to the DM816x EVM
  • Start CCSv5 by navigating to 'Start' menu in Windows XP
  • Use target configuration file tools/DM816x.ccxml. If there is a need to create a new configuration, then follow steps below:
    • Select "View -> Target Configurations"
    • In the "Target Configurations" tab select "New Target Configuration File" button (in the top left corner)
    • Name the file (eg. ti816x_usb.ccxml)
    • Connection = Spectrum Digital TI XDS560V2 STM USB Emulator
    • Board or Device = TI816x
    • Save configuration
    • From next run, the project and target configuration will be readily available and can be skipped
  • Select "Debug Perspective" in CCS if not there already: "Window -> Open Perspective -> Debug"
  • Select "View" -> "Target Configurations"
  • Expand "User Defined" configuration tree, Right click on the newly created target configuration and select "Launch Selected Configuration"
  • This should launch debug session
  • In Debug view, (scroll till the end) Select "Spectrum Digital TI XDS560V2 STM USB Emulator_0/Cortex A8" connection.
  • Right click on the Cortex A8 core listed and click on "Connect Target"
  • A "Disassembly" view with PC halted should pop up in one of the tabs. If not, do a 'System Reset' from Target menu and then Halt (for GP device)

Loading GEL File

NoteNote: Flashing tool expects the GEL file to initialize the DDR and on-chip RAM. The File:DM816x gel.zip file in Linux PSP release is just for reference hence might not work on all boards. Please check the SDK release for latest GEL file. This gel file supports DDR3 by default. To use the gel file with DDR2 memory, set DDR3 macro as 0 and set DDR2 macro as 1. Also refer to comment next to the these macros in the gel file for commenting/un-commenting other required lines

  • Ensure that the GEL file File:DM816x gel.zip is copied to the Windows Machine
  • Select "Tools -> GEL Files" in CCS
  • This opens a new tab in the Debug view. On right hand side empty area in this window, right click and use "Load GEL"
  • Navigate to the directory containing gel file and select File:DM816x gel.zip
  • A "Scripts" menu item (on top) should now be visible
  • Select Scripts -> NETRA External Memory -> do_all
  • This will perform system initialization and basic setup needed to load programs to the Cortex A8 core on the EVM.
  • On success, you should see following at the CCS console:
....
....
....
PRCM for OCMCRAM0/1 Initialization Done  
  • Note that sometimes the Scripts menu is disabled. In this case, go to Debug window and select TI XDS560 Emulator_0/CortexA8 (top level node) and the Scripts menu should get activated.

Build

NoteNote: Both CCSv4 and CCSv5 are compatible with the following procedure.

Building NAND Flash Tool

NoteNote: Pre-built image is available in host-tools/nand-flash-writer.out

  • NAND flasher source should be available as part of DM816x release package under host-tools/src/nandflash-<version>.tar.gz
  • untar source zip
  • Start CCSv5 and import this project using following steps.
    • Start CCSv5 from windows start menu
    • Refer Starting CCS for remaining steps
    • Open Import dialogue box from File->Import
    • Expand CCS option and select Existing CCS/CCE Eclipse Project.
    • Click Browse button and select the NAND flasher folder.
    • Click on checkbox which says NAND Flasher and click Finish
  • From Project menu, click Clean and wait for clean operation to complete and then click Build All
  • The flashing tool out file (nand-flash-writer.out) should be available in NETRA/Debug

Building NOR Flash Tool

NoteNote: Pre-built image is available in host-tools/norflash-writer.out

  • NOR flasher source should be available as part of DM816x release package under host-tools/src/norflash-<version>.tar.gz
  • untar source zip
  • Start CCSV5 and import this project using following steps.
    • Start CCSv5 from windows start menu
    • Refer Starting CCS for remaining steps
    • Open Import dialogue box from File->Import
    • Expand CCS option and select Existing CCS/CCE Eclipse Project.
    • Click Browse button and select the NOR flasher folder.
    • Click on checkbox which says NOR Flasher and click Finish
  • From Project menu, click Clean and wait for clean operation to complete and then click Build All
  • The flashing tool out file (norflash-writer.out) should be available in ccsv4/Debug/


Building SPI Flash Tool

NoteNote: Pre-built image is available in host-tools/spi-flash-writer.out

  • SPI flasher source should be available as part of DM816x release package under hosst-tools/src/spiflash-<version>.tar.gz
  • untar source zip
  • Start CCSv5 and import this project using following steps.
    • Start CCSv5 from windows start menu
    • Refer Starting CCS for remaining steps
    • Open Import dialogue box from File->Import
    • Expand CCS option and select Existing CCS/CCE Eclipse Project.
    • Click Browse button and select the SPI flasher folder.
    • Click on checkbox which says SPI Flasher and click Finish
  • From Project menu, click Clean and wait for clean operation to complete and then click Build All
  • The flashing tool out file (spi-flash-writer.out) should be available in Debug/


Steps for Flashing

NoteNote: Both CCSv4 and CCSv5 are compatible with the following procedure.

Burning images to NAND Flash (using CCS)

This section describes how to burn an image to the NAND flash on the EVM. The pre-built NAND flashing tool should be available as part of PSP release package.

If daughter card is connected then SW1 on daughter card should be set to all off

  • Start CCS using steps mentioned in Starting CCS
  • Load GEL file using steps mentioned in Loading GEL
  • Ensure that the image (e.g. u-boot.noxip.bin) to be flashed is present in the Windows XP Machine
  • Load nand-flash-writer.out and run it ("Run -> Load -> Load Program" Navigate to "nand-flash-writer.out" file, open it and then run it). nand-flash-writer.out should be available in the release package
  • Start the application from Run -> Resume. Or hit F8
  • Select option 1 when prompted. Select option 2 only in case if you want to erase the whole NAND
    Choose your operation
    
    Enter 1 ---> To Flash an Image
    Enter 2 ---> To ERASE the whole NAND
    Enter 3 ---> To EXIT\n 
  • Enter the image path to flash when prompted as shown below. Provide the complete path and the file name should not have any white spaces (e.g. c:\u-boot.noxip.bin)
     Enter image file path
  • Enter the offset when prompted when prompted as shown below. This offset is the start location from where the image should be flashed. NOTE: Use hex format (Enter 0 for flashing u-boot image)


     Enter offset (in hex): 


  • Select ECC for flashing. Always select BCH8 for U-Boot as the ROM code uses the BCH8 ECC scheme. Enter 1 for u-boot. NOTE: Hamming code is not supported in this release
     Choose the ECC scheme from given options 
Enter 1 ---> BCH 8 bit
Enter 2 ---> HAM
Enter 3 ---> T0 EXIT
Please enter ECC scheme type :


  • Ensure that the flash info displayed by the tool matches the NAND flash in the EVM
  • After this the tool should first erase the required region in flash and then start flashing the new image.
  • Finally you should see the following message
     Application successfully flashed
NAND boot preparation was successful!
  • Disconnect CCS and then turn off the board

After flashing the image please refer PSP User-Guide on how to proceed further with U-Boot configuration and how to boot the kernel.

Burning images to NOR Flash (using CCS)

This section describes how to burn an image to the NOR flash on the EVM.

The pre-built NOR flashing tool binary should be available in the PSP release package. However the package does not come with pre-built U-Boot image for NOR. You will have to recompile U-Boot for NOR to generate the appropriate binary. Refer to Building U-Boot for NOR for steps on how to build U-Boot for NOR.

  • Start CCS using steps mentioned in Starting CCS
  • Load GEL file using steps mentioned in Loading GEL
  • Ensure that the image to be flashed is present in the Windows XP Machine
  • Load norflash-writer.out and run it ("Run -> Load -> Load Program" Browse to "norflash-writer.out" file, open it and then run it). norflash-writer.out should be available in the release package.
  • Start the application from Run -> Resume. Or hit F8
  • Enter the file name to flash when prompted as shown below. Provide the complete path and the file name should not have any white spaces (e.g. c:\u-boot.bin)
     Enter the File Name
  • Enter the offset when prompted as shown below. This offset is the start location from where the image should be flashed. NOTE: This offset should be in decimal and not in hex. For u-boot it should be 0.
     Enter the Offset in bytes (decimal)
  • The whole flash could be erased or only for the file size using the following option. You could enter either 0 or 1 based on the requirement. It is always recommended to use '1' for the first time and after that use '0' so that we would not erase anything which was flashed separately (like u-boot environment) after first time erase.
 Erase Options:
---------------
 0 -> Erase Only Required Region
 1 -> Erase Whole Flash
Enter Erase Option:
  • After this the tool should first read the data from the Image file (this would take couple of minutes) then erase the flash and then start flashing the new image.
  • Finally you should see the following message
     !!! Successfully Flashed !!!
  • Turn off the board and disconnect the CCS from the device

After flashing the image please refer PSP User-Guide on how to proceed further with U-Boot configuration and how to boot the kernel.

Burning images to SPI Flash (using CCS)

This section describes how to burn an image to the SPI flash on the EVM. The pre-built SPI flashing tool binary should be available in the PSP release package.

  • Start CCS using steps mentioned in Starting CCS
  • Load GEL file using steps mentioned in Loading GEL
  • Ensure that the image (e.g. u-boot.noxip.bin.spi) to be flashed is present in the Windows XP Machine
  • Load spi-flash-writer.out and run it ("Run -> Load -> Load Program" Navigate to "spi-flash-writer.out" file, open it and then run it). spi-flash-writer.out should be available in the release package
  • Start the application from Run -> Resume. Or hit F8
  • Ensure that the flash info displayed by the tool matches the spi flash in the EVM
  • Enter the file name to flash when prompted as shown below. Provide the complete path and the file name should not have any white spaces (e.g. c:\u-boot.noxip.bin.spi)
     Enter the File Name
  • Enter the offset when prompted when prompted as shown below. This offset is the start location from where the image should be flashed. NOTE: This offset should be in decimal and not in hex. In case of u-boot offset should be 0.
     Enter the Offset in bytes (decimal)
  • After this, the tool should first erase the flash and then start flashing the new image.

Warning Warning: After printing few lines of progress (debug) prints, the CCS IDE will become non responsive. We have observed this issue with some CCS versions (CCSv5.1.0.05000). Please be patient till you see the below message.

     Verifying...Success
  • Turn off the board and disconnect the CCS from the device.

After flashing the image please refer PSP User-Guide on how to proceed further with U-Boot configuration and how to boot the kernel.