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
@@ -7,21 +7,15 @@
|
||||
|
||||
#include <tactility/kernel_init.h>
|
||||
#include <tactility/hal_device_module.h>
|
||||
|
||||
typedef struct {
|
||||
int argc;
|
||||
char** argv;
|
||||
int result;
|
||||
} TestTaskData;
|
||||
|
||||
extern "C" {
|
||||
// From the relevant platform
|
||||
extern struct Module platform_module;
|
||||
}
|
||||
|
||||
struct ModuleParent tactility_tests_module_parent {
|
||||
"tactility-tests",
|
||||
nullptr
|
||||
};
|
||||
extern "C" struct Module platform_module;
|
||||
|
||||
void test_task(void* parameter) {
|
||||
auto* data = (TestTaskData*)parameter;
|
||||
@@ -33,11 +27,7 @@ void test_task(void* parameter) {
|
||||
// overrides
|
||||
context.setOption("no-breaks", true); // don't break in the debugger when assertions fail
|
||||
|
||||
check(kernel_init(&platform_module, nullptr, nullptr) == ERROR_NONE);
|
||||
// HAL compatibility module: it creates kernel driver wrappers for tt::hal::Device
|
||||
check(module_parent_construct(&tactility_tests_module_parent) == ERROR_NONE);
|
||||
check(module_set_parent(&hal_device_module, &tactility_tests_module_parent) == ERROR_NONE);
|
||||
check(module_start(&hal_device_module) == ERROR_NONE);
|
||||
check(kernel_init(&platform_module, &hal_device_module, nullptr) == ERROR_NONE);
|
||||
|
||||
data->result = context.run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user