Platform Overviewο
This document provides an overview of the UNA Watch platformβs unique architecture and capabilities.
Unique architectureο
Unlike traditional smartwatch platforms, UNA Watch apps are:
Pure Machine Code: Compiled ELF binaries executing directly in MCU memory
Position-Independent: Apps abstracted from kernel using PIC (Position-Independent Code)
Shared libc: Memory-efficient library sharing across all apps
Dual-Process: Service (background) + GUI (interface) process architecture
Platform Architectureο
Core Conceptsο
Pure Machine Code Executionο
UNA Watch apps are not interpreted or virtualized. They are compiled ARM Cortex-M ELF binaries that execute directly in the MCU memory. This provides:
Native Performance: Zero abstraction overhead.
Direct Hardware Access: Apps can interact with peripherals at MCU speeds.
Efficiency: Minimal memory and CPU footprint.
Position-Independent Code (PIC)ο
To allow apps to be loaded at any memory address without re-linking, the SDK uses Position-Independent Code.
Kernel Abstraction: Apps are completely abstracted from the kernelβs memory layout.
Dynamic Loading: The kernel can load, run, and unload apps on demand.
Process Isolation: No MMU, so the app can read entire MCU memory and execute whatever it want. Developers need to ensure that apps do not interfere with each other or the kernel.
Dual-Process Modelο
Every UNA Watch app consists of two distinct components:
Service Process: Handles background logic, sensors, and BLE.
GUI Process: Handles user interface and interaction.
IPC Mechanismsο
Communication between processes is handled via a high-performance message-passing system.
Kernel Pools: Messages are allocated from pre-defined kernel memory pools.
Type-Safe: Messages are strongly typed using C++ structures.
Asynchronous: Non-blocking message exchange for smooth UI performance.
Memory Managementο
Pool Allocation: Prevents heap fragmentation in long-running applications.
RAII Patterns: Automatic resource cleanup using modern C++ practices.
Protected Regions: Memory regions are protected to prevent unauthorized access.
Power Managementο
Deep Sleep: The kernel automatically enters low-power modes when idle.
Wake Sources: Apps uses common RTOS tehniques for manage cpu time: awating for messages from kernel or
sleep().Battery Optimization: Ajustable sampling rates and batching sensors samples.
Next Stepsο
For detailed SDK setup and build workflows, see SDK setup.
For hands-on app development tutorials, see HelloWorld tutorial.
For SDK APIs and interfaces, see SDK overview and architecture deep dive.