-
Notifications
You must be signed in to change notification settings - Fork 213
Configure GUIslice for RPi & LINUX
Calvin Hass edited this page Aug 18, 2019
·
4 revisions
Overview > Configuring GUIslice >
The following are the basic steps necessary to configure GUIslice to run on a RPi or LINUX environment.
- In this particular version of the guide, an RPi with PiTFT display has been selected, using SDL1.2 as the display driver and tslib as the touch driver.
- NOTE: This page is under development, so please check back again for updates.
Ensure SDL1.2 and tslib are installed (see Installing GUIslice)
- For the moment, let's assume we want the RPi running SDL1.2 using tslib for touch handling:
- Edit
/src/GUIslice_config.h
and uncomment the following line in the Raspberry Pi / LINUX section: #include "../configs/rpi-sdl1-default-tslib.h"
cd examples/linux
make test_sdl1
sudo ./test_sdl1
If all works well, this should produce a color gradient on the display and then automatically exit after 2 seconds. Note that this test is using a simple example of SDL drawing without using the GUIslice library. If this example doesn't work, then GUIslice won't work, so it is important that we first ensure the basic SDL graphics library is operational.
Build the first GUIslice example:
- This will default to SDL1.2 and tslib
- To select alternate build options, please see Compiling under LINUX
make ex01_lnx_basic
sudo ./ex01_lnx_basic
- If all works well, this should produce a grey background, white-framed black box that automatically exits after 2 seconds.
Now we are ready to test touch support:
- Build and run
ex02_lnx_btn_txt
- If all works well, you will see a similar screen but with a blue button. Pressing the blue button should highlight it and then exit the program.
Finally, we can run many of the other GUIslice examples: eg. ex07_lnx_slider