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
+14 -34
View File
@@ -1,41 +1,21 @@
cmake_minimum_required(VERSION 3.20)
include("${CMAKE_CURRENT_LIST_DIR}/../../Buildscripts/module.cmake")
file(GLOB_RECURSE SOURCE_FILES "Source/*.c*")
if (DEFINED ENV{ESP_IDF_VERSION})
list(APPEND REQUIRES_LIST
TactilityKernel
TactilityCore
TactilityFreeRtos
)
list(APPEND REQUIRES_LIST
TactilityKernel
TactilityCore
TactilityFreeRtos
)
idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "Include/"
REQUIRES ${REQUIRES_LIST}
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
endif ()
else ()
add_library(hal-device-module OBJECT)
target_sources(hal-device-module PRIVATE ${SOURCE_FILES})
target_include_directories(hal-device-module
PUBLIC Include/
)
target_link_libraries(hal-device-module PUBLIC
TactilityFreeRtos
TactilityCore
TactilityKernel
freertos_kernel
)
if (NOT DEFINED ENV{ESP_IDF_VERSION})
list(APPEND REQUIRES_LIST freertos_kernel)
endif ()
tactility_add_module(hal-device-module
SRCS ${SOURCE_FILES}
INCLUDE_DIRS Include/
REQUIRES ${REQUIRES_LIST}
)
@@ -8,7 +8,7 @@
#include <memory>
#include <utility>
#define TAG LOG_TAG(HalDevice)
#define TAG "HalDevice"
struct HalDevicePrivate {
std::shared_ptr<tt::hal::Device> halDevice;