Alpha RTOS is a library implementing a real-time operating system intended for embedded processors. This RTOS is in its nascent stage, consisting of nothing more than an API definition and an untested scheduler.
Alpha RTOS uses CMake to generate its build system. A variety of build options are configurable through a configuration script.
The CMake script resides in AlphaRTOS/build
,
and should always be invoked using the configuration file build_cfg.cmake
.
AlphaRTOS/build> cmake -C build_cfg.cmake .
Before attempting to generate a build system, configure the target architecture in
build_cfg.cmake
...
# target platform; options enumerated as ARTOS_TARGET_PLATFORM_OPTS
set(ARTOS_TARGET_PLATFORM "SOME_ARCH" CACHE STRING "Target SoC platform." FORCE)
...and clone dependencies into the same directory
- project_directory
|- AlphaRTOS
|- dependency_0
|- dependency_1
-
Install Git, CMake, and an embedded toolchain. Supported toolchains are Xilinx SDK 2018.2 and
gnu-arm-eabi-gcc
. -
Clone AlphaRTOS and its dependencies into the same directory.
project_root> git clone https://github.com/AlphaAutomata/AlphaRTOS project_root> git clone https://github.com/AlphaAutomata/AlphaCMSIS project_root> git clone https://github.com/AlphaAutomata/hal
-
If using Xilinx SDK, generate a
bsp
project for the target in an SDK workspace. -
Configure build options in
AlphaRTOS/build/build_cfg.cmake
.-
Set the target architecture. Currently supported architectures are Xilinx Zynq-7000 (
XC7Zxxx
) and Zynq-7000S (XC7ZxxxS
) SoCs.# target platform; options enumerated as ARTOS_TARGET_PLATFORM_OPTS set(ARTOS_TARGET_PLATFORM "XC7Zxxx" CACHE STRING "Target SoC platform." FORCE)
-
If using Xilinx SDK, set the SDK and BSP information. Currently, only Xilinx SDK 2018.2 is supported.
# Xilinx SDK version set(XSDK_VERSION "2018.2" CACHE STRING "Xilinx SDK version." FORCE) # Xilinx SDK install path set(XSDK_INSTALL_PATH "C:/Xilinx/SDK" CACHE PATH "Xilinx SDK installation path." FORCE) # Xilinx SDK workspace path set(XSDK_WORKSPACE "C:/workspace" CACHE PATH "Xilinx SDK workspace path." FORCE) # target board support package project name set(XSDK_BSP "standalone_bsp_0" CACHE STRING "Target board support package." FORCE)
-
-
Navigate to the AlphaRTOS build directory.
project_root> cd AlphaRTOS/build
-
Generate the build system using CMake.
project_root/AlphaRTOS/build> cmake -C build_cfg.cmake .
-
If using Xilinx SDK, set up the SDK environment.
-
Import the Eclipse project files generated by CMake, in
AlphaRTOS/build
, into the same workspace. -
Configure the imported project to have a
Project Reference
to the targetbsp
project.
-
-
Build the RTOS using the generated build system. AlphaRTOS currently supports GNU Makefiles and Xilinx SDK 2018.2.
All configurable build options reside at the top of build_cfg.cmake
:
cmake_minimum_required(VERSION 3.3)
#########################
# Configuration Options #
#########################
# set configuration variables
##############################
# Valid Configuration Values #
##############################
# list valid values for configuration variables
Alpha RTOS depends on two other libraries.
- CMSIS 5 - a thin hardware abstraction layer for ARM cores.
- hal - a general hardware abstraction utility library.
The Alpha Automata project keeps a copy of a compatible version of CMSIS at AlphaCMSIS.
AlphaRTOS and its dependencies must be cloned into the same directory before running CMake to generate the build system.
Alpha RTOS is part of a larger Alpha Automata project. Alpha Automata seeks to stand up a framework for building hardware control applications using a embedded controllers and programmable logic.