Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Launch IAR, select Project/Create new project from the menu. Select in the windows
the C language programming and main then click OK. Save the project under the
“Create_New_Project”.
2. The project and a main file appears in the Workspace windows:
Setting options
2. Select General Options from categoy, open the target tab and select Device ST
STM32F429ZI (ST/STM32f429/ST STM32F429Zi).
3. Open library configuration and check Use CMSIS.( Tab library Configuration )
Adding Source files
After downloading the STM32F4-Discovery firmware package. Unzip the contents in the
locations of your choice, preferably in a safe place because you will use it in every new
project.
1. Create 3 Groups/folders in the workspace to organize files.
(Right click on the project name, Add/Add Group).
EWARM : Embedded Workbench ARM, this group include files
configuration.
STM32F4xx_StdPeriph_Driver : Contains firmware driver for the all
the STM32F429ZiT6 microcontroller peripherals.
STM32F4-Discovery : Contains firmware driver for the STM32F4-
Discovery board.
User : Contains the user files.
2. Adding the sources files for the EWARM Group.
C:\Users\NhatTam\Desktop\..\STM32F4_DISCOV\STM32F429I-
Discovery_FW_V1.0.1\Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates\iar
and select the startup_stm32f4xx.s file.
This file define the vector table for the microcontrollers.
1. Right click on the project and select options. A new windows options will appears.
Select C/C++ Compiler from categoy, open the Preprocessor tab and go to the
Additional include directories.
a. The first header file to add is the cortex M4 header file and is located under
\ STM32F4_DISCOV\STM32F429I-Discovery_FW_V1.0.1\Libraries
\CMSIS\include.
So we copy the link and we past it in the Additional include directories.
C:\Users\xxx\Desktop\STM32F4-Discovery_FW_V1.1.0\Libraries
\CMSIS\Include or using the project directory location
$PROJ_DIR$\..\STM32F4-Discovery_FW_V1.1.0\Libraries\CMSIS
\Include
The Library configuration file stm32f4xx_conf.h include the list of all the header
file of the firmware drivers. We have to uncomment all the header files that we need
to, the misc.h and the stm32f4xx_gpio.h.
3. Go to the ST-LINK tab and select SWD for Serial Wire Debug.
Linker
Note: If edit Linker please make sure the addresses are correct (refer Reference
manual is needed). if not you should use the linker provided by IAR for Stm32F429i
1. Select Linker from category, open the Config tab. In the linker configuration
file check Override default and click Edit to display the Linker configuration file
editor.
2. Click Save to save linker options (in IAR folder of the project)
Putt the file name and save it.
Reference
https://electronics-homemade.com