From bdc0c006bd7263f9d7aae507b80597db73af1eae Mon Sep 17 00:00:00 2001 From: pengyiqiang Date: Mon, 11 Mar 2024 10:25:24 +0800 Subject: [PATCH] lvgl/Makefile: add LV_SYSMON_GET_IDLE and LV_PROFILER porting Signed-off-by: pengyiqiang --- graphics/lvgl/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/graphics/lvgl/Makefile b/graphics/lvgl/Makefile index 6f3eddc2b..e46bb35f3 100644 --- a/graphics/lvgl/Makefile +++ b/graphics/lvgl/Makefile @@ -31,6 +31,18 @@ ifneq ($(CONFIG_LV_ASSERT_HANDLER_INCLUDE), "") CFLAGS += "-DLV_ASSERT_HANDLER=ASSERT(0);" endif +ifeq ($(and $(CONFIG_LV_USE_PERF_MONITOR),$(CONFIG_SCHED_CPULOAD)),y) +CFLAGS += "-DLV_SYSMON_GET_IDLE=lv_nuttx_get_idle" +endif + +ifeq ($(and $(CONFIG_SCHED_INSTRUMENTATION),$(CONFIG_LV_USE_PROFILER)),y) +CFLAGS += "-DLV_PROFILER_BEGIN=sched_note_beginex(NOTE_TAG_GRAPHICS, __func__)" +CFLAGS += "-DLV_PROFILER_END=sched_note_endex(NOTE_TAG_GRAPHICS, __func__)" + +CFLAGS += "-DLV_PROFILER_BEGIN_TAG(str)=sched_note_beginex(NOTE_TAG_GRAPHICS, str)" +CFLAGS += "-DLV_PROFILER_END_TAG(str)=sched_note_endex(NOTE_TAG_GRAPHICS, str)" +endif + # Set up build configuration and environment WD := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}