Difference between revisions of "Using Keil µVision 5 MDK-ARM"

From uGFX Wiki
Jump to: navigation, search
(Configuration)
(Adding µGFX)
Line 18: Line 18:
 
Keil µVision doesn't support using Makefiles. Therefore, we'll use the single-file technique to add µGFX to an existing Keil project. For more information, see [[Getting_Started#Integrate_uGFX|Integrate uGFX]].
 
Keil µVision doesn't support using Makefiles. Therefore, we'll use the single-file technique to add µGFX to an existing Keil project. For more information, see [[Getting_Started#Integrate_uGFX|Integrate uGFX]].
  
We start by creating a new group in the project tree on the left side by right-clicking on the project top level folder and selecting '''Add Group...'''
+
We start by creating a new group in the project tree on the left side by right-clicking on the project top level folder and selecting '''Add Group...''' As this folder will contain some of the uGFX source files, we'll name it ''ugfx''.
 +
Inside that newly create group we have to add the ''gfx_mk.c'' file which can be found in the ''src'' directory of the ugfx library.
  
 
== Configuration ==
 
== Configuration ==
 
The last thing to do is setting the <code>GFX_COMPILER</code> flag to <code>GFX_COMPILER_KEIL</code> in the [[configuration]] file.
 
The last thing to do is setting the <code>GFX_COMPILER</code> flag to <code>GFX_COMPILER_KEIL</code> in the [[configuration]] file.
 
For more information about this compiler setting, see [[GOS#Compiler|Compiler]].
 
For more information about this compiler setting, see [[GOS#Compiler|Compiler]].

Revision as of 20:07, 8 December 2015

This article will describe the necessary steps to successfully integrate the µGFX library into an existing Keil µVision 5 project.

Used tools

The following tools were used in this article:

  • Keil µVision 5.16a MDK-ARM Professional

Structure

Sadly Keil µVision doesn't really support a way of defining variables. Therefore, the µGFX library directory needs to be somewhere near the project directory. We recommend using the following structure:

.
├── Project 1
├── Project 2
├── Project 3
└── ugfx

Adding µGFX

Keil µVision doesn't support using Makefiles. Therefore, we'll use the single-file technique to add µGFX to an existing Keil project. For more information, see Integrate uGFX.

We start by creating a new group in the project tree on the left side by right-clicking on the project top level folder and selecting Add Group... As this folder will contain some of the uGFX source files, we'll name it ugfx. Inside that newly create group we have to add the gfx_mk.c file which can be found in the src directory of the ugfx library.

Configuration

The last thing to do is setting the GFX_COMPILER flag to GFX_COMPILER_KEIL in the configuration file. For more information about this compiler setting, see Compiler.