/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name          : readme.txt
* Author             : MCD Application Team
* Version            : V2.0.0
* Date               : 08/08/2008
* Description        : Description of the STR91x IAP via UART usign the Ymodem 
*                      Protocol.
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/


Example description
===================
This demo shows how to perform the In-Application Programming via UART of the STR91x 
Flash memory using the YMODEM protocol.

Directory contents
==================
 + \include    contains the IAP firmware header files
 + \project    contains pre-configured projects for RVMDK, EWARM5, RIDE and EWARM4
               toolchains
 + \source     contains the IAP firmware source files

Hardware environment
====================
This example runs on STMicroelectronics STR91x-EVAL evaluation board and can be 
easily tailored to any other hardware.

 + Connect a null-modem female/female RS232 cable between the DB9 connector 
      CN8 (UART1) and PC serial port.
 
 + Hyperterminal configuration:
    - Word Length = 8 Bits
    - One Stop Bit
    - No parity
    - BaudRate = 115200 baud
    - flow control: None 


How to use it
=============
In order to make the program work, you must do the following:

1. Remap the banks of the internal flash memory like this:
   - Bank 1 at 0x00 and make it the boot bank at power up. 
   - Bank 0 at 0x80000(for 256K/512K) or 0x200000(for 1M/2M)
   

2. Generate a binary image for the pogram provided in the \Examples\Compiled Example\project
 directory
3. Program the internal Flash with the IAP (see below) 
4. Open a HyperTerminal window using the settings already defined in section
   "Hardware environment"
5. To run the IAP driver, keep the push-button (Key push-button on STR91x EVAL
    board) pressed at Reset. The IAP main menu is then displayed on
   the HyperTerminal window.
6. To download an application, press 1 and use the Ymodem protocol 

In order to load the IAP code, you have do the following:
 + EWARMv4:
    - Open the STR91x_IAP.eww workspace
    - Rebuild all files: Project->Rebuild all
    - Load the image into the Bank1 Flash memory using the flash loader file 
    "FlashSTR91x_256_512K.d79" or "FlashSTR91x_1_2M.d79" provided with the project
    - Load project image: Project->Debug
    - Run program: Debug->Go(F5)

 + EWARMv5:
    - Open the STR91x_IAP.eww workspace
    - Rebuild all files: Project->Rebuild all
    - Load the image into the Bank1 Flash memory
    - Load project image: Project->Debug
    - Run program: Debug->Go(F5)


 + RIDE
    - Open the STR91x_IAP.rprj project
    - Rebuild all files: Project->build project
    - Load project image: Debug->start(ctrl+D)
    - Run program: Debug->Run(ctrl+F9)

 + RVMDK
    - copy the STR91x_Bank1_128.FLX and STR91x_Bank1_32.FLX into:
    \Keil\ARM\Flash
    - Open the STR91x_IAP.Uv2 project    
    - Load project image: Debug->Start/Stop Debug Session
    - Run program: Debug->Run (F5)   

******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****
