FAQ

Frequently Asked Questions

Common questions about LightOS RTOS.


General

What is LightOS?

LightOS is a modern C++20 real-time operating system designed for safety-critical embedded systems. It supports ARM Cortex-R52 and RISC-V architectures with hardware-verified reliability.

Is LightOS open source?

No. LightOS is proprietary software with commercial licensing. Contact sales@lightos-rtos.com for licensing options. Source code is available on GitHub for evaluation purposes.

What architectures are supported?

What’s the minimum memory footprint?


Development

What compiler do I need?

How do I run tests?

cmake -B build
cmake --build build
./build/lightos_unit_tests

All 5720 tests should pass.

Can I use LightOS with my existing C code?

Yes! LightOS provides both C++ and C APIs:

#include <lightos/lightos.h>

// C API
lightos_thread_create(task, NULL, 1024, 5);
lightos_scheduler_start();

Does LightOS support POSIX?

Yes, LightOS includes a POSIX compatibility layer:


Real-Time Performance

What’s the interrupt latency?

Does LightOS support preemption?

Yes, LightOS uses priority-based preemptive scheduling. Higher-priority threads preempt lower-priority ones immediately.

How many priority levels are there?

256 priority levels (0 = highest, 255 = lowest). The idle thread runs at priority 255.

Is there priority inheritance?

Yes, mutexes support priority inheritance to prevent priority inversion.


Safety & Certification

Is LightOS safety-certified?

LightOS is designed for safety-critical applications and follows MISRA C++ guidelines. Formal certification (ISO 26262, DO-178C) is available through our enterprise support.

What safety features are included?

Is there formal verification?

Yes, critical components are formally verified using model checking. See our UVM verification suite.


Build & Integration

How do I add LightOS to my project?

Option 1: Git submodule

git submodule add https://github.com/jiangintel-ux/lightOS.git

Option 2: CMake FetchContent

include(FetchContent)
FetchContent_Declare(lightos
    GIT_REPOSITORY https://github.com/jiangintel-ux/lightOS.git
    GIT_TAG main
)
FetchContent_MakeAvailable(lightos)
target_link_libraries(myapp lightos)

How do I configure features?

Use CMake options:

cmake -B build \
    -DLIGHTOS_POSIX_ENABLED=ON \
    -DLIGHTOS_SMP_ENABLED=ON \
    -DLIGHTOS_COVERAGE=ON

Can I disable features to reduce size?

Yes, most features can be disabled at compile time:

cmake -B build \
    -DLIGHTOS_POSIX_ENABLED=OFF \
    -DLIGHTOS_USB_ENABLED=OFF \
    -DLIGHTOS_CAN_ENABLED=OFF

Debugging

How do I debug on target?

LightOS supports:

How do I enable debug output?

#define LIGHTOS_DEBUG_ENABLED 1
#include <lightos/debug.hpp>

LIGHTOS_DEBUG("Value: %d", value);

Where are the trace scripts?

See scripts/trace32/ for Lauterbach TRACE32 scripts.


Troubleshooting

Build fails with “C++20 required”

Ensure you’re using a compatible compiler:

export CXX=g++-13
cmake -B build

Tests fail on host

Make sure you’re building in Debug mode:

cmake -B build -DCMAKE_BUILD_TYPE=Debug

QEMU doesn’t start

Install QEMU with ARM/RISC-V support:

# Ubuntu/Debian
sudo apt install qemu-system-arm qemu-system-misc

Getting Help