*******************************************************************************
*                          EB07 software update package                       *
*******************************************************************************

Introduction
============
This package contains all data files and tools to update the software of a EB07.


Folder structure
================
After unpacking the archive this folder structure should exist:
    data:       Contains the data files for the EB07 (Uboot binary, Kernel binary, 
                Root file system image, Flattened device tree blob)
    scripts:    TeraTerm scripts that do the work
    tftp:       Contains the Tftpd32 program (a open source tftp server)
    tterm:      Contains the TeraTerm program (a open source terminal program)
    eb07_init:  TriCore application that initializes the EB07 (source code, you 
                can just use the result file eb07_init.hex)
	

Configuration
=============
PC setup:
---------
Make sure there is a folder C:\Temp existing on your PC (case sensitive!!!).


Hardware setup:
---------------
Connect the RS232 interface of the EB07 board to your host PC. The whole update can be 
downloaded via this line. Due to the limited speed of the RS232 (@115 kBaud) the update
takes up to 1 hour. 
For a faster download additionally connect the ethernet interface of the EB07
directly to your host PC (Crossover cable!) or to your private / companies network and
use the TFTP download feature.

To test the RS232 connection open a terminal program on the host PC (e.g Hyperterm or the 
TeraTerm (supplied in the tterm folder)) and setup the serial port where the EB07 is 
connected to with this settings: 115200 baud, 1 stop bit, no parity bit, no handshake.
Switch on the power supply of the ESX3XL controller. You should see the boot messages
of the Uboot and Linux kernel in the terminal. 


Software setup:
---------------
ESX3XL TriCore side:
On the ESX3XL TriCore controller there must be a software installed that initializes the EB07.
Only the functions x_sys_init() and x07_sys_init() have to be called. This is setting the 
"ignition" signal for the EB07 to indicate power-on of the controller. Else the Linux system
would permanentely reboot and the last update procress, which is "preparing NAND dataflash" 
would fail.
You can prepare your own application for that or just flash the supplied file "eb07_init.hex" 
to the controller via WinFlash.

HINT: 
The update process is done via the uboot bootloader. The uboot is controlled from the 
host PC via the RS232 inteface of the EB07. The Ethernet interface is used to download the 
data files (kernel, rootfs, uboot) via the TFTP protocol. 
A TriCOre program using the EB07 library to setup / control the EB07 board is communicating
with the Linux system on the EB07. During the update process, the Linux system is not running, 
but only the uboot bootloader is active. Thus, e.g. the ethernet interface (and all other things
regarding the EB07) can not be configured from the TriCore side in this case. Furthermore, calling
any other EB07 library function than x07_sys_init() would fail and possibly lead to unexpected 
behaviour.
==> For the data file download during the update process, the ethernet interface is configured
    with the settings defined in the config.ttl file via the command line (RS232 interface) 
	 of the uboot.
	 

EB07 side:
You only need to edit the file config.ttl. Only few settings are required:
   - Select serial port:        Variable VarComPort must be set to the correct serial port.
                                There is a list of serial ports in the file. Just uncomment 
                                the line with your port number and make sure all other lines 
                                in the list are commented out (semicolon at the beginnig of                                 
                                the line). When downloading the update via serial line no 
                                more settings are required.
   - Ethernet/IP settings:      set variable VarTftpDownload = 1 (uncomment line) to enable 
                                tftp download and enter ip settings (EB07 IP, network mask, 
                                gateway IP and host PC IP)
	
CAUTION:    Do not make any other changes then described above to the config.ttl script 
            nor to any other scripts supplied with this update package!

			
Start Update
============
Switch off the ESX3XL controller. Start the batch file update_eb07.bat to start the update. 
The batch file opens the Tftpd32 and the TeraTerm programs and starts the update script.
Switch on the controller when the script prompts for it.

*****************************************************************************************
CAUTION: Do not interrupt the update process!!! For the update a valid Uboot must be 
         installed on the EB07. If the update process is interrupted during update 
         of the Uboot (next to last update step, takes only few seconds), it is not possible 
         to access the board from an external interface any more. The controller has 
         to be sent back to STW for  reprogramming.
         Interrupting the update process during any other step is not too critical, since
         it can just be restarted.
*****************************************************************************************


Logging / Trouble shooting
==========================
The complete data traffic between the host PC and the EB07 is logged into the file 
eb07_update_log.txt. If any problem during the update occur please contact STW and 
attach the log file. 
The log file is located in the same directory as the update_eb07.bat
file.

