{"id":27878954,"url":"https://github.com/m5stack/lv_m5_emulator","last_synced_at":"2025-05-05T03:16:40.590Z","repository":{"id":224184095,"uuid":"762652573","full_name":"m5stack/lv_m5_emulator","owner":"m5stack","description":"Running the M5Stack LVGL device emulator via PlatformIO, support V8 \u0026 V9","archived":false,"fork":false,"pushed_at":"2024-03-08T01:44:03.000Z","size":11716,"stargazers_count":33,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-05T03:16:33.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/m5stack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/pio_explorer.png","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-24T10:06:42.000Z","updated_at":"2025-04-02T06:04:08.000Z","dependencies_parsed_at":"2024-03-05T02:52:25.563Z","dependency_job_id":null,"html_url":"https://github.com/m5stack/lv_m5_emulator","commit_stats":null,"previous_names":["m5stack/lv_m5_emulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m5stack%2Flv_m5_emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m5stack%2Flv_m5_emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m5stack%2Flv_m5_emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m5stack%2Flv_m5_emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m5stack","download_url":"https://codeload.github.com/m5stack/lv_m5_emulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252429971,"owners_count":21746574,"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":[],"created_at":"2025-05-05T03:16:39.357Z","updated_at":"2025-05-05T03:16:40.307Z","avatar_url":"https://github.com/m5stack.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Running the M5Stack LVGL device emulator via PlatformIO\n\nNow it is more convenient to design [LVGL](https://github.com/lvgl/lvgl) UI on PC, \nwhich can reduce the time wasted in flash the firmware.\nUsing [M5GFX](https://github.com/m5stack/M5GFX), we can ensure that the display\neffect on the PC side is consistent with that of the device.\nNow we have also added a picture of the device shell as the border background, \nwhich can better simulate the display effect on the device side.\n\n\u003cdiv align=center\u003e\n\u003cimg src=\"images/lv_m5stack_fire.gif\" width=\"25%\"\u003e\u003cimg src=\"images/lv_m5stack_core2.gif\" width=\"25%\"\u003e\u003cimg src=\"images/lv_m5stack_cores3.gif\" width=\"25%\"\u003e\u003cimg src=\"images/lv_m5stack_dial.gif\" width=\"24.78%\"\u003e\n\u003c/div\u003e\n\n## How to install \u0026 use demo\n\n### Install Visual Studio Code\n\nhttps://code.visualstudio.com/ - follow instructions there, if you don't have\nvscode yet.\n\n\n### Install SDL drivers\n\n**Linux (Ubuntu, Debian, ...)**\n\nUse one of options below:\n\n```sh\n# 64 bits\nsudo apt-get install libsdl2-dev\n```\n\n```sh\n# 32 bits\nsudo apt-get install gcc-multilib g++-multilib libsdl2-dev:i386\n```\n\nNote:\n\n- Use 32-bits build for more correct memory stat info.\n- If you have conflicts on `libsdl2-dev:i386` install, remove 64-bits version\n  and dependencies first.\n\n**MacOS**\n\nUse [Homebrew](https://brew.sh/):\n\n```sh\nbrew install sdl2 pkg-config\n```\nNote: \nOn MacOS you need to include (uncomment in provided example [platformio.ini](./platformio.ini) file) these lines in your platformio.ini file to import the drivers:\n```\n  ; SDL2 includes\n  !pkg-config --cflags SDL2\n  !pkg-config --libs SDL2\n```\n\n**Windows**\n\nUse [MSYS2](https://www.msys2.org/)\n\n```sh\npacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2\n```\n\nAdd the path to your Mingw-w64 `bin` folder to the Windows PATH environment\nvariable (usually `C:\\msys64\\mingw64\\bin`). See [instruction, 4](https://code.visualstudio.com/docs/cpp/config-mingw#_prerequisites).\n\n\n### Install flasher drivers (optional)\n\nIf you plan to upload firmware \u0026 debug hardware, read notes in PlatformIO\n[install docs](http://docs.platformio.org/en/latest/installation.html#troubleshooting).\n\n\n### Choose LVGL version(V8 or V9)\n\nIf you want build with lvgl v8, this was default option, you don't need change any files!\nBut if you want try the lvgl  latest version v9, you need to modify the version control macro definition in [platformio.ini](./platformio.ini) file as:\n```\n  -D LVGL_USE_V8=0  ; lvgl v8\n  -D LVGL_USE_V9=1  ; lvgl v9\n```\nAnd don't forget to modify the links of the dependent libs to this:\n```\n  ; lvgl=https://github.com/lvgl/lvgl/archive/refs/tags/v8.3.0.zip  ; lvgl v8\n  lvgl=https://github.com/lvgl/lvgl#master  ; lvgl v9\n```\n\n### Build/Run\n\n1. Clone this repository or download as zip.\n2. In vscode, open folder via `File` -\u003e `Open Folder...` menu.\n   - If you do it first time - agree, when it suggests to install PlatformIO\n     plugin, and wait when PlatformIO then install build tools and package\n     dependencies.\n\nTo build/execute, on PlafomIO tab expand desired env and click target:\n\n\u003cimg src=\"support/pio_explorer.png\" width=\"60%\"\u003e\n\nNote, for emulator env `upload` also executes compiled binary.\n\n### Zoom and rotate the window at runtime\n\nThe emulator support zoom and rotate the window at runtime. So you can easily zoom and rotate the window to view UI details.\n\n1. Zoom\n\n    Press :keyboard: **1 ~ 6** number key to zoom the window size.\n\n1. Rotate\n\n    Press :keyboard: **\"L\"** **\"R\"** letter key to rotate the window.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm5stack%2Flv_m5_emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm5stack%2Flv_m5_emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm5stack%2Flv_m5_emulator/lists"}