GD32F3xxx examples for KEIL

If you like it, share it

IMPORTANT NOTE:
This tips are referred to the (January 2022) software package that you find in the GD32F3xx page on the top right (box: Documents & Software).
See for example here and see the image below.

Please read also the Firmware Library User Guide, especially from page 26

After you download and unzip the Firmware Library you can see a directory structure like below.

IMPORTANT:
In the TEMPLATE directory there are the ready to use configuration for KEIL and ARM.
To use KEIL you must enter in the directory:
C:\…\GD32F30x_Firmware_Library_V2.0.2\Template\Keil_project
and rename the:
Project.uvproj
in
Project.uvprojx
Next, delete the:
Project.uvproj
this for use the last KEIL version 5.xxx
See below.

In the EXAMPLES directory, there are the software examples for all peripherals.

Let’s suppose you want to use the example of the blinking LED found in:
C:\…\GD32F30x_Firmware_Library_V2.0.2\Examples\GPIO\Running_led

To do this you have to copy all the files from the directory:
C:\…\GD32F30x_Firmware_Library_V2.0.2\Examples\GPIO\Running_led
in the directory:
C:\…\GD32F30x_Firmware_Library_V2.0.2\Template
see below.

Now double click on the file:
Project.uvprojx
renamed before.

ATTENTION:
On some PCs due to antivirus installed, the above way of running the KEIL can cause errors.
If you are in this condition, do this:
Open the KEIL as ADMINISTRATOR and load the project mentioned above.


DEBUG

Now configure your debug interface.
In our case we use the emulator present on the GD32 EvalBoard and STARTER KIT so we select the
CMSIS-DAP DEBUGGER
and choose the righr FLASH LOADER, its depend of GD32 that you use.
For GD32F30X is
GD32F30X CONNECTIVITY LINE FMC

That is all, good work.