use the toolchain on the path before asking to download a new one
This commit is contained in:
parent
73d928d79f
commit
351a921bfb
|
@ -22,3 +22,5 @@ README.pdf
|
|||
/downloads
|
||||
/tools
|
||||
/build
|
||||
# local changes only
|
||||
make/local.mk
|
||||
|
|
10
Makefile
10
Makefile
|
@ -70,6 +70,8 @@ LINKER_DIR = $(ROOT)/src/main/target
|
|||
## Build tools, so we all share the same versions
|
||||
# import macros common to all supported build systems
|
||||
include $(ROOT)/make/system-id.mk
|
||||
# developer preferences, edit these at will, they'll be gitignored
|
||||
include $(ROOT)/make/local.mk
|
||||
|
||||
# configure some directories that are relative to wherever ROOT_DIR is located
|
||||
TOOLS_DIR := $(ROOT)/tools
|
||||
|
@ -591,10 +593,10 @@ CCACHE :=
|
|||
endif
|
||||
|
||||
# Tool names
|
||||
CC := $(CCACHE) $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc
|
||||
CPP := $(CCACHE) $(ARM_SDK_DIR)/bin/arm-none-eabi-g++
|
||||
OBJCOPY := $(ARM_SDK_DIR)/bin/arm-none-eabi-objcopy
|
||||
SIZE := $(ARM_SDK_DIR)/bin/arm-none-eabi-size
|
||||
CC := $(CCACHE) $(ARM_SDK_PREFIX)gcc
|
||||
CPP := $(CCACHE) $(ARM_SDK_PREFIX)g++
|
||||
OBJCOPY := $(ARM_SDK_PREFIX)objcopy
|
||||
SIZE := $(ARM_SDK_PREFIX)size
|
||||
|
||||
#
|
||||
# Tool options.
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# override the toolchain version, should match the output from of your version of the toolchain: $(arm-none-eabi-gcc -dumpversion)
|
||||
#GCC_REQUIRED_VERSION=5.4.1
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
# Set up ARM (STM32) SDK
|
||||
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-5_4-2016q2
|
||||
# Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion)
|
||||
GCC_REQUIRED_VERSION := 5.4.1
|
||||
|
||||
.PHONY: arm_sdk_install
|
||||
|
||||
|
@ -271,13 +273,14 @@ zip_clean:
|
|||
#
|
||||
##############################
|
||||
|
||||
GCC_VERSION=$(shell arm-none-eabi-gcc -dumpversion)
|
||||
ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && echo "exists"), exists)
|
||||
ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
|
||||
else
|
||||
ifndef IGNORE_MISSING_TOOLCHAIN
|
||||
ifeq (,$(findstring _install,$(MAKECMDGOALS)))
|
||||
$(error **WARNING** ARM-SDK not in $(ARM_SDK_DIR) Please run 'make arm_sdk_install')
|
||||
endif
|
||||
else ifeq (,$(findstring _install,$(MAKECMDGOALS)))
|
||||
ifeq ($(GCC_VERSION),)
|
||||
$(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo)
|
||||
else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION))
|
||||
$(error **WARNING** your arm-none-eabi-gcc is '$(GCC_VERSION)', but '$(GCC_REQUIRED_VERSION)' is expected. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo)
|
||||
endif
|
||||
# not installed, hope it's in the path...
|
||||
ARM_SDK_PREFIX ?= arm-none-eabi-
|
||||
|
|
Loading…
Reference in New Issue