当前位置:网站首页>Using clion to realize STM32F103 lighting LED
Using clion to realize STM32F103 lighting LED
2022-06-23 21:20:00 【AnieaLanie】
1. Clion
1.1 Clion brief introduction
Clion It's designed for development C And C++ Designed cross platform IDE. It is a IntelliJ Designed for the foundation , It includes a lot of intelligent functions to improve the productivity of developers .CLion Help developers use intelligent editors to improve code quality 、 Automatic code refactoring and deep integration CMake Compiling system , So as to improve the working efficiency of developers .
1.2 Clion Environmental installation
Software environment :
- Windows 10
- STM32CubeMX
- Clion-2019
- MinGW
- OpenOCD
- arm-none-eabi-gcc
Hardware environment :
- STM32F103C8T6
Tool installation :
- STM32CubeMX:https://www.st.com/en/development-tools/stm32cubemx.html
- OpenOCD:OpenOCD It's for STM32 Tools for downloading simulation , Is an open source software package ,Windows Version from here download
Environment configuration :
stay Clion Middle configuration OpenOCD and STM32CubeMX
Click on File -> Setting
To configure OpenOCD and STM32CubeMX The path of
Installation and compilation environment MinGW:
Clion Need to use MinGW Environment to configure the tool chain , Go to MinGW The home page downloads the latest version of MinGW: Minimalist GNU for Windows
Add... After installation MinGW\bin To the system Path in , And restart the system
Last , Open the command line window , Input gcc -v Check whether the installation is successful
Compile environment 2:arm-none-eabi-gcc
Windows Download here :https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads , choice ZIP Compression package form
Unzip to a folder , And will bin Directory added to environment variable
Use arm-none-eabi-gcc -v Command to view the output information
Clion To configure :
to Clion Good configuration MinGW and CMake Environmental Science
open File -> Settings -> Build,Execution,Deployment, stay ToolChain Add below MinGW and arm-none-eabi-gcc Environmental Science
2. stay CLion Created in STM32CubeMX project
2.1 establish CubeMX engineering
Click on Open With Cubemx, open STM32CubeMX To modify the project configuration
Modify chip as F103C8
Chip modification completed
2.2 To configure CubeMX Project engineering
To configure SYS:
To configure RCC
Configure pins
Set up PC13 Pin for GPIO_Output To light up LED The lamp .
Configure serial port USART1
modify IDE
Preservation works , Overwrite the original project with the original project name
go back to CLion, choice st_nucleo_f103rb.cfg
seek st_nucleo_f103rb.cfg file location
Click on three points , You can view the directory
modify st_nucleo_f103rb.cfg file , Note out the 10 That's ok
Add code , open main.c, add to LED Flashing code
Configuration before compilation
Compile
Successful compilation is visible
Burn program :
Finally, use the serial port program to burn into the development board .
2.3 Program effect
3. Reference resources
CLion2021 The detailed installation is based on CLion Realization stm32F103 Lighten up LED
边栏推荐
- Thinking about distributed system consensus
- JS takes two decimal places
- Processing of purchase return in SAP mm preliminary transaction code Migo
- Use of paging components in fusiondesign
- What are the server host security risks? How to prevent safety risks?
- 【5分钟玩转Lighthouse】快速使用长安链
- Model selection and optimization
- Global and Chinese markets of natural starch 2022-2028: Research Report on technology, participants, trends, market size and share
- What is the role of short video AI intelligent audit? Why do I need intelligent auditing?
- Advantages of short video automatic audit? What are the difficulties of manual audit?
猜你喜欢
Application of JDBC in performance test

How PMO uses two dimensions for performance appraisal

I am 30 years old, no longer young, and have nothing

How does PMO select and train project managers?

How to gradually improve PMO's own ability and management level

What are the main dimensions of PMO performance appraisal?

Four aspects of PMO Department value assessment

How to view the role of PMO in agile organizations?

New SQL syntax quick manual!

Steps for formulating the project PMO strategic plan
随机推荐
Encryption and decryption analysis of returned data of an e-commerce app (IV)
What are the main dimensions of PMO performance appraisal?
Use Tencent cloud lightweight application server to build an unlimited network disk -zpan building tutorial
Cloudbase init considerations
Spingboot reads the parameter values in the YML configuration file
Talk about how to customize data desensitization
Gin security -3: fast implementation of CSRF verification
Global and Chinese market of fly killers 2022-2028: Research Report on technology, participants, trends, market size and share
JS remove tabs and line breaks
JS takes two decimal places
ntpupdate. tencentyun. Com has been eliminated
The substring() method in. JS can be used to intercept all characters after the specified string
Can Tencent cloud disk service share data? What are the advantages of cloud disk service?
Microservice architecture | how to solve the problem of fragment uploading of large attachments?
Four aspects of PMO Department value assessment
Row height, (top line, middle line, baseline, bottom line), vertical align
Global and Chinese market of gas fire pit 2022-2028: Research Report on technology, participants, trends, market size and share
Where should DNS start? I -- from the failure of Facebook
Process crash does not generate dump. Configure localdumps
Go local variables & global variables