aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-05-23 12:38:37 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-05-23 12:38:37 +0200
commita14dfc5063ebcdf07e4e7e43ec08eacc3400b20f (patch)
treefaa9ca6e0866ad9b052c47bbde3c788ffbec621c
parent577dc879d3e6e287b03c743e7205375f13bb3081 (diff)
parente710e2a2d1875e4bec2d42e7d4054b11a1195260 (diff)
downloadpx4-firmware-a14dfc5063ebcdf07e4e7e43ec08eacc3400b20f.tar.gz
px4-firmware-a14dfc5063ebcdf07e4e7e43ec08eacc3400b20f.tar.bz2
px4-firmware-a14dfc5063ebcdf07e4e7e43ec08eacc3400b20f.zip
Merge branch 'version_check'
-rw-r--r--makefiles/toolchain_gnu-arm-eabi.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/makefiles/toolchain_gnu-arm-eabi.mk b/makefiles/toolchain_gnu-arm-eabi.mk
index b519e0e7a..808b635bb 100644
--- a/makefiles/toolchain_gnu-arm-eabi.mk
+++ b/makefiles/toolchain_gnu-arm-eabi.mk
@@ -48,6 +48,16 @@ NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
+# Check if the right version of the toolchain is available
+#
+CROSSDEV_VER_SUPPORTED = 4.7
+CROSSDEV_VER_FOUND = $(shell $(CC) -dumpversion)
+
+ifeq (,$(findstring $(CROSSDEV_VER_SUPPORTED),$(CROSSDEV_VER_FOUND)))
+$(error Unsupported version of $(CC), found: $(CROSSDEV_VER_FOUND) instead of $(CROSSDEV_VER_SUPPORTED).x)
+endif
+
+
# XXX this is pulled pretty directly from the fmu Make.defs - needs cleanup
MAXOPTIMIZATION ?= -O3
@@ -76,7 +86,7 @@ ARCHINSTRUMENTATIONDEFINES_CORTEXM4F = -finstrument-functions \
ARCHINSTRUMENTATIONDEFINES_CORTEXM4 = -finstrument-functions \
-ffixed-r10
-ARCHINSTRUMENTATIONDEFINES_CORTEXM3 =
+ARCHINSTRUMENTATIONDEFINES_CORTEXM3 =
# Pick the right set of flags for the architecture.
#
@@ -265,7 +275,7 @@ define SYM_TO_BIN
$(Q) $(OBJCOPY) -O binary $1 $2
endef
-# Take the raw binary $1 and make it into an object file $2.
+# Take the raw binary $1 and make it into an object file $2.
# The symbol $3 points to the beginning of the file, and $3_len
# gives its length.
#