STM32 Learning Notes: Building a FWlib 3.0 Project in IAR

Publisher:云淡雅致Latest update time:2016-09-19 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Development tool: JLink V7.0

Development environment: IAR5.3

Step 1: Download the function library

Download the STM32 V3.0 firmware function library from the ST official website (http://www.st.com/stonline/products/support/micro/files/um0427.zip).

Step 2: Copy the library file

After decompressing the downloaded software and hardware function library, copy the [Libraries] directory in the directory to your project directory, and then copy the four files main.c, stm32f10x_conf.h, stm32f10x_it.c, and stm32f10x_it.h in the [Template] directory under the [Project] directory to your directory, and then copy the four loading image files in the [Project]-[Template]-[EWARMv5] directory to your directory. So after these are completed, the files in your project are almost as shown in the figure below: Step 3: Load the file


Start the IAR5.3 development environment, choose to create a new project in the current workspace, and you will be prompted to select the tool, just select ARM; for the project template selection, just select the empty project. After the selection is completed, click the OK button, and you will be prompted to save the project file location, just save it directly to the previously created project directory. Then add each file group as shown in the figure below, and add the corresponding files. Step 4: Configure IAR 5.3 Right-click the project file (such as MyProject - Debug in the figure above), select the [Options] button in the right-click menu, and the project configuration tab will appear. Select [General Options], select [Device] in the [Target] page, and then click the device selection button to the right of [Device] to select your STM32 chip. After the selection is completed, it will be as shown in the following figure: Select [C/C++ Compiler], then select the [Preprocessor] page. In the [Additional include directories] text box, enter the header file address required to index your project. After the configuration is completed, it will be as shown in the following figure: Select [Linker], then select the [Config] page, select the [Override Default] check box, click the file selection button on the right side of the text box, and select the file you want to connect and configure in your project root directory (for example, if you plan to run the program in Flash, select stm32f10x_flash.icf). After the configuration is completed, it will be as shown in the following figure: Select [Debugger], then select the [Setup] page, and select [J-Link/J-Trace] in the [Driver] drop-down selection box. After the configuration is completed, it will be as shown in the following figure: After completing the subsequent operations, click the Make command button, and you will be prompted to save the Workspace file. Enter the name you want to save (for example, the above project is named MyProject). After clicking Save, the system will compile. After compiling, a warning Warning[Pe223]: function "assert_param" declared implicitly will be prompted. This is because the stm32f10x_conf.h file is not declared. Just declare it in the main.c header file. After the above four steps, you can use IAR to build a project of your choice. However, in the IAR configuration introduction, I only made a basic configuration introduction. If readers want to know more about the IAR environment usage instructions, they can directly refer to the IAR help file for in-depth study. If there are any unclear points in the article, I hope you will let me know. Thank you very much!!














Keywords:STM32 Reference address:STM32 Learning Notes: Building a FWlib 3.0 Project in IAR

Previous article:Network-on-chip system hardware platform based on FPGA and ARM9
Next article:Design of shipborne monitoring system based on ARM9

Recommended ReadingLatest update time:2024-11-16 17:55

[STM32 Motor Vector Control] Record 12——IWDG Watchdog
Watchdog concept:      In a microcomputer system composed of a single chip, the operation of the single chip is often disturbed by external magnetic fields, causing confusion in the data of various registers and memories, resulting in program pointer errors, not being in the program area, taking out wrong program ins
[Microcontroller]
[STM32 Motor Vector Control] Record 12——IWDG Watchdog
Communication between STM32 spi and FPGA
I've been studying the SPI bus recently, so I won't go into details about the protocol and hardware description. The four lines include clock, chip select, receive, and send initialization.   SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex; //Full-duplex   SPI_InitStructure.SPI_Mode = SPI_Mode_Maste
[Microcontroller]
Understanding of the stack of stm32 learning notes
1. Heap and stack size   Define the size in startup_stm32f2xx.s Stack_SizeEQU0x00000800                 AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size __initial_sp ; Heap Configuration ; Heap Size (in Bytes) 0x0-0xFFFFFFFF:8 ; Heap_SizeEQU0x00000800                 AREA HEAP, NOINIT, READWRITE, AL
[Microcontroller]
Understanding of the stack of stm32 learning notes
STM32 button detection
The key detection of STM32 is relatively simple. First, initialize the connected i/o step by step, and then write a key scanning function, which is similar to that of the 51 microcontroller. The following is a typical example: Use buttons to control LEDs: key.h file #ifndef__KEY_H #define__KEY_H  #include"sys.h“ #
[Microcontroller]
STM32 port clock
1. RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); //Enable GPIOC clock   Why do some CortexM3 peripherals need to configure the RCC clock before configuration? Because CortexM3 is clock-driven, all peripherals are assigned to different bus bridges, and the bus provides the working clock. When the clock of a p
[Microcontroller]
STM32 port clock
stm32 learning five
Key input learning (key_polling): Objective: Through the input of the key, the LED light can be reversed.    To read the key input, it is necessary to write a key.c and key.h file. Here, the library function writing principle (imitating the library function writing method) is used to obtain the key action.  First,
[Microcontroller]
Huawei Watch GT is popular, how Taiji and STM32 lead the wearable market
In October 2018, TouchELX and Huawei jointly launched the HUAWEI Watch GT with a 14-day standby time. The reason why the Watch GT is widely praised by the market is that it achieves high-end graphics and smooth animation design under ultra-low power consumption conditions. This cooperation has further consolidated Tou
[Mobile phone portable]
Huawei Watch GT is popular, how Taiji and STM32 lead the wearable market
STM32 Learning Notes 2: What is a register
Chip architecture diagram The chip (here refers to the core, or CPU) and peripherals are connected through various buses, of which there are 4 driver units and 4 passive units. For ease of understanding, we can understand the driver unit as the CPU part and the passive units as peripherals. System Block Diagram
[Microcontroller]
STM32 Learning Notes 2: What is a register
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号