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: 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
- Install Visual Studio Build Tools
- Install CMake
- Install Python 3
Compilation and Running
Compile x86 Simulation Version
- Create and enter the build directory:
mkdir build && cd build
- Configure CMake:
cmake .. -DCMAKE_BUILD_TYPE=Debug
- Compile the project:
cmake --build .
Run the Simulation Version
After compilation, you can run the simulation version:
./ElenixOS
Cross-Compile to Target Board
- Set up the cross-compilation toolchain:
export CROSS_COMPILE=arm-none-eabi-
- Configure CMake:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
- Compile the project:
cmake --build .
- 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
- Check dependencies: Ensure all dependency libraries are correctly installed
- Compilation test: First compile the x86 simulation version to ensure the code compiles normally
- Run simulation: Run the simulation version in x86 environment to test basic functionality
- Hardware test: Flash the compiled product to the target board to test hardware compatibility
- 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
- Check System Architecture to understand the design of ElenixOS
- Check Script Engine to understand application development
- Check Development Tools to understand the development process
- Check Build and Use to learn more build options