Browse Source

add support for epiphany bare-metal toolchain building

Waldemar Brodkorb 5 years ago
parent
commit
8f7c6a8536
6 changed files with 14 additions and 5 deletions
  1. 0 4
      mk/vars.mk
  2. 1 0
      target/arch.lst
  3. 7 0
      target/config/Config.in.cpu
  4. 1 0
      target/config/Config.in.libc
  5. 4 0
      target/epiphany/Makefile
  6. 1 1
      toolchain/Makefile

+ 0 - 4
mk/vars.mk

@@ -79,11 +79,7 @@ ifeq ($(ADK_TARGET_ARCH_C6X),y)
 GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_LINUXTYPE)
 endif
 ifeq ($(ADK_TARGET_LIB_NEWLIB),y)
-ifeq ($(ADK_TARGET_ARCH_MOXIE),y)
 GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_SUFFIX)
-else
-GNU_TARGET_NAME:=	$(ADK_TARGET_CPU_ARCH)-$(ADK_VENDOR)-$(ADK_TARGET_SUFFIX)
-endif
 endif
 TARGET_CROSS:=		$(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-
 TARGET_COMPILER_PREFIX?=${TARGET_CROSS}

+ 1 - 0
target/arch.lst

@@ -6,6 +6,7 @@ avr32
 bfin
 c6x
 cris
+epiphany
 frv
 h8300
 hppa

+ 7 - 0
target/config/Config.in.cpu

@@ -340,6 +340,12 @@ config ADK_TARGET_CPU_CRIS_CRISV32
 	select ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_CRIS
 
+# epiphany
+config ADK_TARGET_CPU_EPIPHANY
+	bool "epiphany"
+	select ADK_TARGET_WITH_MMU
+	depends on ADK_TARGET_ARCH_EPIPHANY
+
 # fr-v
 config ADK_TARGET_CPU_FRV
 	bool "fr-v"
@@ -1597,6 +1603,7 @@ config ADK_TARGET_CPU_ARCH
 	default "c6x" if ADK_TARGET_ARCH_C6X
 	default "cris" if ADK_TARGET_CPU_CRIS_CRISV10
 	default "crisv32" if ADK_TARGET_CPU_CRIS_CRISV32
+	default "epiphany" if ADK_TARGET_ARCH_EPIPHANY
 	default "frv" if ADK_TARGET_ARCH_FRV
 	default "i486" if ADK_TARGET_CPU_X86_I486
 	default "i586" if ADK_TARGET_CPU_X86_I586

+ 1 - 0
target/config/Config.in.libc

@@ -86,6 +86,7 @@ config ADK_TARGET_LIB_NEWLIB
 		ADK_TARGET_ARCH_ARM || \
 		ADK_TARGET_ARCH_BFIN || \
 		ADK_TARGET_ARCH_CRIS || \
+		ADK_TARGET_ARCH_EPIPHANY || \
 		ADK_TARGET_ARCH_FRV || \
 		ADK_TARGET_ARCH_H8300 || \
 		ADK_TARGET_ARCH_LM32 || \

+ 4 - 0
target/epiphany/Makefile

@@ -0,0 +1,4 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk

+ 1 - 1
toolchain/Makefile

@@ -37,7 +37,7 @@ ELF2FLT:=elf2flt-install
 endif
 
 # disable gdb for some architectures
-ifeq ($(ADK_TARGET_ARCH_ARC)$(ADK_TARGET_ARCH_NDS32)$(ADK_TARGET_ARCH_METAG)$(ADK_TARGET_ARCH_OR1K),)
+ifeq ($(ADK_TARGET_ARCH_ARC)$(ADK_TARGET_ARCH_EPIPHANY)$(ADK_TARGET_ARCH_NDS32)$(ADK_TARGET_ARCH_METAG)$(ADK_TARGET_ARCH_OR1K),)
 TARGETS+=gdb
 GDB:=gdb-install
 endif