Difference between revisions of "Getting Started"

From uGFX Wiki
Jump to: navigation, search
(Examples)
Line 1: Line 1:
''If you're using the ChibiStudio IDE, please follow this guide: [[Using ChibiStudio]].''
 
 
 
There are two ways to get a copy of µGFX: A [[#Stable_release|stable release]] and the latest version from the [[#Repository|git repository]]. We currently '''strongly''' recommend to use the git repository.
 
There are two ways to get a copy of µGFX: A [[#Stable_release|stable release]] and the latest version from the [[#Repository|git repository]]. We currently '''strongly''' recommend to use the git repository.
 
Before you start, please make sure that your application and the use of µGFX meets the [http://ugfx.org/license.html license] of this project. Please [http://ugfx.org/about contact us] should you have any questions regarding licensing. If you're using µGFX for free please considering making a small [http://ugfx.org/download donation] to support our efforts.
 
Before you start, please make sure that your application and the use of µGFX meets the [http://ugfx.org/license.html license] of this project. Please [http://ugfx.org/about contact us] should you have any questions regarding licensing. If you're using µGFX for free please considering making a small [http://ugfx.org/download donation] to support our efforts.

Revision as of 18:15, 8 December 2015

There are two ways to get a copy of µGFX: A stable release and the latest version from the git repository. We currently strongly recommend to use the git repository. Before you start, please make sure that your application and the use of µGFX meets the license of this project. Please contact us should you have any questions regarding licensing. If you're using µGFX for free please considering making a small donation to support our efforts.

We understand that integrating µGFX into your project might be the most difficult part for most users. Please do not hesitate to ask for help should you face any issues.

Stable release

A copy of a stable release of µGFX can be downloaded from the download section.

Repository

Please note that the following guide has been written for unix-like systems using the terminal. For Windows you may use a graphical git client such as SourceTree. Please have a look at the GIT Instructions to learn more.

µGFX is developed through a git repository hosted at bitbucket.org.

cd /path/to/your/project/resources
git clone https://bitbucket.org/Tectu/ugfx ugfx

Architecture

Understanding the architecture of the µGFX library is rather important. See Architecture.

Integrate µGFX

After you have successfully obtained a copy of µGFX, you have to include it into your current project. The follow section will describe how uGFX can be integrated into an existing Makefile project or how it can be easily used with an IDE.

Makefiles

The uGFX library comes with a built-in Makefile system (which is not mandatory to be used, see Single File Inclusion below). If your IDE / Project allows to use external, existing Makefiles, we highly recommend using this method of adding uGFX to your project.

Step-by-Step guide:

  1. Set the GFXLIB variable to the path pointing to the µGFX library root directory
  2. Include the main µGFX Makefile (/ugfx/gfx.mk)
  3. Add GFXSRC to the sources variable/list
  4. Add GFXINC to the include paths variable/list
  5. Include additional Makefiles of the µGFX library to include board files, drivers, ...

Single File Inclusion

If your IDE or project doesn't allow using Makefiles there's another very easy way to include the uGFX library in your project. All that needs to be done is adding the /src/gfx_mk.c file to the sources and adding the µGFX library root directory to the compiler include path.

Step-by-Step guide:

  1. Add /src/gfx_mk.c to the sources in the files tree of your project
  2. Add the path to the µGFX library root directory to the compiler include path
  3. Add the source and header files of each driver that you want to be using the same way

Examples

Board files

Certain modules of µGFX such as the display and touchscreen drivers require a file which builds the interface to your actual hardware. This board file tells µGFX how to talk to your hardware.
The documentation of every module shows how to create these board files.
See board file.

Configuration

The entire configuration of µGFX happens in a file called gfxconf.h which you have to create. A template that can be copied can be found in /gfxconf.example.h. The configuration is crucial so please make sure that you at least scrolled once through the configuration article.

Demos

The /demos directory contains a variety of different demos, reaching from single feature (per module sorted) demos up to complete application demos. These demos can be compiled easily by adding the corresponding demo.mk file to your Makefile. For example:

include $(GFXLIB)/demos/modules/gwin/widgets/demo.mk

Note: When including a demo Makefile, you have to make sure that you don't compile any other sources with it (eg. exclude your own main.c form the compilation process).

Support

There are two ways to get support for your µGFX related problems:

  • Free public support by the community through the discussion forum
  • A support agreement / contract

Please do not hesitate to contact us if you're interested in a support agreement.