blob: 4bae34aa3409c511a209b0a650ef6c18ba5c1120 [file] [log] [blame]
Manuel Pégourié-Gonnard77d56bb2015-07-28 15:00:37 +02001#!/bin/sh
2
Andres AGb2fdd042016-09-22 14:17:46 +01003# 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é-Gonnard77d56bb2015-07-28 15:00:37 +020012
13set -eu
14
Andres AGb2fdd042016-09-22 14:17:46 +010015check_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é-Gonnard77d56bb2015-07-28 15:00:37 +020024
25yotta_build()
26{
27 TARGET=$1
Manuel Pégourié-Gonnardd2655ac2016-01-08 15:02:05 +010028
29 echo; echo "*** $TARGET (release) ***"
Manuel Pégourié-Gonnard067523e2015-10-30 11:15:40 +010030 yt -t $TARGET build
Manuel Pégourié-Gonnardd2655ac2016-01-08 15:02:05 +010031
32 echo; echo "*** $TARGET (debug) ***"
33 yt -t $TARGET build -d
Manuel Pégourié-Gonnard77d56bb2015-07-28 15:00:37 +020034}
35
Andres AGb2fdd042016-09-22 14:17:46 +010036# Make sure the tools we need are available.
37check_tools "arm-none-eabi-gcc" "armcc" "yotta"
38
39yotta/create-module.sh
40cd yotta/module
41yt update || true # needs network
42
Manuel Pégourié-Gonnard77d56bb2015-07-28 15:00:37 +020043if uname -a | grep 'Linux.*x86' >/dev/null; then
44 yotta_build x86-linux-native
45fi
46if uname -a | grep 'Darwin.*x86' >/dev/null; then
47 yotta_build x86-osx-native
48fi
Andres AGb2fdd042016-09-22 14:17:46 +010049
50# armcc build tests.
51yotta_build frdm-k64f-armcc
52#yotta_build nordic-nrf51822-16k-armcc
53
54# arm-none-eabi-gcc build tests.
55yotta_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