build: add arc support to issm toolchain

Jira: ZEP-186
Change-Id: Ib58aaba3020d8db18130f7d73a394a79c972272a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
This commit is contained in:
Juan Manuel Cruz 2016-04-14 12:12:57 -05:00 committed by Anas Nashif
commit a0ed1ff1dc
3 changed files with 43 additions and 25 deletions

View file

@ -100,16 +100,16 @@ To install ISSM use the link provided to download from the Intel Developer Zone:
`ISSM 2016 Download`_ and install it into your system. `ISSM 2016 Download`_ and install it into your system.
Finally, configure your environment variables for the ISSM 2016 toolchain. Finally, configure your environment variables for the ISSM 2016 toolchain.
For example, using the default installation path for ISSM: For example, using the installation path for ISSM as:
:file:`/c/IntelSWTools/ISSM_2016.0.27/tools/compiler` :file:`/c/IntelSWTools/ISSM_2016`
.. code-block:: console .. code-block:: console
export ZEPHYR_GCC_VARIANT=iamcu export ZEPHYR_GCC_VARIANT=issm
export IAMCU_TOOLCHAIN_PATH=/c/IntelSWTools/ISSM_2016.0.27/tools/compiler export ISSM_INSTALLATION_PATH=/c/IntelSWTools/ISSM_2016
.. note:: The format of the location for the toolchain installation directory .. note:: The format of the location for the toolchain installation directory
(e.g. :envvar:`IAMCU_TOOLCHAIN_PATH`) must be in the linux format. E.g. (e.g. :envvar:`ISSM_INSTALLATION_PATH`) must be in the linux format. E.g.
:file:`C:\toolchain` would be written as :file:`/c/toolchain/`. :file:`C:\toolchain` would be written as :file:`/c/toolchain/`.
.. _GIT Download: https://git-scm.com/download/win .. _GIT Download: https://git-scm.com/download/win

View file

@ -1,20 +0,0 @@
ifndef IAMCU_TOOLCHAIN_PATH
$(error IAMCU_TOOLCHAIN_PATH is not set)
endif
CROSS_COMPILE_TARGET_x86 = i586-intel-elfiamcu
CROSS_COMPILE_x86=${IAMCU_TOOLCHAIN_PATH}/bin/${CROSS_COMPILE_TARGET_x86}-
TOOLCHAIN_CFLAGS_x86 = -I${IAMCU_TOOLCHAIN_PATH}/$(CROSS_COMPILE_TARGET_x86)/include/
CROSS_COMPILE_x86_version = $(shell $(CROSS_COMPILE_x86)gcc -dumpversion)
CROSS_COMPILE= $(CROSS_COMPILE_$(ARCH))
LIB_INCLUDE_DIR_x86 = -L $(IAMCU_TOOLCHAIN_PATH)/lib/gcc/$(CROSS_COMPILE_TARGET_x86)/$(CROSS_COMPILE_x86_version)
LIB_INCLUDE_DIR_x86 += -L ${IAMCU_TOOLCHAIN_PATH}/$(CROSS_COMPILE_TARGET_x86)/lib
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
TOOLCHAIN_LIBS = gcc
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS

View file

@ -0,0 +1,38 @@
ifndef ISSM_INSTALLATION_PATH
$(error ISSM_INSTALLATION_PATH is not set)
endif
# IA_VERSION and ARC_VERSION can be used to adjust the toolchain
# paths inside the ISSM installation to use an specific version, e.g.:
# IA_VERSION ?= gcc-ia/5.2.1
# ARC_VERSION ?= gcc-arc/4.8.5
IA_VERSION ?= .
ARC_VERSION ?= .
ISSM_TOOLCHAIN_GCC_IA_ROOT ?= $(ISSM_INSTALLATION_PATH)/tools/compiler/$(IA_VERSION)
ISSM_TOOLCHAIN_GCC_ARC_ROOT ?= $(ISSM_INSTALLATION_PATH)/tools/compiler/$(ARC_VERSION)
#x86
CROSS_COMPILE_TARGET_x86 = i586-intel-elfiamcu
CROSS_COMPILE_x86=$(ISSM_TOOLCHAIN_GCC_IA_ROOT)/bin/$(CROSS_COMPILE_TARGET_x86)-
CROSS_COMPILE_x86_version = $(shell $(CROSS_COMPILE_x86)gcc -dumpversion)
LIB_INCLUDE_DIR_x86 = -L $(ISSM_TOOLCHAIN_GCC_IA_ROOT)/lib/gcc/$(CROSS_COMPILE_TARGET_x86)/$(CROSS_COMPILE_x86_version)
LIB_INCLUDE_DIR_x86 += -L $(ISSM_TOOLCHAIN_GCC_IA_ROOT)/$(CROSS_COMPILE_TARGET_x86)/lib
TOOLCHAIN_CFLAGS_x86 = -I$(ISSM_TOOLCHAIN_GCC_IA_ROOT)/$(CROSS_COMPILE_TARGET_x86)/include/
# arc
CROSS_COMPILE_TARGET_arc = arc-elf32
CROSS_COMPILE_arc=$(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/bin/$(CROSS_COMPILE_TARGET_arc)-
CROSS_COMPILE_arc_version = $(shell $(CROSS_COMPILE_arc)gcc -dumpversion)
LIB_INCLUDE_DIR_arc = -L $(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/lib/gcc/$(CROSS_COMPILE_TARGET_arc)/$(CROSS_COMPILE_arc_version)
LIB_INCLUDE_DIR_arc += -L $(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/$(CROSS_COMPILE_TARGET_arc)/lib
TOOLCHAIN_CFLAGS_arc = -I$(ISSM_TOOLCHAIN_GCC_ARC_ROOT)/$(CROSS_COMPILE_TARGET_arc)/include
TOOLCHAIN_LIBS = gcc
CROSS_COMPILE= $(CROSS_COMPILE_$(ARCH))
LIB_INCLUDE_DIR = $(LIB_INCLUDE_DIR_$(ARCH))
TOOLCHAIN_CFLAGS = $(TOOLCHAIN_CFLAGS_$(ARCH))
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS