Chapter 2: Creation of Development Environment
[Copy link]
This post was last edited by xiaoli2018 on 2022-1-29 20:47
The creation of a development environment is divided into two parts: IDE configuration and project creation.
IDE Configuration
First, set up the integrated development software. KEIL5 software provides different chip packages for different chips. Therefore, you need to install the relevant pack before using KEIL5 to program GD32.
There are two ways to install the Pack:
- Install using the installation package
- Online Installation
The method of using the installation package is the simplest, just double-click the file to automatically install it. The online installation method is more common, but sometimes it is not convenient to download in China.
The GD32 official website provides a ready-made Pack, so use the first method to install it. After the installation is complete, the status shown in the figure below is displayed.
Project Creation
The project is created using the template project provided by GD32. Double-click to open it and the following is displayed:
- The Application folder contains the files that developers need to modify. main.c contains the main function, systick.c contains the tick interrupt processing function, and gd32l23x_it.c contains the interrupt processing function used.
- CMSIS stores the CMSIS interface file provided by GD32, which mainly provides the SystemInit function for initializing the chip.
- Peripheral stores the firmware library functions provided by GD32.
- Startup provides the startup code for powering on the chip, which is in assembly language and is used to initialize the interrupt vector table, stack, call the initialization function and jump to the main function.
- Utilities stores the peripheral initialization functions of the related boards.
The code that users need to modify is concentrated in the Application folder. The advantage of using a template project is that you don't need to configure KEIL's project options yourself.
Summarize
The above two steps have realized the creation of the GD32 development environment. Let's program happily.
The GD32L23x Pack and project template used in keil5 can be downloaded from the first evaluation article.
The first article is about downloading GD32L233C development resources
|