yotta-build.sh 1.4 KB

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