4220 views|4 replies

396

Posts

4

Resources
The OP
 

【GD32307E-START】Development environment construction + development practice -> light up the onboard LED [Copy link]

This post was last edited by ylyfxzsx on 2020-9-29 21:25

Friends, in this section we will officially start to build the development environment. So, we start with the simplest way to light up the onboard LED, and then gradually deepen our study and exploration to accumulate a sense of accomplishment. Here, from the perspective of a novice, I will share with you the process of learning and exploration, various joys and complaints. If you just copy and run the official routine, it will lose the meaning of exploration. We should take one step at a time and know the reason why, so that learning will be meaningful.

Okay, the first step is to install the Pack package required in the Keil development environment. In GD32307E-START_Files\ GD32307E-START Files\GD32F30x_Addon Files, click the Pack package, click Next all the way, and the installation is complete.

After the installation is complete, create a new "GD32307E_DEP" folder to store the project code files. According to my habit, I will create several GROUP folders in this general folder to classify and store the Code. The name of the folder can be named as you like, but try to be concise and clear. In layman's terms, you can know what it does at a glance. A good programming habit and style will help you get twice the result with half the effort and facilitate viewing and management.

Because the official library files are used for development, copy the standard library files in GD32307E-START_Files---> GD32307E-START Files---> GD32F30x_Firmware_Library_V1.1.0---> Firmware to the newly created GD32307E_DEP---> FwLibrary folder.

Then copy other files such as "startup_gd32f30x_cl.s" and "core_cm4.h" to the corresponding folders according to your own habits. Next, open Keil5, create a new project, and then create a corresponding GROUP in the newly created project file, corresponding to the folder we created before, and include the required files. Then create a new main file main.c

After creating a new Keil5 project file and including the configuration file and hardware library file, you can now start writing the code to light up the onboard LED. Before that, you need to look at the SCH and LED hardware connections.

Open GD32307E-START_Files--->GD32307E-START Files--->GD32307-START-V1.0 Demo--->GD32307E-START-V1.0.pdf, you can see that LED1 is connected to PC6 of MCU

Next, create a new hw_led.c and hw_lled.h file in the Hardrare folder and add it to the Keil project file .

Start writing the code to light up the LED. Here I wrote a very simple test code for a simple LED flashing.

Then press F7 to compile. You can see that there are no errors in the compilation. Then download it to the development board, the LED starts flashing, the development environment is set up, the LED lights up successfully, and you can start further in-depth exploration!

L4.jpg (27.53 KB, downloads: 0)

L4.jpg

GD32307E_DEP.rar

234.22 KB, downloads: 20

This post is from GD32 MCU

Latest reply

I guess it was flashed to dap firmware.   Details Published on 2020-10-14 21:29
 

9702

Posts

24

Resources
2
 

Using STLINK to debug GD32

This post is from GD32 MCU

Comments

I guess it was flashed to dap firmware.  Details Published on 2020-10-14 21:29
 
 
 

1w

Posts

204

Resources
3
 

GigaDevice GD32307E-START review summary
https://en.eeworld.com/bbs/thread-1143008-1-1.html

This post is from GD32 MCU
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
Personal signature

玩板看这里:

http://en.eeworld.com/bbs/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 

53

Posts

0

Resources
4
 

Can you send me a more specific link configuration? My configuration doesn't work.

This post is from GD32 MCU
 
 
 

1366

Posts

6

Resources
5
 
littleshrimp posted on 2020-9-27 15:49 Using STLINK to debug GD32

I guess it was flashed to dap firmware.

This post is from GD32 MCU
 
Personal signature

1084534438 欢迎交流  [加油,一切皆有可能]

 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list