Skip to main content

Quick Start

This guide will help you quickly get started with the ElenixOS project, including code acquisition, environment setup, compilation and running, and basic usage.

Project Acquisition

Clone the Repository

Use Git to clone the ElenixOS repository:

git clone --recursive https://github.com/ElenixOS/ElenixOS.git
note

Note: Use the --recursive parameter to ensure submodules are also cloned. If you didn't use --recursive when cloning, you can get the submodules with the following command:

git submodule update --init --recursive

Development Environment Requirements

Hardware Requirements

  • Development board: Embedded development board supporting LVGL (such as STM32, ESP32, etc.)
  • Memory: At least 64KB RAM
  • Storage: At least 200KB ROM
  • Display: Display supporting LVGL
  • Input device: Touch screen or other input device

Software Requirements

  • Operating system: Linux, macOS, or Windows
  • Compilation toolchain:
    • GCC (for x86 simulation)
    • Cross-compilation toolchain for the corresponding development board
  • Dependency libraries:
    • CMake (3.13+)
    • Python 3.7+ (for script tools)
    • LVGL (included as a submodule)
    • JerryScript (included as a submodule)

Install Dependencies

Ubuntu/Debian

sudo apt-get update
sudo apt-get install build-essential cmake python3 python3-pip

macOS

brew install cmake python3

Windows

Compilation and Running

Compile x86 Simulation Version

  1. Create and enter the build directory:
mkdir build && cd build
  1. Configure CMake:
cmake .. -DCMAKE_BUILD_TYPE=Debug
  1. Compile the project:
cmake --build .

Run the Simulation Version

After compilation, you can run the simulation version:

./ElenixOS

Cross-Compile to Target Board

  1. Set up the cross-compilation toolchain:
export CROSS_COMPILE=arm-none-eabi-
  1. Configure CMake:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
  1. Compile the project:
cmake --build .
  1. Flash the compiled product to the target board

Basic Usage

Application Management

Install Application

# Assuming the application package path is /path/to/app.eapk
eos_app_install("/path/to/app.eapk");

Run Application

Applications will be automatically loaded after system startup, or can be manually started through the application list.

Watch Face Management

ElenixOS supports multiple watch faces, and you can switch between different watch faces through system settings.

System Settings

Through the control center or settings application, you can adjust various system settings such as brightness, volume, language, etc.

First Debugging Suggestions

  1. Check dependencies: Ensure all dependency libraries are correctly installed
  2. Compilation test: First compile the x86 simulation version to ensure the code compiles normally
  3. Run simulation: Run the simulation version in x86 environment to test basic functionality
  4. Hardware test: Flash the compiled product to the target board to test hardware compatibility
  5. Debugging tools: Use GDB or other debugging tools for debugging

Common Issues

Compilation Failure

  • Check if dependencies are completely installed
  • Check if CMake version meets requirements
  • Check if cross-compilation toolchain is correctly configured

Runtime Errors

  • Check if memory usage is reasonable
  • Check if hardware drivers are correctly implemented
  • Check if application code has errors

Interface Display Issues

  • Check if display driver is correct
  • Check if LVGL configuration is appropriate
  • Check if resolution settings are correct

Next Steps