【Xianji HPM5361】Clion build download debugger
[Copy link]
【HPM5361】Build, download and debug the program under Clion
This article demonstrates how to use Clion in a Windows environment, taking the CoreMark example to build, download, and debug the HPM5361 program.
Preface
Since I am used to using CMakeList to build projects and debug, and CLion is very suitable for me to do this, so I wrote this article. If you have any wrong or better suggestions, please share them in the comment area, and learn and improve together. This article is only for reference, and it cannot be guaranteed to be applicable to smooth building and debugging in other computer environments.
Preparation
Copy a copy of the coremark example from the hpm_sdk file directory and put it in a new directory.
After clion opens this directory, loading the cmakelist project will automatically include SDK-related directories.
Toolchain Configuration
cmake configuration
CLion project environment variable configuration
Build the project
After successfully building .elf, memory information will be displayed
Download the program
Edit the run/debug configuration and fill in the debugger and panel configuration files correctly. Here, the openocd configuration file corresponding to hpm5300evk is selected.
After editing is complete, click Run to download the program.
This step may report an error, just pay attention
After the program is downloaded, the following prompt appears
At this time, start the serial port and check the information printed by the development board.
Debugger
Set a breakpoint at the main function entry and click Debug.
## Summarize
The examples provided by Xianji are all good familiar examples. After configuring the environment variables required by the project, building and debugging are quite simple. I saw a boss using RT-Thread Studio to develop and debug the HPM series development board. Since most of my previous work was done in an IDE built based on eclipse, I also tried it and the experience was very good.
|