*****************************************************************************
** ChibiOS/RT setup for IAR                                                **
*****************************************************************************

** TARGET **

This IAR project is for the STM32L476 processor running on the ST Nucleo L476RG development board.


** IAR Configuration details **

In IAR Project/options:
General Options:
  Target:
    - device: ST STM32L476RG
    - FPU: VFPv4-SP
  Library Conf:
    - Semihosting
    - Via semihosting
  C/C++ Compiler:
     Optimizations
       Level: 
         - None (to allow line by line debugging)
     Preprocessor (an easy way to update this in to copy all fields, modify it in an external editor, paste back into this field).
       Preprocessor setting for this project are:
			$PROJ_DIR$\..\
			$PROJ_DIR$\..\..\..\..\os\common\ports\ARMCMx\devices\STM32L4xx
			$PROJ_DIR$\..\..\..\..\os\ext\CMSIS\include
			$PROJ_DIR$\..\..\..\..\os\ext\CMSIS\ST\STM32L4xx
			$PROJ_DIR$\..\..\..\..\os\rt\ports\ARMCMx
			$PROJ_DIR$\..\..\..\..\os\rt\ports\ARMCMx\compilers\IAR
			$PROJ_DIR$\..\..\..\..\os\rt\include
			$PROJ_DIR$\..\..\..\..\os\hal\osal\rt
			$PROJ_DIR$\..\..\..\..\os\hal\include
			$PROJ_DIR$\..\..\..\..\os\hal\boards\ST_NUCLEO_L476RG
			$PROJ_DIR$\..\..\..\..\os\hal\ports\common\ARMCMx
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\STM32L4xx
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\ADCv3
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\CANv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\DACv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\DMAv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\EXTIv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\GPIOv3
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\I2Cv2
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\RTCv2
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\SDIOv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\SDMMCv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\SPIv2
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\TIMv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\USARTv2
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\USBv1
			$PROJ_DIR$\..\..\..\..\os\hal\ports\STM32\LLD\xWDGv1
			$PROJ_DIR$\..\..\..\..\test\rt

  Assembler
    Preprocessor:
		$PROJ_DIR$\..
		$PROJ_DIR$\..\..\..\..\os\common\ports\ARMCMx\devices\STM32L4xx
		$PROJ_DIR$\..\..\..\..\os\rt\ports\ARMCMx

   Linker
     Config: 
        - Overrider Default
           - $PROJ_DIR$\ch.icf
     Output:
        - ch.out
   Debugger:
       Setup
         Driver: ST-Link
       Download: Use flash loader(s)
     ST-Link
       Reset: normal
       Interface: SWD

     
** Build Procedure **

1) Project Clean
2) Project Rebuild All
3) Download and Debug


** Modifying the project for another STM32 processor/board **

1) Modify the IAR project settings for the appropriate STM processor.
  - use the settings above as a giudeline. These will already be stored in the IAR project files.
2) Replace Processor/Board specific files with ones corresponding to your processor as follows:
  Hint: you can determine the current file directory location/path by opening the file in IAR editor and hovering mouse over the filename tab.
  - os/ext/CMSIS: replace stm32xxx files
  - hal/board: replace board.c/h files
  - hal/port
      /STM32: replace all files with those for specific processor family
      - get proper version of LLD files for specific processor (somewhat tedious, but very important step)
  - mcuconf.h - get version for your processor
  - chconf.h - update for your config
  - halconf.h - update for your config
  - main.c - update for your application


