NavHAL
NavHAL is a core component of the Vayu flight control stack, responsible for providing a deterministic and structured interface between the underlying hardware platform and higher-level software layers.
Unlike conventional hardware abstraction layers that act as thin wrappers over vendor-provided drivers, NavHAL is designed as a compile-time configured system abstraction. It enforces consistency, portability, and predictable execution by defining a unified contract for all hardware interactions, while avoiding unnecessary runtime overhead.
Traditional embedded stacks often rely on layered abstractions consisting of vendor HALs, middleware, and optional RTOS components. While these approaches simplify development, they introduce hidden execution costs, increase system complexity, and make timing behavior difficult to reason about—an undesirable property in real-time flight control systems.
NavHAL addresses these limitations by adopting a minimal and deterministic design philosophy. It provides direct yet controlled access to hardware through memory-mapped register abstractions, lightweight APIs, and modular subsystems. All implementations are selected at compile time, ensuring that only the required components are included in the final binary, thereby reducing both code size and runtime overhead.
A key design principle of NavHAL is execution-layer independence. The abstraction layer operates natively in bare-metal environments while remaining compatible with higher-level execution frameworks such as VAIOS. This allows system designers to choose between fully deterministic bare-metal execution and structured multitasking without modifying the underlying hardware interface.
This chapter presents the motivation, design goals, architecture, and implementation details of NavHAL. It further discusses its integration with the VAIOS execution layer and compares it with existing abstraction approaches.