diff --git a/.gitignore b/.gitignore index ddd143a..1160216 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ build/ # Ignore UI folder, this should be commited in its own repository -ui/ + # Ignore all dot folders, with below exceptions .*/ diff --git a/README.md b/README.md index 9164cdb..2905672 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ sudo apt-get update && sudo apt-get install -y build-essential libsdl2-dev ``` ### Setup -Configure lv_conf.h to suit your project, place your UI code in the UI folder and edit main/src/main.c to call you UI entry function. To build and debug, press F5. You should now have your UI displayed in a new window and can access all the debug features of VSCode through GDB. +To allow custom UI code an `lv_conf.h` file placed at `ui/simulator/inc` will automatically override this projects lv_conf.h file. By default code under `ui` is ignored so you can reuse this repository for multiple projects. You will need to place a call from `main.c` to your UI's entry function. + +To build and debug, press F5. You should now have your UI displayed in a new window and can access all the debug features of VSCode through GDB. To allow temporary modification between simulator and device code, a SIMULATOR=1 define is added globally. diff --git a/ui/simulator/README b/ui/simulator/README new file mode 100644 index 0000000..fb02c5f --- /dev/null +++ b/ui/simulator/README @@ -0,0 +1,6 @@ +## Simulator + +As most projects are targetted at embedded devices, this folder is for simulator specfic code to allow the UI to run on a desktop environment. + +lv_conf.h placed in ui/simulator/inc will automatically override the main lv_conf.h, to allow project specific settings without modifying the lv_sim_vscode project +