Difference between revisions of "Linux"

From uGFX Wiki
Jump to: navigation, search
Line 1: Line 1:
µGFX runs natively on any Linux system that runs the X server. Running µGFX on your computer can be used to simplify the process of developing your embedded GUI because you don't have to flash the firmware every time to try it. Also, this way µGFX can be used as the native GUI system on low power Linux devices such as the Raspberry-Pi and other single board computers.
+
µGFX runs natively on any Linux system. The SDL and X drivers can be used to compile a native Linux desktop application. This is especially useful during the development process as the entire µGFX application can be developed and tested without flashing the target microcontroller every time. The Framebuffer driver is useful to use µGFX on embedded Linux systems that don't run X or a full Desktop environment.
 
+
'''''Note:''' The performance of the resulting program is very bad unless you use the Linux [[Linux#Framebuffer|Framebuffer]] driver. This is because the X driver just uses setPixel() and doesn't take any advantage of area blitting or double buffering. The application will run A LOT faster on the actual microcontroller.''
+
  
 
== SDL ==
 
== SDL ==
ToDo
+
Using the SDL driver is the recommended way of running µGFX inside a Linux system with a desktop environment.
  
 
== Framebuffer ==
 
== Framebuffer ==
Line 16: Line 14:
  
 
== X ==
 
== X ==
ToDo
+
Using the X driver is not recommended. It's deprecated and an old relic that is kept in the µGFX library as a reference for examples and for systems that are incapable of running SDL. It is '''STRONGLY''' recommended to use the SDL driver instead (see above).
 +
The performance of the resulting program is very bad because the X driver just uses <code>setPixel()</code> and doesn't take any advantage of area blitting or double buffering.

Revision as of 11:28, 15 August 2016

µGFX runs natively on any Linux system. The SDL and X drivers can be used to compile a native Linux desktop application. This is especially useful during the development process as the entire µGFX application can be developed and tested without flashing the target microcontroller every time. The Framebuffer driver is useful to use µGFX on embedded Linux systems that don't run X or a full Desktop environment.

SDL

Using the SDL driver is the recommended way of running µGFX inside a Linux system with a desktop environment.

Framebuffer

The Linux driver does not only come with an X driver, but also with a framebuffer driver. To use the framebuffer driver, include the following line in your Makefile:

include $(GFXLIB)/boards/base/Linux-Framebuffer/board.mk

Makefile

A ready-to-use Makefile to compile a native uGFX Linux application can be found under /boards/base/Linux/example/.

X

Using the X driver is not recommended. It's deprecated and an old relic that is kept in the µGFX library as a reference for examples and for systems that are incapable of running SDL. It is STRONGLY recommended to use the SDL driver instead (see above). The performance of the resulting program is very bad because the X driver just uses setPixel() and doesn't take any advantage of area blitting or double buffering.