Skip to main content

Quick Start

Build and run your first XSTAR project in just a few minutes.

Requirements

  • Operating System: Linux (Ubuntu 24.04 or later recommended)
  • Basic Tools: gcc, make, git
  • Graphical Version (Optional): SDL3 (only required by x64-linux-sdl-helloworld)
sudo apt-get install build-essential make git

Build and Run

The minimal project x64-linux-helloworld has no external dependencies. After building, it enters an interactive Shell:

# From the repository root
make x64-linux-helloworld/xstar.defconfig
make -j$(nproc)

# Run (enters the XSTAR Shell)
./projects/x64-linux-helloworld/output/xstar

Try the Graphical UI (Optional)

The SDL window version requires SDL3 to be installed first:

sudo apt-get install libsdl3-dev
make x64-linux-sdl-helloworld/xstar.defconfig
make -j$(nproc)
./projects/x64-linux-sdl-helloworld/output/xstar

Commands to Try After Launch

Once in the Shell, you can run built-in commands:

help # List all commands
version # Show version info
ls / # List the root directory
ls /sys/device/ # Show all devices
date # Show date and time
echo hello # Echo

Cross-Compiling for Other Platforms

The toolchain prefix is preset in each project's defconfig — just switch projects. Install the required cross-toolchain for your platform:

# ARM64 Linux
sudo apt-get install gcc-aarch64-linux-gnu
make arm64-linux-helloworld/xstar.defconfig
make -j$(nproc)

# ARM32 baremetal (e.g. T113S3)
sudo apt-get install gcc-arm-linux-gnueabihf
make arm32-baremetal-t113s3/xstar.defconfig
make -j$(nproc)

# RISC-V32 Linux (e.g. V821)
make riscv32-linux-v821-helloworld/xstar.defconfig
make -j$(nproc)

Common make Commands

CommandDescription
make <project>/xstar.defconfigApply the project's default configuration
makeBuild
make -j$(nproc)Parallel build (faster)
make menuconfigInteractive configuration menu
make cleanClean build artifacts, keep configuration
make distcleanClean everything, including configuration files

You can also work inside a project directory (the Makefile delegates to the root directory):

cd projects/x64-linux-sdl-helloworld
make distclean
make defconfig
make

Get Help