David Brown | ada28e1 | 2017-07-05 13:36:37 -0600 | [diff] [blame] | 1 | #! /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 | |
| 9 | die() { |
| 10 | echo error: "$@" |
| 11 | exit 1 |
| 12 | } |
| 13 | |
| 14 | if [ -z "$ZEPHYR_BASE" ]; then |
| 15 | die "Please setup for a Zephyr build before running this script." |
| 16 | fi |
| 17 | |
| 18 | if [ -z "$BOARD" ]; then |
| 19 | die "Please set BOARD to a valid board before running this script." |
| 20 | fi |
| 21 | |
Marti Bolivar | bf909a1 | 2017-11-13 19:43:46 -0500 | [diff] [blame] | 22 | make BOARD=${BOARD} -j$(nproc) hello1 || die "Build hello1" |