blob: d8a3af44a10981d5bf1e5025f37011ce196cc799 [file] [log] [blame]
David Brownada28e12017-07-05 13:36:37 -06001#! /bin/bash
2
3# Build the Sample hello program
4
5# In order to build successfully, ZEPHYR_SDK_INSTALL_DIR and
6# ZEPHYR_GCC_VARIANT need to be set, as well as zephyr/zephyr-env.sh
7# must be sourced.
8
9die() {
10 echo error: "$@"
11 exit 1
12}
13
14if [ -z "$ZEPHYR_BASE" ]; then
15 die "Please setup for a Zephyr build before running this script."
16fi
17
18if [ -z "$BOARD" ]; then
19 die "Please set BOARD to a valid board before running this script."
20fi
21
22make -C hello1 BOARD=${BOARD} -j$(nproc) || die "Build hello1"