Littlesfs Partition in Zephyr

Hello everyone ,
I am trying to mount a Littlefs partition for LVGL assets on my external QPSI flash from zephyr. I wanted to know if that is possible.
Thank you for you advice

Hi @AdamBenSalah,

Recently, I had the same problem in my project, and here is how you can add it in CMakeLists.txt

add_subdirectory(your_ui_project)

# LVGL Pro Step 
target_link_libraries(app PUBLIC lib-ui)
target_compile_definitions(lib-ui PUBLIC LV_ZEPHYR=1)
target_link_libraries(lib-ui PUBLIC zephyr_interface)
target_compile_definitions(lib-ui PUBLIC
    LV_LVGL_H_INCLUDE_SIMPLE=1
)

target_include_directories(lib-ui PUBLIC
${CMAKE_BINARY_DIR}/zephyr/include/generated/lvgl
${ZEPHYR_LVGL_MODULE_DIR})
target_link_libraries(app PUBLIC lib-ui)

target_sources(app  PRIVATE
            src/main.c
)

# External memory relocation to NOR flash
if(CONFIG_CODE_DATA_RELOCATION)

FILE(GLOB lvgl_resources 
    your_ui_folder/images/*.c
    your_ui_folder/fonts/*.c
)
zephyr_code_relocate(FILES ${lvgl_resources} LOCATION EXTFLASH NOCOPY)