#!/bin/bash ############################################################################## # Copyright (c) 2026 Eclipse ThreadX contributors # # This program and the accompanying materials are made available under the # terms of the MIT License which is available at # https://opensource.org/licenses/MIT. # # AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5.5). # The AI-generated portions may be considered public domain (CC0-1.0) # and not subject to the project's licence. The human contributor has # reviewed and verified that the code is correct. # # SPDX-License-Identifier: MIT and CC0-1.0 ############################################################################## # Build the ThreadX library and the Erbium demo, build/demo_threadx.elf. set -eu SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) BUILD_DIR=${BUILD_DIR:-"${SCRIPT_DIR}/build"} cmake -S "${SCRIPT_DIR}" -B "${BUILD_DIR}" -GNinja \ -DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIR}/erbium_gnu.cmake" cmake --build "${BUILD_DIR}" --target demo_threadx printf 'Built %s\n' "${BUILD_DIR}/demo_threadx.elf"