2013-02-16 17:32:19 +01:00
|
|
|
############################################################################
|
|
|
|
# arch/arm/src/armv6-m/Toolchain.defs
|
|
|
|
#
|
2020-05-13 16:18:31 +02:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2013-02-16 17:32:19 +01:00
|
|
|
#
|
2020-05-13 16:18:31 +02:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2013-02-16 17:32:19 +01:00
|
|
|
#
|
2020-05-13 16:18:31 +02:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2013-02-16 17:32:19 +01:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
# Setup for the selected toolchain
|
|
|
|
|
|
|
|
#
|
|
|
|
# Handle old-style chip-specific toolchain names in the absence of
|
|
|
|
# a new-style toolchain specification, force the selection of a single
|
|
|
|
# toolchain and allow the selected toolchain to be overridden by a
|
|
|
|
# command-line selection.
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(filter y, $(CONFIG_ARMV6M_TOOLCHAIN_BUILDROOT)),y)
|
|
|
|
CONFIG_ARMV6M_TOOLCHAIN ?= BUILDROOT
|
|
|
|
endif
|
2013-06-13 19:04:18 +02:00
|
|
|
|
|
|
|
ifeq ($(filter y, $(CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIL)),y)
|
2020-05-18 16:18:15 +02:00
|
|
|
CONFIG_ARMV6M_TOOLCHAIN ?= GNU_EABI
|
2013-06-13 19:04:18 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(filter y, $(CONFIG_ARMV6M_TOOLCHAIN_GNU_EABIW)),y)
|
2020-05-18 16:18:15 +02:00
|
|
|
CONFIG_ARMV6M_TOOLCHAIN ?= GNU_EABI
|
2013-02-16 17:32:19 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Supported toolchains
|
|
|
|
#
|
|
|
|
# TODO - It's likely that all of these toolchains now support the
|
|
|
|
# CortexM0. Since they are all GCC-based, we could almost
|
|
|
|
# certainly simplify this further.
|
|
|
|
#
|
|
|
|
# Each toolchain definition should set:
|
|
|
|
#
|
|
|
|
# CROSSDEV The GNU toolchain triple (command prefix)
|
2013-06-13 19:04:18 +02:00
|
|
|
# ARCROSSDEV If required, an alternative prefix used when
|
2013-02-16 17:32:19 +01:00
|
|
|
# invoking ar and nm.
|
|
|
|
# ARCHCPUFLAGS CPU-specific flags selecting the instruction set
|
|
|
|
# options, etc.
|
|
|
|
# MAXOPTIMIZATION The maximum optimization level that results in
|
|
|
|
# reliable code generation.
|
|
|
|
#
|
|
|
|
|
2014-01-24 14:45:35 +01:00
|
|
|
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
|
|
|
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
|
|
|
endif
|
|
|
|
|
2013-02-16 17:32:19 +01:00
|
|
|
# NuttX buildroot under Linux or Cygwin
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),BUILDROOT)
|
|
|
|
CROSSDEV ?= arm-nuttx-eabi-
|
|
|
|
ARCROSSDEV ?= arm-nuttx-eabi-
|
|
|
|
ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft
|
|
|
|
endif
|
|
|
|
|
2020-05-18 16:18:15 +02:00
|
|
|
# Generic GNU EABI toolchain
|
2013-02-16 17:32:19 +01:00
|
|
|
|
2020-05-18 16:18:15 +02:00
|
|
|
ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABI)
|
2013-02-16 17:32:19 +01:00
|
|
|
CROSSDEV ?= arm-none-eabi-
|
|
|
|
ARCROSSDEV ?= arm-none-eabi-
|
2015-07-31 16:39:26 +02:00
|
|
|
ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft
|
2013-06-13 19:04:18 +02:00
|
|
|
endif
|
|
|
|
|
2013-04-09 02:34:16 +02:00
|
|
|
# Individual tools may limit the optimizatin level but, by default, the
|
2019-09-29 20:52:20 +02:00
|
|
|
# optimization level will be set to -Os
|
2013-04-09 02:34:16 +02:00
|
|
|
|
|
|
|
MAXOPTIMIZATION ?= -Os
|