{"id":18301350,"url":"https://github.com/lvgl/lv_port_pc_eclipse","last_synced_at":"2025-05-15T15:07:44.633Z","repository":{"id":39632821,"uuid":"60671475","full_name":"lvgl/lv_port_pc_eclipse","owner":"lvgl","description":"PC simulator project for LVGL embedded GUI Library. Recommended on Linux and Mac.","archived":false,"fork":false,"pushed_at":"2025-05-07T19:55:57.000Z","size":3121,"stargazers_count":316,"open_issues_count":14,"forks_count":226,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-08T21:19:15.422Z","etag":null,"topics":["graphics-library","lvgl","simulator"],"latest_commit_sha":null,"homepage":"https://lvgl.io/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lvgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-06-08T05:39:53.000Z","updated_at":"2025-05-08T02:31:57.000Z","dependencies_parsed_at":"2023-01-19T17:04:46.204Z","dependency_job_id":"366c4735-0e84-42a0-a4b7-6b00c602fa04","html_url":"https://github.com/lvgl/lv_port_pc_eclipse","commit_stats":{"total_commits":292,"total_committers":23,"mean_commits":"12.695652173913043","dds":"0.22945205479452058","last_synced_commit":"ba45efb68b125aa93237e7c75c51d4cd65fc10cf"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_pc_eclipse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_pc_eclipse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_pc_eclipse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_pc_eclipse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lvgl","download_url":"https://codeload.github.com/lvgl/lv_port_pc_eclipse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphics-library","lvgl","simulator"],"created_at":"2024-11-05T15:15:26.571Z","updated_at":"2025-05-15T15:07:39.618Z","avatar_url":"https://github.com/lvgl.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eclipse Simulator for LVGL (using SDL)\n\nThe [LVGL](https://github.com/lvgl/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.\n\nThe PC simulator is cross platform.  **Windows, Linux and OSX** are supported, however on Windows it's easier to get started with a [another simulator](https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html) project.\n\nThis project uses [Eclipse CDT](https://projects.eclipse.org/projects/tools.cdt) (as an IDE) and [SDL](https://www.libsdl.org/) =a low level driver library to open a window, and handle mouse, keyboard etc.)\n\n## Get started\n\n### Install Packages\n\nOn Linux you can easiyl install it the requirements via terminal:\n```\nsudo apt-get update \u0026\u0026 sudo apt-get install -y build-essential libsdl2-dev libsdl2-image-dev libjpeg-dev libpng-dev\n```\n\nOr you can download SDL from [https://www.libsdl.org/](https://www.libsdl.org/).\n\n\n### Get this project\n\nClone this repository and the related submodules to the workspace folder of Eclipse:\n\n```\ngit clone --recursive https://github.com/lvgl/lv_port_pc_eclipse\n```\n\n### Import the PC simulator project\n1. Open Eclipse CDT\n2. Click **File-\u003eImport** and choose **General-\u003eExisting project into Workspace**\n3. Browse the root directory of the project and click Finish\n4. Build your project and run it\n\nThis configures in this project, but if you start a new Eclipse project due to an Eclipse bug you need modify the Assembler command:\n1. In Project properties -\u003e C/C++ build -\u003e Settings -\u003e Cross GCC Assembler -\u003e Command: change `as` to `gcc`\n2. On the same place: Cross GCC Assembler -\u003e General -\u003e Assembler flags: add `-c` \n\n## CMake\n\nThe following steps can be used with CMake on a Unix-like system. This may also work on other OSes but has not been tested.\n\n1. Ensure CMake is installed, i.e. the `cmake` command works on the terminal.\n2. Make a new directory. The name doesn't matter but `build` will be used for this tutorial.\n3. Type `cd build`.\n4. Type `cmake ..`. CMake will generate the appropriate build files.\n   - To build with SDL draw unit, add `-DLV_USE_DRAW_SDL=ON` to command line\n   - To build with libpng to support PNG image, add `-DLV_USE_LIBPNG=ON` to command line\n   - To build with libjpeg-turbo to support JPEG image, add `-DLV_USE_LIBJPEG_TURBO=ON` to command line\n5. Type `make -j` or (more portable) `cmake --build . --parallel`.\n\n**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.\n\n6. The binary will be in `../bin/main`, and can be run by typing that command.\n\n## Docker\n1. Build the docker container\n```\ndocker build -t lvgl_simulator .\n```\n2. Run the docker container\n```\ndocker run lvgl_simulator\n```\nGUI with docker is platform dependent. For example, on macOS you can follow\n[this tutorial](https://cntnr.io/running-guis-with-docker-on-mac-os-x-a14df6a76efc)\nand run a command similar to:\n```\ndocker run -e DISPLAY=10.103.56.101:0 lvgl_simulator\n```\n\nNote that on macOS, you may need to enable indirect GLX rendering before starting Xquartz:\n```\ndefaults write org.macosforge.xquartz.X11 enable_iglx -bool true\nopen -a Xquartz\n```\n\nFor 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.\n\n```\nxhost +\ndocker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix:ro -t lvgl_simulator\n```\n## Contributing\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request!\n\nIf you find an issue, please report it on GitHub!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvgl%2Flv_port_pc_eclipse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flvgl%2Flv_port_pc_eclipse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvgl%2Flv_port_pc_eclipse/lists"}