diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-12-31 18:45:06 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-12-31 18:45:48 +0100 |
commit | f855b1d7bfdc36a65703fdf9a638ad016c409bbe (patch) | |
tree | 3fcedec43e1387c1410add7f3e5f3e958050e010 /target | |
parent | 1c7ad1a115614a32ac299a9ad5341a9b4157e47b (diff) |
add basic zephyr experiments, add xtensa newlib support
Diffstat (limited to 'target')
-rw-r--r-- | target/Makefile | 12 | ||||
-rw-r--r-- | target/config/Config.in.libc | 13 | ||||
-rw-r--r-- | target/config/Config.in.os | 5 | ||||
-rw-r--r-- | target/zephyr/Config.in | 0 | ||||
-rw-r--r-- | target/zephyr/Makefile | 33 | ||||
-rw-r--r-- | target/zephyr/arch.lst | 4 |
6 files changed, 65 insertions, 2 deletions
diff --git a/target/Makefile b/target/Makefile index 99e0fff14..9882e4d84 100644 --- a/target/Makefile +++ b/target/Makefile @@ -140,6 +140,11 @@ config-prepare: $(ADK_TOPDIR)/.config >$(BUILD_DIR)/.frostedapps endif +ifeq ($(ADK_TARGET_OS_ZEPHYR),y) +config-prepare: $(ADK_TOPDIR)/.config + echo foo +endif + ifeq ($(ADK_TARGET_OS_FROSTED),y) prepare: frosted-prepare compile: frosted-compile @@ -147,6 +152,13 @@ install: frosted-install targethelp: frosted-targethelp endif +ifeq ($(ADK_TARGET_OS_ZEPHYR),y) +prepare: zephyr-prepare +compile: zephyr-compile +install: zephyr-install +targethelp: zephyr-targethelp +endif + ifeq ($(ADK_TARGET_OS_LINUX),y) prepare: $(ADK_TARGET_ARCH)-prepare compile: $(ADK_TARGET_ARCH)-compile diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc index 76c36e044..91ce9f091 100644 --- a/target/config/Config.in.libc +++ b/target/config/Config.in.libc @@ -127,7 +127,9 @@ config ADK_TARGET_LIB_NEWLIB ADK_TARGET_ARCH_X86 || \ ADK_TARGET_ARCH_X86_64 || \ ADK_TARGET_ARCH_XTENSA) && \ - (ADK_TARGET_OS_BAREMETAL || ADK_TARGET_OS_FROSTED) + (ADK_TARGET_OS_BAREMETAL || \ + ADK_TARGET_OS_FROSTED || \ + ADK_TARGET_OS_ZEPHYR ) help https://sourceware.org/newlib/ @@ -166,12 +168,19 @@ config ADK_TARGET_LIB_MUSL_GIT config ADK_TARGET_LIB_NEWLIB_2_5_0 bool "2.5.0" - depends on ADK_TARGET_LIB_NEWLIB && !ADK_TARGET_ARCH_RISCV && !ADK_TARGET_OS_FROSTED + depends on ADK_TARGET_LIB_NEWLIB \ + && !ADK_TARGET_ARCH_RISCV \ + && !ADK_TARGET_ARCH_XTENSA \ + && !ADK_TARGET_OS_FROSTED config ADK_TARGET_LIB_NEWLIB_RISCV bool "2.4.0-riscv" depends on ADK_TARGET_LIB_NEWLIB && ADK_TARGET_ARCH_RISCV +config ADK_TARGET_LIB_NEWLIB_XTENSA + bool "xtensa" + depends on ADK_TARGET_LIB_NEWLIB && ADK_TARGET_ARCH_XTENSA + config ADK_TARGET_LIB_NEWLIB_FROSTED bool "frosted-git" depends on ADK_TARGET_LIB_NEWLIB && ADK_TARGET_OS_FROSTED diff --git a/target/config/Config.in.os b/target/config/Config.in.os index 2eb420e14..6d77dfa4b 100644 --- a/target/config/Config.in.os +++ b/target/config/Config.in.os @@ -14,6 +14,11 @@ config ADK_TARGET_OS_FROSTED help Create a frosted appliance or toolchain. +config ADK_TARGET_OS_ZEPHYR + bool "Zephyr" + help + Create a zephyr appliance or toolchain. + config ADK_TARGET_OS_BAREMETAL bool "Bare metal" help diff --git a/target/zephyr/Config.in b/target/zephyr/Config.in new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/target/zephyr/Config.in diff --git a/target/zephyr/Makefile b/target/zephyr/Makefile new file mode 100644 index 000000000..2f937225c --- /dev/null +++ b/target/zephyr/Makefile @@ -0,0 +1,33 @@ +# 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 + +prepare: + if [ ! -d $(BUILD_DIR)/zephyr ]; then \ + cd $(BUILD_DIR) ;\ + git clone https://github.com/zephyrproject-rtos/zephyr.git ;\ + fi + if [ ! -d $(BUILD_DIR)/zephyr-kconfig ]; then \ + mkdir $(BUILD_DIR)/zephyr-kconfig ;\ + fi + cd $(BUILD_DIR)/zephyr-kconfig && \ + PATH='$(HOST_PATH)' cmake $(BUILD_DIR)/zephyr/scripts && \ + make + source $(BUILD_DIR)/zephyr/zephyr-env.sh + +compile: + export GCCXTENSA_TOOLCHAIN_PATH="$(TOOLCHAIN_DIR)" + export ZEPHYR_GCC_VARIANT=gccxtensa + if [ ! -d $(BUILD_DIR)/zephyr/samples/hello_world/build ]; then \ + mkdir $(BUILD_DIR)/zephyr/samples/hello_world/build ;\ + fi + cd $(BUILD_DIR)/zephyr/samples/hello_world/build && \ + cmake -DBOARD=qemu_xtensa .. && \ + make + +install: + +targethelp: + +clean: diff --git a/target/zephyr/arch.lst b/target/zephyr/arch.lst new file mode 100644 index 000000000..951bee724 --- /dev/null +++ b/target/zephyr/arch.lst @@ -0,0 +1,4 @@ +arc +arm +x86_64 +xtensa |