In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, Xiaobian will bring you about how to realize stm32 environment construction. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.
MDK
http://www.keil.com/arm/mdk.asp
MDK-ARM (Microcontroller Development Kit) is a powerful and commonly used cortex-mx development environment.
It contains µVision4 IDE, the latest version needs to download different packs (http://www.keil.com/dd2/Pack/) according to the series of mcu to support specific devices. At present, there are two ways to develop stm32 library, one is the latest cube way, and the other is the traditional standard library way. If you use the former, you don't need to download anything else. If you need stm standard library development, you need to download st official standard library separately.
Because the standard library method is more mainstream before, there are more reference resources, so we should learn the standard library method first.
Official standard firmware library
link
Home 》Embedded Software 》MCUs Embedded Software 》STM32 Embedded Software
or
Home》Software》Microcontroller Software》 STM32 Microcontroller Software
Select STM32 standard peripherals library in the gray navigation, and then enter the corresponding page according to the required model. Provide the software download address at the bottom of the page (you need to enter the email address).
How to use standard libraries
Decompress the downloaded standard library compressed package, directory structure is as follows:
├── _htmresc
├── Libraries
── CMSIS Cortex Core Driver Compliant with CMSIS Specification
STM32F4xx_StdPeriph_Driver stm32
├── Project
── STM32F4xx_StdPeriph_Examples Valid code for each peripheral device (based on official evaluation board)
Common Part Templates for STM32F4xx_StdPeriph_Templates Examples
└── Utilities
├── Media
├── ST
<$── Other evaluation board codes that may be used in STM32_EVAL examples
└── Third_Party
The above is an explanation of the basic directory, and there is a chm help file in the root directory. Everything about the firmware library can be found in this help file.
Description of important documents
File name
Description
stm32f4xx_conf.h
referenced at stm32f4xx.h (if macro USE_STDPERIPH_DRIVER is defined)
Each instance project and template directory located in the library directory is used to configure which peripheral drivers the application needs.
This file can also be used to enable or disable the Library run-time failure detection before compiling the firmware library drivers, through the preprocessor define USE_FULL_ASSERT
stm32f4xx_ppp.h
stm32 Peripheral driver header file, located in Libraries\STM32F4xx_StdPeriph_Driver
This file includes the PPP peripheral function and variable definitions used within these functions.
stm32f4xx_ppp.c
stm32 Peripheral Driver, located in Libraries\STM32F4xx_StdPeriph_Driver
stm32f4xx_it.h
Interrupt control prototype, located in library directory instances and template directory, instances are not referenced
stm32f4xx_it.c
Template source file containing the interrupt service routine (ISR) for Cortex-M4F exceptions. User can add additional ISR(s) for the used peripheral(s) (for the available peripheral interrupt handler's name, please refer to the startup file startup_stm32f4xx.s).
STM32F4xx CMSIS files
File name
Description
stm32f4xx.h
CMSIS peripheral access layer file, the only library file that needs to be included in the main.c file
This file defines the data structure of all peripherals, address mapping, macros for accessing registers, register declarations and bit definitions. At the end of this file, you can decide whether to use the library or directly access the registers by commenting or not #define USE_STDPERIPH_DRIVER.
Located in Libraries\CMSIS\Device\ST\STM32F4xx\Include
This file contains:
configuration section that allows to select:
- the device used in the target application
- to change few application-specific parameters such as the HSE crystal frequency
system_stm32f4xx.h
CMSIS peripheral access layer system functions, such as controlling clocks, executing SystemInit
Quoted by stm32f4xx.h
Located in Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates
system_stm32f4xx.c
CMSIS Cortex-M4F STM32F4xx devices peripheral access layer system source file.
startup_stm32f4xx.s
STM32F4xx device startup assembly file, one per compiler
located in Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm
To summarize, if you use the library development approach, the files you need are as follows,
startup_stm32f4xx.s « stm32f4xx.h » system_stm32f4xx, stm32f4xx_conf.h » user files » library drivers
USE_STDPERIPH_DRIVER and cpu model macro used need to be defined in c/c++ macro definition of editor (refer to definition of chip model in stm32f4xx.h), multiple macros are separated by commas
note
Although m3 and m4 library files are used in much the same way, there are some differences, such as library file directory structure and macro names
Project Engineering Establishment
You need to logically group them, add the necessary files mentioned above, and then set the debugging selection.
The above is how to realize the stm32 environment shared by Xiaobian for everyone. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.