FlxOS Documentation

Complete guide to installing, configuring, and developing with FlxOS.

Installation

FlxOS requires ESP-IDF v5.5+ and a compatible ESP32 development board. Follow these steps to get started.

Clone Repository
git clone --recurse-submodules https://github.com/flxos-labs/flxos.git
cd flxos

Quick Start

Get FlxOS running on your ESP32 in just a few minutes.

1

Set up ESP-IDF environment

. $HOME/esp/esp-idf/export.sh
2

List and Select Profile

python flxos.py list
python flxos.py select esp32s3-ili9341-xpt
3

Build and flash

python flxos.py build
python flxos.py flash --port /dev/ttyUSB0

Profiles are defined via YAML files in the Profiles directory.

Prerequisites

Required Software

  • ESP-IDF v5.5+ - Installation Guide
  • CMake 3.16+ - Build system generator
  • Ninja - Fast build tool
  • Python 3.10+ - Required for ESP-IDF tools

Supported Hardware

  • ESP32 (all variants)
  • ESP32-S3
  • Compatible TFT display (recommended: ILI9341, ST7789)
  • Touch controller (optional: XPT2046, FT6336)

System Overview

FlxOS is architected as a modular embedded system with clear separation of concerns.

Application Layer

Settings, Files, Text Editor, Tools

Desktop Environment

Window Manager, Task Bar, Launcher

System Services

Wi-Fi, Bluetooth, File System, Settings

Hardware Abstraction

LVGL, LovyanGFX, Drivers

ESP-IDF & FreeRTOS

Hardware, Network Stack, Task Scheduler

Directory Structure

flxos/
├── Applications/    # User-facing apps (calendar, files, text editor, settings, ...)
├── Apps/            # App framework and lifecycle management
├── Buildscripts/    # CMake modules, profile loader, HW code generator
├── Connectivity/    # WiFi, networking modules
├── Core/            # Core OS headers and utilities
├── Firmware/        # Firmware entry point and initialization
├── HalModule/       # Hardware Abstraction Layer
├── Kernel/          # Kernel services (tasks, memory, logging)
├── Profiles/        # Board/device profiles (YAML + generated config)
├── Services/        # System services
├── System/          # System-level modules (drivers, buses)
├── UI/              # LVGL UI framework, themes
├── flxos.py         # Main CLI build tool
└── CMakeLists.txt   # Top-level CMake project file

Core Modules

Hardware Abstraction Layer (HAL)

Centralized hardware abstraction interface and implementations for optimal performance.

HalModule/

UI and Apps Framework

Application base classes, lifecycle management, and LVGL UI elements.

UI/ & Apps/

Connectivity

Wi-Fi management, network protocols, and IoT capabilities.

Connectivity/

Applications

Built-in apps: Calendar, Files, Image Viewer, Text Editor, Settings, System Info, and more.

Applications/

Building

Important: Always select a profile using python flxos.py select <id> before building.

Build Commands

# Standard build
python flxos.py build

# Dev build with faster iterations
python flxos.py build --dev

# Flash and connect monitor
python flxos.py flash --port /dev/ttyUSB0

Configuration

FlxOS uses a YAML profile system instead of traditional menuconfig for platform definitions.

python flxos.py list
python flxos.py diff a b --json

Key Profile Definitions (profile.yaml)

  • SoC Target: Chip sequence and flash sizing.
  • Display Driver: TFT resolution, backend type, SPI pins.
  • Touch Controller: XPT2046, FT6336, GT911 mappings.
  • Peripherals: SD card interfaces and Battery ADC defaults.

Creating Apps

FlxOS apps follow a simple pattern. Here's a minimal example:

MyApp.hpp
#pragma once
#include "App.hpp"

class MyApp : public App {
public:
    MyApp() : App("MyApp", "My Application") {}
    
    void onCreate() override {
        // Initialize your app UI
        lv_obj_t* label = lv_label_create(getContainer());
        lv_label_set_text(label, "Hello, FlxOS!");
    }
    
    void onResume() override {
        // App brought to foreground
    }
    
    void onPause() override {
        // App sent to background
    }
};

API Reference

Complete API documentation coming soon. For now, refer to the source code in Core/ and UI/.

Troubleshooting

Build fails with "Target Not Set"

Ensure you've run python flxos.py select <profile> before building.

Display shows garbage or doesn't work

Check the profile.yaml for your selected configuration. Verify pin connections match your hardware pinout.

Touch not responding

Ensure touch controller is correctly mapped in the hardware definitions inside the active profile.

Wi-Fi won't connect

Verify SSID and password in menuconfig. Check that your router supports 2.4GHz (ESP32 doesn't support 5GHz).

Need More Help?

Can't find what you're looking for? Check out these resources:

Report an Issue