Browse Source

add bare-metal toolchain support for cr16 architecture

Waldemar Brodkorb 5 years ago
parent
commit
285cf52be9

+ 1 - 1
scripts/create-menu

@@ -93,7 +93,7 @@ for arch in $(cat $topdir/target/arch.lst);do
 		alpha|ia64|sh|sparc64|s390|tile|ppc64|mips64|x86_64)
 		  printf "\tdepends on ADK_TARGET_OS_LINUX\n" >> $topdir/target/config/Config.in.arch.choice
 		  ;;
-		epiphany|m32r|mn10300|moxie|msp430|v850)
+		cr16|epiphany|m32r|mn10300|moxie|msp430|v850)
 		  printf "\tdepends on ADK_TARGET_OS_BAREMETAL\n" >> $topdir/target/config/Config.in.arch.choice
 		  ;;
 	esac

+ 1 - 0
target/arch.lst

@@ -5,6 +5,7 @@ arm
 avr32
 bfin
 c6x
+cr16
 cris
 epiphany
 frv

+ 3 - 0
target/config/Config.in.compiler

@@ -25,6 +25,7 @@ default ADK_TOOLCHAIN_GCC_5_3_OR1K if ADK_TARGET_ARCH_OR1K
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_XTENSA
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_BFIN
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_C6X
+default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_CR16
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_H8300
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_ARCH_FRV
 default ADK_TOOLCHAIN_GCC_6_1_0 if ADK_TARGET_CPU_MIPS_MIPS32R6 || ADK_TARGET_CPU_MIPS64_MIPS64R6
@@ -54,6 +55,7 @@ config ADK_TOOLCHAIN_GCC_5_4_0
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_C6X
+	depends on !ADK_TARGET_ARCH_CR16
 	depends on !ADK_TARGET_ARCH_FRV
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_M32R
@@ -71,6 +73,7 @@ config ADK_TOOLCHAIN_GCC_4_9_3
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_C6X
+	depends on !ADK_TARGET_ARCH_CR16
 	depends on !ADK_TARGET_ARCH_H8300
 	depends on !ADK_TARGET_ARCH_METAG
 	depends on !ADK_TARGET_ARCH_OR1K

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

@@ -345,6 +345,11 @@ config ADK_TARGET_CPU_C6X
 	select ADK_TARGET_WITHOUT_MMU
 	depends on ADK_TARGET_ARCH_C6X
 
+# cr16
+config ADK_TARGET_CPU_CR16
+	bool "cr16"
+	depends on ADK_TARGET_ARCH_CR16
+
 # cris
 config ADK_TARGET_CPU_CRIS_CRISV10
 	bool "crisv10"
@@ -1654,6 +1659,7 @@ config ADK_TARGET_CPU_ARCH
 	default "avr32" if ADK_TARGET_ARCH_AVR32
 	default "bfin" if ADK_TARGET_ARCH_BFIN
 	default "c6x" if ADK_TARGET_ARCH_C6X
+	default "cr16" if ADK_TARGET_ARCH_CR16
 	default "cris" if ADK_TARGET_CPU_CRIS_CRISV10
 	default "crisv32" if ADK_TARGET_CPU_CRIS_CRISV32
 	default "epiphany" if ADK_TARGET_ARCH_EPIPHANY

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

@@ -88,6 +88,7 @@ config ADK_TARGET_LIB_NEWLIB
 		ADK_TARGET_ARCH_ARC || \
 		ADK_TARGET_ARCH_ARM || \
 		ADK_TARGET_ARCH_BFIN || \
+		ADK_TARGET_ARCH_CR16 || \
 		ADK_TARGET_ARCH_CRIS || \
 		ADK_TARGET_ARCH_EPIPHANY || \
 		ADK_TARGET_ARCH_FRV || \

+ 4 - 0
target/cr16/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

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