Base directory structure, lib module

This commit is contained in:
2026-01-01 21:52:59 +01:00
parent cb4a34ae2b
commit c058c006b7
12 changed files with 254 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.20)
# Tell Zephyr to look into our libs folder for extra modules
list(APPEND ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/../../libs)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(lasertag_leader)
# Define application source files
target_sources(app PRIVATE src/main.c)

View File

@@ -0,0 +1,16 @@
CONFIG_LOG=y
# Shell and Built-in Commands
CONFIG_SHELL=y
CONFIG_KERNEL_SHELL=y
CONFIG_DEVICE_SHELL=y
CONFIG_REBOOT=y
# Storage and Settings (NVS)
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
# Enable Lasertag Shared Modules
CONFIG_LASERTAG_UTILS=y

View File

@@ -0,0 +1,19 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <lasertag_utils.h>
LOG_MODULE_REGISTER(leader_app, CONFIG_LOG_DEFAULT_LEVEL);
int main(void)
{
/* Initialize shared project logic */
lasertag_utils_init();
LOG_INF("Leader Application successfully started.\n");
while (1) {
/* Main loop - keep process alive */
k_sleep(K_MSEC(1000));
}
return 0;
}