/**
  STM32469I-DISCO Demonstration Firmware
 
  ******************** (C) COPYRIGHT 2017 STMicroelectronics *******************
  * @file    Demonstrations/readme.txt 
  * @author  MCD Application Team; edited by SEGGER
  * @brief   Description of STM32469I-DISCO Demonstration
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2017 STMicroelectronics International N.V. 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without 
  * modification, are permitted, provided that the following conditions are met:
  *
  * 1. Redistribution of source code must retain the above copyright notice, 
  *    this list of conditions and the following disclaimer.
  * 2. Redistributions in binary form must reproduce the above copyright notice,
  *    this list of conditions and the following disclaimer in the documentation
  *    and/or other materials provided with the distribution.
  * 3. Neither the name of STMicroelectronics nor the names of other 
  *    contributors to this software may be used to endorse or promote products 
  *    derived from this software without specific written permission.
  * 4. This software, including modifications and/or derivative works of this 
  *    software, must execute solely and exclusively on microcontroller or
  *    microprocessor devices manufactured by or for STMicroelectronics.
  * 5. Redistribution and use of this software other than as permitted under 
  *    this license is void and will automatically terminate your rights under 
  *    this license. 
  *
  * THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" 
  * AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT 
  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
  * PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY
  * RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT 
  * SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  ******************************************************************************

Demo Description

The STM32Cube Demonstration platform comes on top of the STM32CubeTM as a firmware
package that offers a full set of software components based on a modules architecture
allowing re-using them separately in standalone applications. All these modules are
managed by the STM32Cube Demonstration kernel allowing to dynamically adding new
modules and access to common resources (storage, graphical components and widgets,
memory management, Real-Time operating system)

The demonstration firmware is built around the graphical library STemWin and the FreeRTOS 
real time operating system and uses almost the whole STM32 capability to offer a large scope
of usage based on the STM3Cube HAL, BSP and several Middleware components.


The STM32 F4 demonstration is running on STM32469I-DISCOVERY boards RevB.
Below you find an overview of the different offered module in the demonstration:

 + Video player
 --------------
 The video player module provides a video solution based on the STM32F4xx and STemWin
 movie API. It supports playing movie in emf format.
 
 + Audio player
 --------------
 The audio player module provides a complete audio solution based on the STM32F4xx and
 delivers a high-quality music experience. It supports playing music in WAV format from USB stick but may
 be extended to support other compressed formats such as MP3 and WMA audio formats.
 The Module supports background mode feature.
 
 + Audio recorder
 -----------------
 The audio recorder module allows recording audio via the on-board microphones and playing it back.
 The recorded files are stored in USB Disk flash (USB High Speed).
 Listen to the recorded audio by inserting headphones into the AUDIO JACK (CN3).
 
 + Home alarm
 ------------ 
 Control of Home alarm system, equipped with cameras.
 Static picture shown when a room is selected and then the camera icon pressed
 General room alarm activation/deactivation when pressed.
 
 + Gardening control
 -------------------
 The gardening control module provides a graphic garden watering system behaviour
 
 + Game
 ------
 The game coming in the STM32Cube demonstration is based on the Reversi game. It is a
 strategy board game for two players, played on an 8×8 board. The goal of the game is to
 have the majority of disks turned to display your color when the last playable empty square
 is filled.
 
 + System Info
 --------------  
 The system info module provides information about the core, supported eval boards, 
 CPU speed and demonstration version.
 
 For more details about the demonstration modules please refers to STM32CubeF4 demonstration (UM1743)
 
      
Hardware and Software environment

  - This application runs on STM32F469xx devices.  

  - This example has been tested with STMicroelectronics STM32469I_DISCOVERY
    boards RevB and can be easily tailored to any other supported device and development board.
	
  - Jumpers configuration:
    - JP5	Fitted (Power on MCU)
	
  - This version contains a project file for the SEGGER Embedded Studio IDE (v3.41 or higher) 	
	

How to use it ? 

In order to make the demo program work, you must do the following:
 - Download and install SEGGER Embedded Studio for Arm v3.41 or higher from https://www.segger.com/downloads/embedded-studio/ 
 - Start SEGGER Embedded Studio
 - Open the Demo Project (File|Open Solution) at this location:
   "C:\...\STM32F469I-D-DP\Project\STM32469I-Discovery\Demonstrations\STemWin\SES\STM32469I-DISCO_Demo\project.emproject"
 - Rebuild all files (Build|Build Solution)

After building, in order to download and run the program using the SEGGER Embedded Studio IDE, do the following:
 - Replace the ST-Link debugger firmware in the STM32F469I-DISCO board with the J-Link debugger firmware
   using the SEGGER STLinkReflash utility as described here:
   https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
   (You will be able to restore the ST-Link firmware later on if desired) 
 - Connect the STM32469I-DISCO board to your PC with a USB cable via connector CN1 (=> J-Link OnBoard)
 - Optional: Copy the audio and video files provided under "Utilities/Media/Audio" and "Utilities/Media/Video" to the root of a USB stick
             and plug the USB stick into the USB HS connector (CN13) of the STM32F469I-DISCO board (via a Micro USB 'B' male to USB 'A' female adapter cable)
 - Start a debug session in SEGGER Embedded Studio (Debug|Go)
   The code gets downloaded onto the board and execution halts at main().
 - Select Debug|Go again to run the demonstration
 - Select Debug|Break to halt execution 
 - Select Debug|Stop to terminate the debug session

     
Pre-built option:
	 
You can also download the pre-built .hex file into your STM32469I-DISCO as follows:
 - Replace the ST-Link debugger firmware in the STM32F469I-DISCO board with the J-Link debugger firmware
   using the SEGGER STLinkReflash utility as described here:
   https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
   (You will be able to restore the ST-Link firmware later on if desired) 
 - Connect the STM32F469I-DISCO board to your PC with a USB cable via connector CN1 (=> J-Link OnBoard)
 - Navigate to the "C:\...\STM32F469I-D-DP\Prebuilt\" folder
 - Double-click "StartBinary.bat" to program both internal Flash and external QSPI memory (this will take 1-2 minutes)
 - The demonstration will run automatically after download is complete.

  
COPYRIGHT STMicroelectronics / SEGGER Microcontroller GmbH
 
