/**
  @page binary_template AN3310 Binary Template Readme file
  
  @verbatim
  ******************** (C) COPYRIGHT 2012 STMicroelectronics *******************
  * @file    STM32L1xx_IAP/binary_template/readme.txt 
  * @author  MCD Application Team
  * @version V1.1.0
  * @date    24-January-2012
  * @brief   Description of the binary_template directory.
  ******************************************************************************
  * 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.
  *
  * FOR MORE INFORMATION PLEASE READ CAREFULLY THE LICENSE AGREEMENT FILE
  * LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
  *
  ******************************************************************************
   @endverbatim

@par Description

This directory contains a set of sources files that build the application to be
loaded into Flash memory using In-Application Programming (IAP, through USART).

To build such application, some special configuration has to be performed:
1. Set the program load address at 0x08003000, using your toolchain linker file
2. Relocate the vector table at address 0x08003000, using the "NVIC_SetVectorTable"
   function.

The SysTick example provided within the STM32L1xx Standard Peripherals library 
examples is used as illustration.
This example configures the SysTick to generate a time base equal to 1 ms.
The system clock is set to the maximum system frequency, the SysTick is clocked by 
the AHB clock (HCLK). A "Delay" function is implemented based on the SysTick 
end-of-count event.
Four LEDs are toggled with a timing defined by the Delay function.


@par Directory contents 

 - "STM32L1xx_IAP\binary_template\EWARM": This folder contains a pre-configured project 
                                          file that produces a binary image of SysTick 
                                          example to be loaded with IAP.

 - "STM32L1xx_IAP\binary_template\RIDE": This folder contains a pre-configured project file 
                                         that produces a binary image of SysTick example 
                                         to be loaded with IAP.

 - "STM32L1xx_IAP\binary_template\MDK-ARM": This folder contains a pre-configured project 
                                            file that produces a binary image of SysTick 
                                            example to be loaded with IAP.

- "STM32L1xx_IAP\binary_template\HiTOP": This folder contains a pre-configured project file 
                                         that produces a binary image of SysTick example 
                                         to be loaded with IAP.

 - "STM32L1xx_IAP\binary_template\TrueSTUDIO": This folder contains a pre-configured project 
                                               file that produces a binary image of SysTick 
                                               example to be loaded with IAP.

 - "STM32L1xx_IAP\binary_template\inc": contains the binary_template firmware header files 
     - STM32L1xx_IAP/binary_template/inc/stm32l1xx_conf.h    Library Configuration file
     - STM32L1xx_IAP/binary_template/inc/stm32l1xx_it.h      Header for stm32l1xx_it.c
     - STM32L1xx_IAP/binary_template/inc/main.h              Header for main.c

 - "STM32L1xx_IAP\binary_template\src": contains the binary_template firmware source files 
     - STM32L1xx_IAP/binary_template/src/main.c              Main program
     - STM32L1xx_IAP/binary_template/src/stm32l1xx_it.c      Interrupt handlers
     - STM32L1xx_IAP/binary_template/src/system_stm32l1xx.c  STM32L1xx system source file

@note The "system_stm32l1xx.c" is generated by an automatic clock configuration 
      system and can be easily customized to your own configuration. 
      To select different clock setup, use the "STM32L1xx_Clock_Configuration_V1.1.0.xls" 
      provided with the AN3309 package available on <a href="http://www.st.com/internet/mcu/family/141.jsp">  ST Microcontrollers </a>
         
@par Hardware and Software environment

  - This example runs on STM32L1xx Ultra Low Power High- and Medium-Density Devices.
  
  - This example has been tested with STMicroelectronics STM32L152D-EVAL (STM32L1xx 
    Ultra Low Power High-Density) and STM32L152-EVAL (STM32L1xx Ultra Low 
    Power Medium-Density) evaluation board and can be easily tailored to any 
    other supported device and development board.

  - STM32L152-EVAL Set-up 
    - Use LED1, LED2, LED3 and LED4 connected respectively to PD.00, PD.01, PD.04
      and PD.05 pins.
    - Make sure that JP18 and JP19 are closed.
    
  - STM32L152D-EVAL Set-up 
    - Use LED1, LED2, LED3 and LED4 connected respectively to PD.03, PD.07, PG.14
      and PG.15 pins.

@par How to use it ?  

In order to load the SysTick example with the IAP, you must do the following:

 - EWARM:
    - Open the SysTick.eww workspace
    - In the workspace toolbar select the project config:
        - STM32L152-EVAL: to configure the project for STM32L Ultra Low Power Medium-Density devices
        - STM32L152D-EVAL: to configure the project for STM32L Ultra Low Power High-Density devices
    - Rebuild all files: Project->Rebuild all
    - A binary file "STM32L152-EVAL_SysTick.bin"("STM32L152D-EVAL_SysTick.bin") will be generated under 
      "STM32L152-EVAL\Exe"("STM32L152D-EVAL\Exe") folder depending on the selected configuration.  
    - Finally load this image with IAP application

 - RIDE:
    - Open the SysTick.rprj project
    - In the configuration toolbar(Project->properties) select the project config:
        - STM32L152-EVAL: to configure the project for STM32L Ultra Low Power Medium-Density devices
        - STM32L152D-EVAL: to configure the project for STM32L Ultra Low Power High-Density devices
    - Rebuild all files: Project->build project
    - Go to "Utilities\Binary" directory and run "hextobin.bat"
    - A binary file "STM32L152-EVAL_SysTick.bin"("STM32L152D-EVAL_SysTick.bin") will be generated under 
      "\STM32L152-EVAL"("\STM32L152D-EVAL") folder depending on the selected configuration. 
    - Finally load this image with IAP application

 - MDK-ARM:
    - Open the SysTick.uvproj project
    - In the build toolbar select the project config:
        - STM32L152-EVAL: to configure the project for STM32L Ultra Low Power Medium-Density devices
        - STM32L152D-EVAL: to configure the project for STM32L Ultra Low Power High-Density devices
    - Rebuild all files: Project->Rebuild all target files
    - Go to "Utilities\Binary" directory and run "axftobin.bat"
    - A binary file "STM32L152-EVAL_SysTick.bin"("STM32L152D-EVAL_SysTick.bin")will be generated under 
      "\STM32L152-EVAL" ("\STM32L152D-EVAL")folder depending on the selected configuration. 
    - Finally load this image with IAP application

- HiTOP
    - Open the HiTOP toolchain.
    - Browse to open the Project.htp
        - STM32L152-EVAL: to configure the project for STM32L Ultra Low Power Medium-Density devices
        - STM32L152D-EVAL: to configure the project for STM32L Ultra Low Power High-Density devices
    - A "Download application" window is displayed, click "cancel".
    - Rebuild all files: Project->Rebuild all
    - Go to "Utilities\Binary" directory and run "hextobin.bat".
    - A binary file "STM32L152-EVAL_SysTick.bin" ("STM32L152D-EVAL_SysTick.bin")will be generated under "\." 
      folder
    - Finally load this image with IAP application
    
 - TrueSTUDIO:
    - Open the TrueSTUDIO toolchain.
    - Click on File->Switch Workspace->Other and browse to TrueSTUDIO workspace directory.
    - Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next". 
    - Browse to the TrueSTUDIO workspace directory, select the project:
        - STM32L152-EVAL: to configure the project for STM32L Ultra Low Power Medium-Density devices
        - STM32L152D-EVAL: to configure the project for STM32L Ultra Low Power High-Density devices
    - Under Windows->Preferences->General->Workspace->Linked Resources, add 
      a variable path named "CurPath" which points to the folder containing
      "Libraries", "Project" and "Utilities" folders.
    - Rebuild all project files: Select the project in the "Project explorer" 
      window then click on Project->build project menu.
    - Go to "Utilities\Binary" directory and run "TrueSTUDIO_elf2bin.bat"
    - A binary file "STM32L152-EVAL_SysTick.bin" ("STM32L152D-EVAL_SysTick.bin")will be generated under "\Debug" 
      folder
    - Finally load this image with IAP application

@note
- Ultra Low Power Medium-density devices are STM32L151xx and STM32L152xx 
  microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
- Ultra Low Power Medium-density Plus devices are STM32L151xx, STM32L152xx and 
  STM32L162xx microcontrollers where the Flash memory density is 256 Kbytes.
- Ultra Low Power High-density devices are STM32L151xx, STM32L152xx and STM32L162xx 
  microcontrollers where the Flash memory density is 384 Kbytes.

 * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
 */
