Create STM32 project in IAR5.4

Publisher:梦回归处Latest update time:2015-09-14 Source: eefocusKeywords:IAR5 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. Download the stm32 peripheral driver library file stm32f10x_stdperiph_lib from www.st.com . The latest one is STM32F10x_StdPeriph_Lib_V3.3.0.

2. Open the stm32f10x_stdperiph_libSTM32F10x_StdPeriph_Lib_V3.3.0ProjectSTM32F10x_StdPeriph_Template folder and copy the EWARMv5 folder to your own project folder (this is the project template under IAR, and the RVMDK in it is the template under uVision).

3. Take the ADC routine as an example.

    Open the stm32f10x_stdperiph_libSTM32F10x_StdPeriph_Lib_V3.3.0ProjectSTM32F10x_StdPeriph_Examples folder, where are the examples. Open ADC1_DMA in the ADC folder and copy the files in it to the IAR project folder you created.

4.Copy the Libraries folder in stm32f10x_stdperiph_libSTM32F10x_StdPeriph_Lib_V3.3.0 to the project file. The two folders in it are the core files of CORTEX-M3 and the driver files of peripherals.

5. Open the project file in EWARMv5. Compile it first and you will find many errors, about 14.

6. Right-click the project file in the workspace and select options. Select Device in general options/Target and select the chip model; in c/c++compiler/preprocessor, additional include directories: Here are the paths of some main files, which must correspond to the project file path. The main ones are the inc path and CM3 path (as shown below), and other unused ones can be deleted.

$PROJ_DIR$..
$PROJ_DIR$..LibrariesCMSISCM3CoreSupport
$PROJ_DIR$..LibrariesCMSISCM3DeviceSupportSTSTM32F10x
$PROJ_DIR$..LibrariesSTM32F10x_StdPeriph_Driverinc

Where $PROJ_DIR$ indicates the IAR project file directory, and .. indicates the parent directory.  

7. Select override default under linker/config and load a stm32f10x_flash.icf file (used to indicate the execution address of stm32 rom and ram, usually there is this file in the example). It has been configured here: $PROJ_DIR$stm32f10x_flash.icf.

8. Recompile the project file and find errors such as "peripheral files cannot be found" and "kernel files". Delete the peripheral files that cannot be found, and then add them back to the project file. Then compile again and it will be OK.

     Overall, what I wrote was a bit messy. I know I have to remind myself for fear that I will forget it later.

Keywords:IAR5 Reference address:Create STM32 project in IAR5.4

Previous article:STM32 serial communication USART
Next article:Choose ARM processor, ARM7 or Cortex-M3

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号