diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e51aee06..f8735718 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,7 @@ on: - microblazeel-zephyr-elf - mips-zephyr-elf - nios2-zephyr-elf + - or1k-zephyr-elf - riscv64-zephyr-elf - sparc-zephyr-elf - x86_64-zephyr-elf @@ -169,6 +170,7 @@ jobs: microblazeel-zephyr-elf) build_target_microblazeel_zephyr_elf="y";; mips-zephyr-elf) build_target_mips_zephyr_elf="y";; nios2-zephyr-elf) build_target_nios2_zephyr_elf="y";; + or1k-zephyr-elf) build_target_or1k_zephyr_elf="y";; riscv64-zephyr-elf) build_target_riscv64_zephyr_elf="y";; sparc-zephyr-elf) build_target_sparc_zephyr_elf="y";; x86_64-zephyr-elf) build_target_x86_64_zephyr_elf="y";; @@ -217,6 +219,7 @@ jobs: build_target_microblazeel_zephyr_elf="y" build_target_mips_zephyr_elf="y" build_target_nios2_zephyr_elf="y" + build_target_or1k_zephyr_elf="y" build_target_riscv64_zephyr_elf="y" build_target_sparc_zephyr_elf="y" build_target_x86_64_zephyr_elf="y" @@ -305,6 +308,7 @@ jobs: [ "${build_target_microblazeel_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"microblazeel-zephyr-elf",' [ "${build_target_mips_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"mips-zephyr-elf",' [ "${build_target_nios2_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"nios2-zephyr-elf",' + [ "${build_target_or1k_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"or1k-zephyr-elf",' [ "${build_target_riscv64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"riscv64-zephyr-elf",' [ "${build_target_sparc_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"sparc-zephyr-elf",' [ "${build_target_x86_64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"x86_64-zephyr-elf",' @@ -1551,6 +1555,9 @@ jobs: nios2-zephyr-elf) PLATFORM_ARGS+="-p qemu_nios2 " ;; + or1k-zephyr-elf) + PLATFORM_ARGS+="-p qemu_or1k " + ;; riscv64-zephyr-elf) PLATFORM_ARGS+="-p qemu_riscv32 " PLATFORM_ARGS+="-p qemu_riscv32e " diff --git a/README.md b/README.md index c731b84b..8db930ca 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ The toolchains for the following target architectures are supported: - Microblaze (32-bit) - MIPS (32-bit and 64-bit) - Nios II +- OpenRISC 1000 - RISC-V (32-bit and 64-bit; RV32I, RV32E, RV64I) - SPARC (32-bit and 64-bit; SPARC V8, SPARC V9) - x86 (32-bit and 64-bit) diff --git a/cmake/zephyr/target.cmake b/cmake/zephyr/target.cmake index 2d485778..6330dce5 100644 --- a/cmake/zephyr/target.cmake +++ b/cmake/zephyr/target.cmake @@ -11,6 +11,7 @@ set(CROSS_COMPILE_TARGET_nios2 nios2-zephyr-elf) set(CROSS_COMPILE_TARGET_riscv riscv64-zephyr-elf) set(CROSS_COMPILE_TARGET_mips mips-zephyr-elf) set(CROSS_COMPILE_TARGET_microblaze microblazeel-zephyr-elf) +set(CROSS_COMPILE_TARGET_or1k or1k-zephyr-elf) set(CROSS_COMPILE_TARGET_xtensa xtensa-${SOC_TOOLCHAIN_NAME}_zephyr-elf) # ARC uses the same source tree for both ARCv2 & ARCv3 architectures, diff --git a/configs/or1k-zephyr-elf.config b/configs/or1k-zephyr-elf.config new file mode 100644 index 00000000..0ead3dbb --- /dev/null +++ b/configs/or1k-zephyr-elf.config @@ -0,0 +1,6 @@ +CT_CONFIG_VERSION="3" +CT_EXPERIMENTAL=y +CT_ARCH_OPENRISC=y +CT_TARGET_CFLAGS="-ftls-model=local-exec" +CT_TARGET_VENDOR="zephyr" +CT_MULTILIB=y diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb b/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb index 36f9dfb4..1c8c7955 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb @@ -199,7 +199,7 @@ inherit autotools pkgconfig #--disable-fdt: Cannot use if supporting ARM #--disable-kvm: AArch64 has a QEMU/KVM board -QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu sparc-softmmu x86_64-softmmu" +QEMUS_BUILT = "aarch64-softmmu arm-softmmu i386-softmmu mips-softmmu mipsel-softmmu nios2-softmmu xtensa-softmmu riscv32-softmmu riscv64-softmmu sparc-softmmu x86_64-softmmu or1k-softmmu" QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \ --disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio\ --disable-guest-agent --disable-libssh --disable-vnc-png --disable-seccomp \