Separate out cortex-m0 compiler tests in configure
authorKeith Packard <keithp@keithp.com>
Tue, 21 May 2013 18:31:05 +0000 (11:31 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 21 May 2013 18:31:05 +0000 (11:31 -0700)
The summon arm toolchain doesn't work for cortex-m0 parts, but the
linaro toolchain does. Look in /usr/bin for the -m0 compiler but
continue to use /opt/cortex/bin for the -m3 compiler

Signed-off-by: Keith Packard <keithp@keithp.com>
configure.ac
src/Makefile

index 4a124c901982fcf25bd209cb0db5100bb51178eb..ba4fb30278f1761de948e2f0b97e14c92011759f 100644 (file)
@@ -185,9 +185,14 @@ if test "x$HAVE_SDCC" = "xno"; then
        AC_MSG_WARN([No sdcc found, cc1111 binaries will not be built])
 fi
 
-AC_CHECK_PROG([HAVE_ARM_GCC], [arm-none-eabi-gcc], yes, no)
+AC_CHECK_PROG([HAVE_ARM_GCC],[arm-none-eabi-gcc], yes, no,[/opt/cortex/bin])
 if test "x$HAVE_ARM_GCC" = "xno"; then
-       AC_MSG_WARN([No arm compiler found, STM32L and LPC11U14 binaries will not be built])
+       AC_MSG_WARN([No summon toolchain arm compiler found, STM32L binaries will not be built])
+fi
+
+AC_CHECK_PROG([HAVE_ARM_M0_GCC], [arm-none-eabi-gcc], yes, no,[/usr/bin])
+if test "x$HAVE_ARM_M0_GCC" = "xno"; then
+       AC_MSG_WARN([No linaro toolchain arm cortex-m0 compiler found, LPC11U14 binaries will not be built])
 fi
 
 AC_CHECK_PROG([HAVE_NICKLE], [nickle], yes, no)
@@ -243,7 +248,8 @@ echo ""
 echo "  Package: ${PACKAGE_NAME} ${PACKAGE_VERSION}"
 echo ""
 echo "  Configuration"
-echo "    STM32L/LPC11U14 support.....: ${HAVE_ARM_GCC}"
+echo "    STM32L support..............: ${HAVE_ARM_GCC}"
+echo "    LPC11U14 support............: ${HAVE_ARM_M0_GCC}"
 echo "    CC1111 support..............: ${HAVE_SDCC}"
 echo "    Android support.............: ${HAVE_ANDROID_SDK}"
 echo "    STlink support..............: ${HAVE_STLINK}"
index 5851b2a8905247df0b215b2e973d451e0ac54388..7ffc52d6431d9b90d9621668f12226f849a0a37d 100644 (file)
@@ -35,7 +35,9 @@ ARMDIRS=\
        telegps-v0.1 telegps-v0.1/flash-loader \
        stm-bringup stm-demo \
        telelco-v0.2 telelco-v0.2/flash-loader \
-       telescience-v0.2 telescience-v0.2/flash-loader \
+       telescience-v0.2 telescience-v0.2/flash-loader
+
+ARMM0DIRS=\
        easymini-v0.1
 
 ifneq ($(shell which sdcc),)
@@ -46,10 +48,14 @@ ifneq ($(shell which avr-gcc),)
        SUBDIRS += $(AVRDIRS)
 endif
 
-ifneq ($(shell which arm-none-eabi-gcc),)
+ifneq ($(shell which /opt/cortex/bin/arm-none-eabi-gcc),)
        SUBDIRS += $(ARMDIRS)
 endif
 
+ifneq ($(shell which /usr/bin/arm-none-eabi-gcc),)
+       SUBDIRS += $(ARMM0DIRS)
+endif
+
 ALLDIRS=$(SDCCDIRS) $(AVRDIRS) $(ARMDIRS)
 
 all: all-local all-recursive