| 1 | /**************************************************************** |
|---|
| 2 | * TI DM644x Serial Application Flasher (DVFLasher) |
|---|
| 3 | * (C) 2007, Texas Instruments, Inc. |
|---|
| 4 | * |
|---|
| 5 | * History: 1/22/2007 - v1.00 release |
|---|
| 6 | * |
|---|
| 7 | ****************************************************************/ |
|---|
| 8 | |
|---|
| 9 | Running |
|---|
| 10 | ======= |
|---|
| 11 | |
|---|
| 12 | - Under Windows - |
|---|
| 13 | This application can be run from the commandline under Windows with |
|---|
| 14 | the .Net Framework 2.0 or later installed. |
|---|
| 15 | |
|---|
| 16 | DVFlasher.exe [options] |
|---|
| 17 | |
|---|
| 18 | - Under Linux - |
|---|
| 19 | It can also be run on a Linux machine with the latest open-source Mono |
|---|
| 20 | Framework installed. |
|---|
| 21 | |
|---|
| 22 | mono DVFlasher.exe [options] |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | Compiling |
|---|
| 26 | ========= |
|---|
| 27 | |
|---|
| 28 | A makefile is included for compiling the host application and the associated |
|---|
| 29 | UBL files (a NAND UBL and a NOR UBL). The make command should be run from |
|---|
| 30 | the top-level directory (the one containing the 'DVFlasher' and the 'ubl' |
|---|
| 31 | directories). The UBL binaries are generated first. These binary files are |
|---|
| 32 | then embedded into the DVFlasher executable when it is compiled. When |
|---|
| 33 | DVFlasher is run, one of these is downloaded to the DM644x via the ROM |
|---|
| 34 | boot loader(RBL). If the download is successful, the RBL passes execution |
|---|
| 35 | control to the UBL. The host application continues running and interfacing |
|---|
| 36 | to the UBL to perform the function specified by the command-line options. |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | - Under Windows - |
|---|
| 40 | The currently supported method is to use the Cygwin enviroment (such as |
|---|
| 41 | the one provided with the Montavista Linux tools for Windows) and put the |
|---|
| 42 | C sharp compiler's (the csc.exe executable) install location in the user's |
|---|
| 43 | path. This compiler comes with the .NET Framework installation and can |
|---|
| 44 | usually be found in C:\WINDOWS\Microsoft.NET\Framework\<version number>. |
|---|
| 45 | Then go to the top level directory of the package and run: |
|---|
| 46 | |
|---|
| 47 | make |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | - Under Linux - |
|---|
| 51 | The Mono Framework must be installed and in the path. RPMs are available |
|---|
| 52 | at 'http://www.mono-project.com/Downloads'. Then go to the top level |
|---|
| 53 | directory of the package and run: |
|---|
| 54 | |
|---|
| 55 | make |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | Custom Board Usage |
|---|
| 59 | ================== |
|---|
| 60 | |
|---|
| 61 | Note that to use aplication for flashing on a cutom PCB (not the DVEVM), |
|---|
| 62 | you will almost certainly need to modify some initialization code in the |
|---|
| 63 | UBL, specifically for the DDR2 RAM. All of these customizations can be |
|---|
| 64 | found in the 'dm644x.c' source file. Use values calculated using the |
|---|
| 65 | formulas in the DDR2 Memory Controller User's Guide (SPRUE22). |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | DM6441 and DM6441 Low Voltage Support |
|---|
| 69 | ===================================== |
|---|
| 70 | The UBLs and host application compile by default to support the DM6446 |
|---|
| 71 | and DM6443 devices (DSP @ 594 MHz, ARM @ 297 MHz, DDR @ 162 MHz). The |
|---|
| 72 | makefiles support building the UBLs and the host application for the |
|---|
| 73 | DM6441 (DSP @ 513 MHz, ARM @ 256 MHz, DDR @ 162 MHz) and the DM6441 |
|---|
| 74 | Low Voltage (DSP @ 405 MHz, ARM @ 202 MHz, DDR @ 135 MHz) devices. To do |
|---|
| 75 | this use the following commands from the top level directory |
|---|
| 76 | |
|---|
| 77 | make DM6441 |
|---|
| 78 | make DM6441_LV |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | Switch and Jumper Settings for DVEVM |
|---|
| 82 | ==================================== |
|---|
| 83 | |
|---|
| 84 | On the DVEVM you need to make sure the S3-3 switch and J4 jumper are |
|---|
| 85 | correctly set for the flash type you will be using and to boot in UART |
|---|
| 86 | boot mode |
|---|
| 87 | |
|---|
| 88 | NOR - J4=FLASH, S3[1..4] = 1110 (UART boot, 16-bit AEMIF, ARM boots DSP) |
|---|
| 89 | NAND - J4=NAND, S3[1..4] = 1100 (UART boot, 8-bit AEMIF, ARM boots DSP) |
|---|
| 90 | |
|---|
| 91 | To run the DVEVM demos with the ARM set to boot the DSP, also make sure you |
|---|
| 92 | are using the latest U-boot sources from TI. |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | Usage |
|---|
| 96 | ===== |
|---|
| 97 | Use of the application is simple, but if you need more info type |
|---|
| 98 | DVFlasher.exe -h |
|---|
| 99 | |
|---|
| 100 | 1) Global Erase of NOR Flash (this is recommended to start if you are |
|---|
| 101 | using this application to restore your flash to a bootable state) |
|---|
| 102 | |
|---|
| 103 | DVFlasher.exe -enor |
|---|
| 104 | |
|---|
| 105 | 2) Global Erase of NAND Flash (this is recommended to start if you are |
|---|
| 106 | using this application to restore your flash to a bootable state) |
|---|
| 107 | |
|---|
| 108 | DVFlasher.exe -enand |
|---|
| 109 | |
|---|
| 110 | 3) Restore the NOR Flash to a bootable state: |
|---|
| 111 | |
|---|
| 112 | DVFlasher.exe -r u-boot-xxx-nor.bin |
|---|
| 113 | |
|---|
| 114 | where xxx=567 or 594. |
|---|
| 115 | |
|---|
| 116 | 4) Boot/Run an application over UART. |
|---|
| 117 | |
|---|
| 118 | DVFlasher.exe -b <application file> |
|---|
| 119 | |
|---|
| 120 | where <application file> is a binary or S-record file that you want |
|---|
| 121 | the board to execute out of RAM. This application will be downloaded |
|---|
| 122 | over the UART and execution will pass from the UBL to the application. |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | Advanced Usage |
|---|
| 126 | ============== |
|---|
| 127 | 1) Flash an s-record application image (like u-boot) to NAND along with |
|---|
| 128 | the necessary UBL image and headers needed to boot out of NAND. |
|---|
| 129 | |
|---|
| 130 | DVFlasher.exe -fnandsrec u-boot-nand.bin |
|---|
| 131 | |
|---|
| 132 | 2) Flash a binary application image (like u-boot) to NAND along with |
|---|
| 133 | the necessary UBL image and headers needed to boot out of NAND. |
|---|
| 134 | |
|---|
| 135 | DVFlasher.exe -fnandbin u-boot-nand.bin |
|---|
| 136 | |
|---|
| 137 | Note: There are no 594 and 567 versions of the NAND u-boot since in the |
|---|
| 138 | NAND boot mode the UBL turns on the PLL and memory. If you need 567 |
|---|
| 139 | frequency settings you will need to edit the provided UBL code in |
|---|
| 140 | 'dm644x.c' to acheive this. |
|---|
| 141 | |
|---|
| 142 | 3) Flash an s-record application image (like u-boot) to NOR along with |
|---|
| 143 | the necessary UBL image and headers needed to boot out of NOR. In |
|---|
| 144 | this case the UBL image is placed at the beginning of NOR and will |
|---|
| 145 | run out of reset. The UBL will find the application image in NOR and |
|---|
| 146 | load it to RAM to run. |
|---|
| 147 | |
|---|
| 148 | DVFlasher.exe -fnorsrec <special u-boot>.bin |
|---|
| 149 | |
|---|
| 150 | 4) Flash an binary application image (like u-boot) to NOR along with |
|---|
| 151 | the necessary UBL image and headers needed to boot out of NOR. In |
|---|
| 152 | this case the UBL image is placed at the beginning of NOR and will |
|---|
| 153 | run out of reset. The UBL will find the application image in NOR and |
|---|
| 154 | load it to RAM to run. |
|---|
| 155 | |
|---|
| 156 | DVFlasher.exe -fnorbin <special u-boot>.bin |
|---|
| 157 | |
|---|
| 158 | NOTE: The provided NOR U-boot images do not work in this fashion, since |
|---|
| 159 | they include automatic relocation code. You must compile a special |
|---|
| 160 | u-boot (or your own application) that can run directly out of RAM. |
|---|
| 161 | The included u-boot-uart.bin works in this fashion but is very |
|---|
| 162 | limited since it can't access flash memory. |
|---|
| 163 | |
|---|
| 164 | NOTE: The S-record image is more secure since checksums are performed on |
|---|
| 165 | the data as it is copied from flash to RAM, but the S-record image |
|---|
| 166 | is approximately three times bigger than the binary image. |
|---|
| 167 | |
|---|
| 168 | |
|---|
| 169 | Other Options |
|---|
| 170 | ============= |
|---|
| 171 | |
|---|
| 172 | -p <COM PORT NAME> : Allows specifying com port other than default 'COM1' |
|---|
| 173 | or '/dev/ttyS0'. |
|---|
| 174 | -s <APP Start Addr> : Allows specifying the memory address location that |
|---|
| 175 | downloaded application code will run from. |
|---|
| 176 | -h : Show help text. |
|---|
| 177 | -v : See verbose output from the DM644x. |
|---|
| 178 | -noRBL : If the board is booting the supplied UART UBL (you |
|---|
| 179 | see BOOTPSP, instead of BOOTME), use this to skip |
|---|
| 180 | sending the UART UBL, and start by sending a command |
|---|
| 181 | -useMyUBL <UBLFILE> : Use this provide your own UBL that will be put in |
|---|
| 182 | flash and will be used for booting (either NAND or |
|---|
| 183 | NOR depending on how your own UBL is written). Note |
|---|
| 184 | that this option does not affect the UBL that is |
|---|
| 185 | used to communicate over the UART (the one that is |
|---|
| 186 | sent via the RBL - referred to as the UART UBL). |
|---|
| 187 | Also note that this option must be used with one of |
|---|
| 188 | the flashing commands (fnorsrec,fnorbin,fnandsrec, |
|---|
| 189 | or fnandbin) |
|---|
| 190 | |
|---|
| 191 | |
|---|
| 192 | |
|---|