i am new to lvgl and am using an ESP32 devKit 3 board. I have downloaded lvgl from git and have created an Eclipse project. The demo project builds and runs fine. I would like to try and build some of the others in the examples folder. But I keep getting build errors.
I tried the sysmon example.
In lv_ex_conf.h I set LV_USE_DEMO to 0 and set LV_USE_SYSMON to 1
in app_main() I changed demo_create() to sysmon_create();
In main I added #include “lv_examples/lv_apps/sysmon/sysmon.h”
Unfortunately it is still the same. I did see that the sysmon.h file starts with an #ifdef LV_USE_DEMO, and I have changed that to #ifdef LV_USE_SYSMON.
That removed the shading in eclipse so the IDE obviously can now see the header files contents and the void sysmon_create(void) is declared there.
I get no ‘file not found’ errors so the compiler is finding the header file correctly but for some reason doesn’t accept the declaration.
I used eclipse and vs ide. I think vs is more stable and easy to use, eclipse is prone to strange errors. And vs. no need to configure to use the LV library. For beginners, configuring eclipse in the win environment is a very difficult task.
That was a good idea. I added ‘#error sysmon built OK’ next to the sysmon_create() function and got no hits on building the project. Still get the no ref to error.
Not quite sure where that leaves me now. The make file looks very similar to the one in the demo directory, and that builds OK.
It was just above the first active statement. but after the includes
Just tried again with it at the top of the file. before the includes and I still get no error from the error statement.
Both the lv_examples and the lvgl directories are in the component directory. It is a very recent download of esp32_ili9431. Demo which is also in the lv_examples directory builds fine.
hiVGL I do have VS but would not really want to move all the esp32 stuff to that, it is tricky enough to get it all working with eclipse. My ideal would be netbeans, it has a lot of useful features…
@Mark_F I’m quite puzzled by this now. I don’t see why it is refusing to build that file but the demo builds normally. Do any other examples work (i.e. lv_test_theme_1)?
Did you change any settings while you were getting it to work?
I have just managed to get it to build. and I have flashed it to the esp32 and it run fine. I am sure this is not the correct way but might give some pointers…
So component.mk in lv_examples folder only lists lv_apps/demo as src. changed that to lv_app/sysmon.
Also I could not force an error if I added the error after the ifdef statement in the sysmon.c file. For now I have commented that out, so no test to see if LV_USE_SYSMON has been defined.
Checking lv_ex_conf.h and LV_USE_SYSMON = 1.
Thanks again for your help and I would appreciate the official way of doing this should you come across it
I didn’t realize that Eclipse was using component.mk to decide what should be built (on other Eclipse-based IDEs I’ve used it generates its own Makefiles). That file probably needs to be updated.