You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gabor Kiss-Vamosi 8cc5ce2a18
Merge pull request #112 from Sh3Rm4n/fix/docker
6 days ago
.github Create auto-comment.yml 2 years ago
lv_drivers@1bd4368e71 update submodules 8 months ago
lvgl@23c7b2dbf2 update submodules 8 months ago
.cproject submodule update 1 year ago
.editorconfig update to lvgl v5.3 4 years ago
.gitignore Added CLion generated files to GIT Ignore. 4 months ago
.gitmodules release v8.2 8 months ago
.project submodule update 2 years ago
CMakeLists.txt feat: refine cmake and fix new macOS build 2 months ago
Dockerfile fix(docker): switch to cmake 1 week ago
Makefile Merge branch 'master' into align_warn 5 months ago fix(README): update git clone URL 5 months ago
confdef.txt Update to v7.5.0 2 years ago
licence.txt re-add files 5 years ago
lv_conf.h release v8.2 8 months ago
lv_drv_conf.h release v8.2 8 months ago
main.c release v8.2 8 months ago
mouse_cursor_icon.c update submodules 3 years ago
pc_simulator.launch Fix launch configuration (closes #68) 2 years ago

Simulator project for LVGL embedded GUI Library

The LVGL is written mainly for microcontrollers and embedded systems however you can run the library on your PC as well without any embedded hardware. The code written on PC can be simply copied when your are using an embedded system.

Using a PC simulator instead of an embedded hardware has several advantages:

  • Costs $0 because you you don't have to buy or design PCB
  • Fast because you don't have to design an manufacture PCB
  • Collaborative because any number of developers can work in the same environment
  • Developer friendly because much easier and faster to debug on PC


The PC simulator is cross platform. Windows, Linux and OSX are supported, however on Windows it's easier to get started with a another simulator project.

  • SDL a low level driver library to use graphics, handle mouse, keyboard etc.
  • This project (configured for Eclipse CDT IDE)


Get the PC project

Clone the PC project and the related sub modules:

git clone --recursive

Install SDL

You can download SDL from

On on Linux you can install it via terminal:

sudo apt-get update && sudo apt-get install -y build-essential libsdl2-dev

Install Eclipse CDT

Download and install Eclipse CDT from

Import the PC simulator project

  1. Open Eclipse CDT
  2. Click File->Import and choose General->Existing project into Workspace
  3. Browse the root directory of the project and click Finish
  4. Build your project and run it


The following steps can be used with CMake on a Unix-like system. This may also work on other OSes but has not been tested.

  1. Ensure CMake is installed, i.e. the cmake command works on the terminal.
  2. Make a new directory. The name doesn't matter but build will be used for this tutorial.
  3. Type cd build.
  4. Type cmake ... CMake will generate the appropriate build files.
  5. Type make -j4 or (more portable) cmake --build . --parallel.

NOTE: --parallel is supported from CMake v3.12 onwards. If you are using an older version of CMake, remove --parallel from the command or use the make option.

  1. The binary will be in ../bin/main, and can be run by typing that command.


  1. Build the docker container
docker build -t lvgl_simulator .
  1. Run the docker container
docker run lvgl_simulator

GUI with docker is platform dependent. For example, on macOS you can follow this tutorial and run a command similar to:

docker run -e DISPLAY= lvgl_simulator

Note that on macOS, you may need to enable indirect GLX rendering before starting Xquartz:

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
open -a Xquartz

For Linux environments with X Server, the following will the docker run command. Note that the first command, xhost + grants access to X server to everyone.

xhost +
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix:ro -t lvgl_simulator


  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request!

If you find an issue, please report it via GitHub!