Kernel and buildscript improvements (#477)

* **New Features**
  * Centralized module management with global symbol resolution
  * Level-aware logging with colored prefixes and millisecond timestamps

* **Breaking Changes**
  * ModuleParent hierarchy and getModuleParent() removed
  * Logging API and adapter model replaced; LogLevel-driven log_generic signature changed

* **Improvements**
  * Unified, simplified module registration across build targets
  * Tests updated to reflect new module lifecycle and global symbol resolution
This commit is contained in:
Ken Van Hoeylandt
2026-02-03 08:35:29 +01:00
committed by GitHub
parent 1a61eac8e0
commit a935410f82
38 changed files with 432 additions and 665 deletions
+22 -27
View File
@@ -1,32 +1,27 @@
cmake_minimum_required(VERSION 3.20)
include("${CMAKE_CURRENT_LIST_DIR}/../Buildscripts/module.cmake")
list(APPEND REQUIRES_LIST
lvgl
)
list(APPEND PRIV_REQUIRES_LIST
Tactility
TactilityCore
TactilityKernel
)
if (DEFINED ENV{ESP_IDF_VERSION})
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
list(APPEND PRIV_REQUIRES_LIST elf_loader)
endif ()
idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Include/"
PRIV_INCLUDE_DIRS "Private/"
REQUIRES lvgl
PRIV_REQUIRES Tactility TactilityCore elf_loader TactilityKernel
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
endif()
else()
file(GLOB_RECURSE SOURCES "Source/*.c**")
add_library(TactilityC OBJECT)
target_sources(TactilityC PRIVATE ${SOURCES})
include_directories(TactilityC PRIVATE Private/)
target_include_directories(TactilityC PUBLIC Include/)
target_link_libraries(TactilityC
PRIVATE Tactility
PRIVATE TactilityCore
PRIVATE TactilityKernel
PUBLIC lvgl
)
endif()
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
tactility_add_module(TactilityC
SRCS ${SOURCE_FILES}
INCLUDE_DIRS Include/
PRIV_INCLUDE_DIRS Private/
REQUIRES ${REQUIRES_LIST}
PRIV_REQUIRES ${PRIV_REQUIRES_LIST}
)
+1 -3
View File
@@ -51,7 +51,6 @@
#include <Tactility/Tactility.h>
bool module_parent_resolve_symbol(ModuleParent* pParent, const char* name, uintptr_t* pInt);
extern "C" {
extern double __floatsidf(int x);
@@ -375,9 +374,8 @@ uintptr_t tt_symbol_resolver(const char* symbolName) {
}
}
auto& module_parent = tt::getModuleParent();
uintptr_t symbol_address;
if (module_parent_resolve_symbol(&module_parent, symbolName, &symbol_address)) {
if (module_resolve_symbol_global(symbolName, &symbol_address)) {
return symbol_address;
}