Scaffold NCS firmware project structure

Sets up kvida-os as a freestanding nRF Connect SDK application for the
nRF54L15, pinned to NCS v3.4.0, with a Docker/WSL2 build environment
(toolchain-only image, NCS modules fetched into a separate volume at
first run) and placeholder module directories matching the architecture
described in the kvida meta-repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Ronny Eia
2026-07-07 21:57:10 +02:00
parent cf18cf2c00
commit 13406a24a3
17 changed files with 147 additions and 0 deletions

11
app/CMakeLists.txt Normal file
View File

@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(kvida_os)
target_sources(app PRIVATE src/main.c)
# Module directories under src/ (hal, gpio_manager, power_manager,
# matter_manager, ota, config_manager, sensor_profiles, rule_engine) are
# currently placeholders with no source files. Add add_subdirectory()
# calls for each once it gains a CMakeLists.txt and real sources.

1
app/Kconfig Normal file
View File

@@ -0,0 +1 @@
rsource "Kconfig.zephyr"

6
app/prj.conf Normal file
View File

@@ -0,0 +1,6 @@
# Minimal base configuration so the application boots and logs.
# Matter, Thread, power management, and other feature-specific Kconfig
# options are added as the corresponding modules gain real implementations.
CONFIG_LOG=y
CONFIG_GPIO=y

View File

@@ -0,0 +1,3 @@
# config_manager
Stores and applies the user's device configuration (selected sensor profile, GPIO assignment, options) without requiring a firmware change.

View File

@@ -0,0 +1,3 @@
# gpio_manager
Maps configured sensor profiles to physical GPIO/ADC/I2C pins at runtime, based on the active configuration rather than build-time wiring.

3
app/src/hal/README.md Normal file
View File

@@ -0,0 +1,3 @@
# hal
Hardware abstraction layer: wraps nRF54L15 peripherals (GPIO, ADC, I2C) behind a board-independent interface used by the other modules.

10
app/src/main.c Normal file
View File

@@ -0,0 +1,10 @@
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(kvida_os, LOG_LEVEL_INF);
int main(void)
{
LOG_INF("kvida-os starting");
return 0;
}

View File

@@ -0,0 +1,3 @@
# matter_manager
Exposes configured sensor profiles as Matter endpoints/clusters over Thread, and handles Matter commissioning.

3
app/src/ota/README.md Normal file
View File

@@ -0,0 +1,3 @@
# ota
Firmware update handling (DFU over Matter/Thread, image validation, rollback).

View File

@@ -0,0 +1,3 @@
# power_manager
Battery-first power management: sleep/wake scheduling, power state transitions, and battery level reporting.

View File

@@ -0,0 +1,3 @@
# rule_engine
Executes user-defined behavior rules (level 3: Lua scripts, level 2: Blockly-generated intermediate representation) without requiring a firmware rebuild.

View File

@@ -0,0 +1,3 @@
# sensor_profiles
Reusable sensor profile implementations (reed switch, hall sensor, push button, pulse counter, analog input, DS18B20, BME280, leak sensor, PIR, generic I2C device) selectable via configuration.