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:
committed by
GitHub
parent
1a61eac8e0
commit
a935410f82
+34
-41
@@ -1,26 +1,32 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../Buildscripts/module.cmake")
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
list(APPEND REQUIRES_LIST
|
||||
TactilityKernel
|
||||
TactilityCore
|
||||
TactilityFreeRtos
|
||||
hal-device-module
|
||||
lvgl-module
|
||||
lv_screenshot
|
||||
minitar
|
||||
minmea
|
||||
)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
list(APPEND REQUIRES_LIST
|
||||
TactilityKernel
|
||||
PlatformEsp32
|
||||
TactilityCore
|
||||
TactilityFreeRtos
|
||||
hal-device-module
|
||||
lvgl-module
|
||||
driver
|
||||
elf_loader
|
||||
lv_screenshot
|
||||
QRCode
|
||||
esp_http_server
|
||||
esp_http_client
|
||||
esp-tls
|
||||
esp_wifi
|
||||
json
|
||||
minitar
|
||||
minmea
|
||||
json # Effectively cJSON
|
||||
nvs_flash
|
||||
spiffs
|
||||
vfs
|
||||
@@ -33,13 +39,25 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
list(APPEND REQUIRES_LIST esp_tinyusb)
|
||||
endif ()
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Include/"
|
||||
PRIV_INCLUDE_DIRS "Private/"
|
||||
REQUIRES ${REQUIRES_LIST}
|
||||
else ()
|
||||
|
||||
list(APPEND REQUIRES_LIST
|
||||
PlatformPosix
|
||||
freertos_kernel
|
||||
cJSON
|
||||
lvgl
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
tactility_add_module(Tactility
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS Include/
|
||||
PRIV_INCLUDE_DIRS Private/
|
||||
REQUIRES ${REQUIRES_LIST}
|
||||
)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
|
||||
endif ()
|
||||
@@ -50,31 +68,6 @@ if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
# Read-write
|
||||
fatfs_create_spiflash_image(data "${CMAKE_CURRENT_SOURCE_DIR}/../Data/data" FLASH_IN_PROJECT PRESERVE_TIME)
|
||||
endif ()
|
||||
else()
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c*")
|
||||
|
||||
add_library(Tactility OBJECT)
|
||||
|
||||
target_sources(Tactility PRIVATE ${SOURCES})
|
||||
|
||||
target_include_directories(Tactility
|
||||
PRIVATE Private/
|
||||
PUBLIC Include/
|
||||
)
|
||||
|
||||
target_link_libraries(Tactility PUBLIC
|
||||
cJSON
|
||||
TactilityFreeRtos
|
||||
TactilityCore
|
||||
TactilityKernel
|
||||
PlatformPosix
|
||||
hal-device-module
|
||||
lvgl-module
|
||||
freertos_kernel
|
||||
lvgl
|
||||
lv_screenshot
|
||||
minmea
|
||||
minitar
|
||||
)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user