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
|
/downloads
|
||||||
/tools
|
/tools
|
||||||
/build
|
/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
|
## Build tools, so we all share the same versions
|
||||||
# import macros common to all supported build systems
|
# import macros common to all supported build systems
|
||||||
include $(ROOT)/make/system-id.mk
|
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
|
# configure some directories that are relative to wherever ROOT_DIR is located
|
||||||
TOOLS_DIR := $(ROOT)/tools
|
TOOLS_DIR := $(ROOT)/tools
|
||||||
|
@ -591,10 +593,10 @@ CCACHE :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Tool names
|
# Tool names
|
||||||
CC := $(CCACHE) $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc
|
CC := $(CCACHE) $(ARM_SDK_PREFIX)gcc
|
||||||
CPP := $(CCACHE) $(ARM_SDK_DIR)/bin/arm-none-eabi-g++
|
CPP := $(CCACHE) $(ARM_SDK_PREFIX)g++
|
||||||
OBJCOPY := $(ARM_SDK_DIR)/bin/arm-none-eabi-objcopy
|
OBJCOPY := $(ARM_SDK_PREFIX)objcopy
|
||||||
SIZE := $(ARM_SDK_DIR)/bin/arm-none-eabi-size
|
SIZE := $(ARM_SDK_PREFIX)size
|
||||||
|
|
||||||
#
|
#
|
||||||
# Tool options.
|
# 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
|
# Set up ARM (STM32) SDK
|
||||||
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-5_4-2016q2
|
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
|
.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)
|
ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && echo "exists"), exists)
|
||||||
ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
|
ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
|
||||||
else
|
else ifeq (,$(findstring _install,$(MAKECMDGOALS)))
|
||||||
ifndef IGNORE_MISSING_TOOLCHAIN
|
ifeq ($(GCC_VERSION),)
|
||||||
ifeq (,$(findstring _install,$(MAKECMDGOALS)))
|
$(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)
|
||||||
$(error **WARNING** ARM-SDK not in $(ARM_SDK_DIR) Please run 'make arm_sdk_install')
|
else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION))
|
||||||
endif
|
$(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
|
endif
|
||||||
# not installed, hope it's in the path...
|
# not installed, hope it's in the path...
|
||||||
ARM_SDK_PREFIX ?= arm-none-eabi-
|
ARM_SDK_PREFIX ?= arm-none-eabi-
|
||||||
|
|
Loading…
Reference in New Issue