How to update a project from LVGL 8.x to 9.x

I’m working through updating a SquareLine project from LVGL8 to LVGL9, and decided to record a list for posterity’s sake. I’ll update it as I find more.

  1. Backup everything! I saved everything in git so I have a breadcrumb trail.
  2. For each font, click “Modify”. This fixes any font C files which may have been generated with an older #if LV_VERSION_CHECK(8, 0, 0) instead of #if LVGL_VERSION_MAJOR >= 8
  3. Reduce any 8bpp to 4bpp or below and click “Modify”. It seems LVGL9 doesn’t support 8bpp fonts anymore
  4. If using ‘16 bit swap’ display format, LVGL9 seems to work differently now, so you’ll need to use ‘16 bit’ and handle the swap in the display driver.
  5. Uncheck “Animation Time” from any applicable widgets. See Checking "Animation Time" crashes with LVGL9
  6. Change the project setting from LVGL 8 to LVGL 9
  7. Review SquareLine project UI - a few widgets may layout differently, but most seems to convert ok.
  8. Export the project sources
  9. Update LVGL input and display drivers
  10. Update event handlers. For me, this was mostly replacing e->target with lv_event_get_target(e) There is also the lv_api_map_v8.h header that maps some but not all of the old APIs to the new APIs.
  11. Try and compile :slight_smile:

Much appreciated, this forum needs more of this. :+1:

1 Like

Hi, thank you for taking the time to create and share this detailed description! I’m sure it will be a great help to many users who are migrating their projects from LVGL v8 to v9. :slight_smile:

1 Like