Context card
Layers of a hardware SDK
Which layers does a hardware SDK provide between application code and a device?
The short answer
A hardware SDK stacks several layers: a toolchain that compiles and links code for the target processor, low-level drivers and a board or device description, a hardware abstraction layer that hides register details, optional operating system or runtime support, and high-level libraries or standard APIs for applications. Debugging and flashing tools connect the developer's computer to the physical device.
For: Embedded developers and technical writers documenting devices
Key points
- Toolchain: compiler, linker and libraries for the target processor, often via cross-compilation.
- Drivers and device description: code and data that know the registers and peripherals.
- Hardware abstraction layer: a stable interface above the device-specific details.
- Runtime or operating system: scheduling, memory and, where needed, real-time behavior.
- Tools: debuggers, debug probes, emulators and flashing utilities.
The context
From registers to applications
At the bottom are the device and its firmware. Device drivers talk to registers and peripherals of a microcontroller or processor. A hardware abstraction layer puts an abstraction over them so that application code does not change with every chip revision.
Above sit a runtime — sometimes a real-time operating system — and libraries or standard APIs, for example for graphics, parallel computing or extended reality.
The toolchain
A compiler toolchain builds code for the target, which is usually a different architecture than the developer's computer. The application binary interface fixes how compiled parts fit together. Debugging happens on the device through a probe or in an emulator.
A hardware SDK makes a device programmable; it does not make a function safe. Safety functions follow their own standards and evidence.
See the encyclopedia article Hardware SDKs.
Questions readers ask next
- Why do hardware SDKs need cross-compilation?
- Code is written on a desktop computer but runs on another processor architecture, so the toolchain compiles for the target, not for the host.
- Does a hardware SDK include the device drivers?
- Usually it includes or references them, together with a board support package or device description for the specific hardware.
Sources
- Android NDK — Android Developers
- OpenXR — Khronos Group
- Devicetree specification — devicetree.org
Review log and changes
Every context card is checked against its sources before it is published, and again whenever it changes; the date under the byline is the last review. Corrections (something was wrong) and additions (something was missing) are logged below with date and time (Berlin time). Typos, formatting and link fixes are not listed.
Reviewed
No corrections or additions since publication.