Skip to content

build: fix and improve FreeRTOS build system configuration - #110

Open
heyonghau wants to merge 2 commits into
lvgl:masterfrom
heyonghau:cmake-fix
Open

build: fix and improve FreeRTOS build system configuration#110
heyonghau wants to merge 2 commits into
lvgl:masterfrom
heyonghau:cmake-fix

Conversation

@heyonghau

@heyonghau heyonghau commented Feb 18, 2026

Copy link
Copy Markdown

Summary

This PR fixes two issues with the FreeRTOS build system:

  1. Remove redundant file collection in CMake: Previously, the build system added the FreeRTOS subdirectory and then searched for source files again to add them to compilation. This was redundant since add_subdirectory() already handles the source file compilation.

  2. Fix USE_FREERTOS CMake option: Previously, running cmake -B build -DUSE_FREERTOS=ON would not properly enable FreeRTOS in the project. The LV_USE_OS macro was not being set correctly.

Testing

  • Build with FreeRTOS: cmake -B build -DUSE_FREERTOS=ON && cmake --build build
  • Build without FreeRTOS: cmake -B build && cmake --build build

Both scenarios now work as expected.


Summary by cubic

Fixes FreeRTOS build configuration and simplifies integration. USE_FREERTOS now correctly enables LVGL with FreeRTOS, and a new FREERTOS_HEAP option lets you pick the heap implementation.

  • New Features

    • Added FREERTOS_HEAP CMake option to select heap_1–heap_5.
  • Bug Fixes

    • USE_FREERTOS sets LV_USE_OS=LV_OS_FREERTOS via CMake.
    • lv_conf.h guards LV_USE_OS so CMake can override it.
    • Removed redundant FreeRTOS source collection; rely on add_subdirectory(FreeRTOS).

Written for commit 5ab4d27. Summary will update on new commits.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants