Installing the SDK

From AsteroidOS
Revision as of 14:06, 3 September 2023 by Beroset (talk | contribs) (First step in revising app developer instructions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Software Development Kit (SDK) for AsteroidOS is a set of tools and libraries for developing software to run on AsteroidOS. Since AsteroidOS is a Linux distribution, you can use just about any programming language to develop software, but most of the core applications use a combination of C++ and Qt, with CMake to build. This page describes how to install and configure the SDK.

One thing to note is that while this describes "the SDK", there are actually two versions -- the main one is used to develop software that runs on ARM-based watches running AsteroidOS. The other one is the SDK for developing applications that run on the emulator, which uses qemux86. See the Emulator page for details on the qemux86 version. This page describes only the main ARM-based SDK.

Build or Download

You can either build the SDK from sources or download a prebuilt version. Using a prebuilt version is much faster and easier, and is recommended for developers who want to get started quickly.

The prebuilt SDK is available here. If you wish to build it yourself, see Building the SDK.

Installing the SDK

If you downloaded a prebuilt SDK, run the downloaded script. If you built your own, the generated installation script should be in tmp-glibc/deploy/sdk/ (relative to the build directory). In either case, navigate to the directory which contains the oecore-x86_64-armv7vehf-neon-toolchain-nodistro.0.sh script and run it:

oecore-x86_64-armv7vehf-neon-toolchain-nodistro.0.sh

This script will install the cross-compiler and ARM libraries in /usr/local/oecore-x86_64 by default, along with a script that needs to be sourced before every build. If you want to compile software for AsteroidOS on a watch, the command-line steps generally look like this:

source /usr/local/oecore-x86_64/environment-setup-armv7vehf-neon-oe-linux-gnueabi
cmake -B build
cmake --build build

See Creating and Asteroid app for next steps.