-
Notifications
You must be signed in to change notification settings - Fork 220
Installing GUIslice on Raspberry Pi
Calvin Hass edited this page Feb 12, 2019
·
14 revisions
Overview >
-
Installing Raspbian and PiTFT configuration
- The following was written for the PiTFT 2.8" display, but a similar setup should accommodate other displays (such as WaveShare)
- Installing PiTFT on Raspberry Pi
-
Installing SDL1.2
-
Installing tslib
- In my experience, it seems that the native SDL touch handling is not very reliable. Instead, I recommend that the tslib library is installed instead:
- Installing tslib for Raspberry Pi
-
Old Archived Installation pages
- The original installation guide pages can be located at:
- Installing PiTFT in LINUX
- Installing SDL 1.2 for Raspberry Pi
- Installing tslib for Raspberry Pi
- Download the GUIslice library
- Clone the repository:
git clone https://github.com/ImpulseAdventure/GUIslice
- Clone the repository:
- Modify the GUIslice config file (
GUIslice_config.h
) in the /src folder to select your device setup- Please refer to Configuring GUIslice for details
GUIslice comes with a Makefile that can be used directly with the make command. However, it is also possible to auto-generate a Makefile via cmake
. The following summarizes the two approaches.
For the following, start by entering the GUIslice linux examples folder: cd examples/linux
By default, the GUIslice makefile defaults to SDL1.2 graphics mode and using the tslib touch driver. If no other options are provided to make, these defaults will be used.
- To build all examples with default SDL1.2 graphics & tslib touch:
make all
- To build a specific example with default SDL1.2 graphics & tslib touch:
make ex04_lnx_ctrls
- To change the graphics driver (eg. SDL1.2 vs SDL2), you can pass a
GSLC_DRV=SDL1
or GSLC_DRV=SDL2` parameter:make ex02_lnx_btn_txt GSLC_DRV=SDL2
- To change the touch driver (eg. SDL or tslib), you can pass a
GSLC_TOUCH=SDL
orGSLC_TOUCH=TSLIB
parameter:make ex07_lnx_slider GSLC_TOUCH=SDL
- The options can be combined, for example:
make ex06_lnx_callback GSLC_TOUCH=TSLIB GSLC_DRV=SDL2
make all GSLC_TOUCH=TSLIB
Note regarding SDL2 graphics mode:
- In general, I have found configuring LINUX to work with SDL2 mode from the console (ie. without X / desktop) to be tricky. Therefore, users are strongly recommended to use SDL1.2 mode if possible.
- At a later stage I may publish a more detailed guide explaining how to run SDL2 from the shell (without X)
Note regarding SDL touch mode:
- In my experience, I have found that the RPi SDL touch handling drivers are not very reliable. I strongly recommend users select tslib as shown above.
cmake .
make
- TODO: Fix the recommendations here to include a make target and include
examples/CMakeLists.txt
- Compile the examples as in the previous step
- Run the examples:
sudo ./ex02_lnx_btn_txt