Manuel Pégourié-Gonnard | 77d56bb | 2015-07-28 15:00:37 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 3 | # yotta-build.sh |
| 4 | # |
| 5 | # This file is part of mbed TLS (https://tls.mbed.org) |
| 6 | # |
| 7 | # Copyright (c) 2015-2016, ARM Limited, All Rights Reserved |
| 8 | # |
| 9 | # Purpose |
| 10 | # |
| 11 | # To run test builds of the yotta module for all supported targets. |
Manuel Pégourié-Gonnard | 77d56bb | 2015-07-28 15:00:37 +0200 | [diff] [blame] | 12 | |
| 13 | set -eu |
| 14 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 15 | check_tools() |
| 16 | { |
| 17 | for TOOL in "$@"; do |
| 18 | if ! `hash "$TOOL" >/dev/null 2>&1`; then |
| 19 | echo "$TOOL not found!" >&2 |
| 20 | exit 1 |
| 21 | fi |
| 22 | done |
| 23 | } |
Manuel Pégourié-Gonnard | 77d56bb | 2015-07-28 15:00:37 +0200 | [diff] [blame] | 24 | |
| 25 | yotta_build() |
| 26 | { |
| 27 | TARGET=$1 |
Manuel Pégourié-Gonnard | d2655ac | 2016-01-08 15:02:05 +0100 | [diff] [blame] | 28 | |
| 29 | echo; echo "*** $TARGET (release) ***" |
Manuel Pégourié-Gonnard | 067523e | 2015-10-30 11:15:40 +0100 | [diff] [blame] | 30 | yt -t $TARGET build |
Manuel Pégourié-Gonnard | d2655ac | 2016-01-08 15:02:05 +0100 | [diff] [blame] | 31 | |
| 32 | echo; echo "*** $TARGET (debug) ***" |
| 33 | yt -t $TARGET build -d |
Manuel Pégourié-Gonnard | 77d56bb | 2015-07-28 15:00:37 +0200 | [diff] [blame] | 34 | } |
| 35 | |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 36 | # Make sure the tools we need are available. |
| 37 | check_tools "arm-none-eabi-gcc" "armcc" "yotta" |
| 38 | |
| 39 | yotta/create-module.sh |
| 40 | cd yotta/module |
| 41 | yt update || true # needs network |
| 42 | |
Manuel Pégourié-Gonnard | 77d56bb | 2015-07-28 15:00:37 +0200 | [diff] [blame] | 43 | if uname -a | grep 'Linux.*x86' >/dev/null; then |
| 44 | yotta_build x86-linux-native |
| 45 | fi |
| 46 | if uname -a | grep 'Darwin.*x86' >/dev/null; then |
| 47 | yotta_build x86-osx-native |
| 48 | fi |
Andres AG | b2fdd04 | 2016-09-22 14:17:46 +0100 | [diff] [blame] | 49 | |
| 50 | # armcc build tests. |
| 51 | yotta_build frdm-k64f-armcc |
| 52 | #yotta_build nordic-nrf51822-16k-armcc |
| 53 | |
| 54 | # arm-none-eabi-gcc build tests. |
| 55 | yotta_build frdm-k64f-gcc |
| 56 | #yotta_build st-nucleo-f401re-gcc # dirent |
| 57 | #yotta_build stm32f429i-disco-gcc # fails in mbed-hal-st-stm32f4 |
| 58 | #yotta_build nordic-nrf51822-16k-gcc # fails in minar-platform |
| 59 | #yotta_build bbc-microbit-classic-gcc # fails in minar-platform |
| 60 | #yotta_build st-stm32f439zi-gcc # fails in mbed-hal-st-stm32f4 |
| 61 | #yotta_build st-stm32f429i-disco-gcc # fails in mbed-hal-st-stm32f4 |