NCS 3.0.0: Linker errors when building LVGL project

Dear DevZone,

While porting our project from NCS 2.9.1 to NCS 3.0.0, I ran into linker errors when building LVGL. The linker reports that it cannot find functions defined in C:\ncs\v3.0.0\modules\lib\gui\lvgl\src\misc\lv_circle_buf.c. It appears that this file is not included in C:\ncs\v3.0.0\zephyr\modules\lvgl\CMakeLists.txt. After manually adding ${LVGL_DIR}/src/misc/lv_circle_buf.c to zephyr_library_sources() to that file, I was able to build the project without any linker errors.

Is this a bug or am I doing something wrong? 

Thanks,

Ladivin

Parents
  • Hello Ladivin,

    Did you try to run the sample on custom board? Can you please send me the project file to me?

  • Helo Kazi,

    many thanks for you quick response.

    Yes, we do have a custom board, but in the mean time I was able to reproduce this using nRF5340 DK. The simplest configuration to reproduce the issue is as follows (the project is attached as a zip file) :

    - Take hello world sample from Zephyr (from NCS 3.0.0) as a baseline

    - Add CONFIG_LVGL=y and CONFIG_DISPLAY=y to the prj.conf of this sample

    - Add app.overlay with a dummy display to the project. This overlay was taken from another zephyr sample

    - Add a call to any LVGL function that references functions from lv_circle_buf.c into your main -> in my case I just put lv_iter_destroy(NULL); 

    -Build this for nRF5340DK

    - Observe the linker error e.g. in function `lv_iter_destroy':
    C:/ncs/v3.0.0/modules/lib/gui/lvgl/src/misc/lv_iter.c:98: undefined reference to `lv_circle_buf_destroy'

    As stated before, this can be fixed by adding ${LVGL_DIR}/src/misc/lv_circle_buf.c to zephyr_library_sources() to C:\ncs\v3.0.0\zephyr\modules\lvgl\CMakeLists.txt

    I also tried this with NCS 3.0.but it made no difference. 

    Thanks!

    Ladivin

    hello_world_LVGL.zip

Reply
  • Helo Kazi,

    many thanks for you quick response.

    Yes, we do have a custom board, but in the mean time I was able to reproduce this using nRF5340 DK. The simplest configuration to reproduce the issue is as follows (the project is attached as a zip file) :

    - Take hello world sample from Zephyr (from NCS 3.0.0) as a baseline

    - Add CONFIG_LVGL=y and CONFIG_DISPLAY=y to the prj.conf of this sample

    - Add app.overlay with a dummy display to the project. This overlay was taken from another zephyr sample

    - Add a call to any LVGL function that references functions from lv_circle_buf.c into your main -> in my case I just put lv_iter_destroy(NULL); 

    -Build this for nRF5340DK

    - Observe the linker error e.g. in function `lv_iter_destroy':
    C:/ncs/v3.0.0/modules/lib/gui/lvgl/src/misc/lv_iter.c:98: undefined reference to `lv_circle_buf_destroy'

    As stated before, this can be fixed by adding ${LVGL_DIR}/src/misc/lv_circle_buf.c to zephyr_library_sources() to C:\ncs\v3.0.0\zephyr\modules\lvgl\CMakeLists.txt

    I also tried this with NCS 3.0.but it made no difference. 

    Thanks!

    Ladivin

    hello_world_LVGL.zip

Children
No Data
Related