Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MicroBlaze Toolchain #621

Merged
merged 4 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ on:
- arc64-zephyr-elf
- arc-zephyr-elf
- arm-zephyr-eabi
- microblazeel-zephyr-elf
- mips-zephyr-elf
- nios2-zephyr-elf
- riscv64-zephyr-elf
Expand Down Expand Up @@ -150,6 +151,7 @@ jobs:
arc64-zephyr-elf) build_target_arc64_zephyr_elf="y";;
arc-zephyr-elf) build_target_arc_zephyr_elf="y";;
arm-zephyr-eabi) build_target_arm_zephyr_eabi="y";;
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";;
riscv64-zephyr-elf) build_target_riscv64_zephyr_elf="y";;
Expand Down Expand Up @@ -184,6 +186,7 @@ jobs:
build_target_arc64_zephyr_elf="y"
build_target_arc_zephyr_elf="y"
build_target_arm_zephyr_eabi="y"
build_target_microblazeel_zephyr_elf="y"
build_target_mips_zephyr_elf="y"
build_target_nios2_zephyr_elf="y"
build_target_riscv64_zephyr_elf="y"
Expand Down Expand Up @@ -258,6 +261,7 @@ jobs:
[ "${build_target_arc64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"arc64-zephyr-elf",'
[ "${build_target_arc_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"arc-zephyr-elf",'
[ "${build_target_arm_zephyr_eabi}" == "y" ] && MATRIX_TARGETS+='"arm-zephyr-eabi",'
[ "${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_riscv64_zephyr_elf}" == "y" ] && MATRIX_TARGETS+='"riscv64-zephyr-elf",'
Expand Down Expand Up @@ -1486,6 +1490,10 @@ jobs:
PLATFORM_ARGS+="-p mps2_an521 "
PLATFORM_ARGS+="-p mps3_an547 "
;;
# TODO: Release the microblaze arch source in a public repo
# microblazeel-zephyr-elf)
# PLATFORM_ARGS+="-p qemu_microblaze "
# ;;
mips-zephyr-elf)
PLATFORM_ARGS+="-p qemu_malta "
;;
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The toolchains for the following target architectures are supported:

- ARC (32-bit and 64-bit; ARCv1, ARCv2, ARCv3)
- ARM (32-bit and 64-bit; ARMv6, ARMv7, ARMv8; A/R/M Profiles)
- Microblaze (32-bit)
- MIPS (32-bit and 64-bit)
- Nios II
- RISC-V (32-bit and 64-bit; RV32I, RV32E, RV64I)
Expand Down
1 change: 1 addition & 0 deletions cmake/zephyr/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(CROSS_COMPILE_TARGET_arm64 aarch64-zephyr-elf)
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_xtensa xtensa-${SOC_TOOLCHAIN_NAME}_zephyr-elf)

# ARC uses the same source tree for both ARCv2 & ARCv3 architectures,
Expand Down
62 changes: 62 additions & 0 deletions configs/microblazeel-zephyr-elf.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
CT_CONFIG_VERSION="3"
CT_EXPERIMENTAL=y
# CT_PREFIX_DIR_RO is not set
# CT_LOG_PROGRESS_BAR is not set
CT_ARCH_MICROBLAZE=y
CT_ARCH_LE=y
CT_MULTILIB=y
CT_TARGET_CFLAGS="-G0 -fno-pic"
CT_TARGET_VENDOR="zephyr"
CT_BINUTILS_SRC_CUSTOM=y
CT_BINUTILS_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/binutils"
CT_NEWLIB_SRC_CUSTOM=y
CT_NEWLIB_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/newlib"
CT_LIBC_NEWLIB_TARGET_CFLAGS="-O2"
# CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE is not set
CT_LIBC_NEWLIB_IO_C99FMT=y
CT_LIBC_NEWLIB_IO_LL=y
CT_LIBC_NEWLIB_IO_FLOAT=y
# CT_LIBC_NEWLIB_FSEEK_OPTIMIZATION is not set
CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS=y
CT_LIBC_NEWLIB_GLOBAL_ATEXIT=y
CT_LIBC_NEWLIB_LITE_EXIT=y
CT_LIBC_NEWLIB_MULTITHREAD=y
CT_LIBC_NEWLIB_RETARGETABLE_LOCKING=y
# CT_LIBC_NEWLIB_WIDE_ORIENT is not set
# CT_LIBC_NEWLIB_NANO_MALLOC is not set
# CT_LIBC_NEWLIB_NANO_FORMATTED_IO is not set
CT_LIBC_NEWLIB_EXTRA_SECTIONS=y
CT_GCC_SRC_CUSTOM=y
CT_GCC_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/gcc"
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-gnu-ld --with-gnu-as --enable-initfini-array"
CT_CC_LANG_CXX=y
CT_DEBUG_GDB=y
CT_GDB_SRC_CUSTOM=y
CT_GDB_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/gdb"
CT_COMP_LIBS_NEWLIB_NANO=y
CT_NEWLIB_NANO_SRC_CUSTOM=y
CT_NEWLIB_NANO_CUSTOM_LOCATION="${GITHUB_WORKSPACE}/newlib"
CT_NEWLIB_NANO_GCC_LIBSTDCXX=y
CT_NEWLIB_NANO_INSTALL_IN_TARGET=y
# CT_LIBC_NEWLIB_NANO_IO_C99FMT is not set
# CT_LIBC_NEWLIB_NANO_IO_LL is not set
CT_LIBC_NEWLIB_NANO_IO_FLOAT=y
# CT_LIBC_NEWLIB_NANO_IO_LDBL is not set
# CT_LIBC_NEWLIB_NANO_IO_POS_ARGS is not set
CT_LIBC_NEWLIB_NANO_FVWRITE_IN_STREAMIO=y
# CT_LIBC_NEWLIB_NANO_UNBUF_STREAM_OPT is not set
# CT_LIBC_NEWLIB_NANO_FSEEK_OPTIMIZATION is not set
CT_LIBC_NEWLIB_NANO_DISABLE_SUPPLIED_SYSCALLS=y
# CT_LIBC_NEWLIB_NANO_REGISTER_FINI is not set
CT_LIBC_NEWLIB_NANO_ATEXIT_DYNAMIC_ALLOC=y
CT_LIBC_NEWLIB_NANO_GLOBAL_ATEXIT=y
CT_LIBC_NEWLIB_NANO_LITE_EXIT=y
CT_LIBC_NEWLIB_NANO_REENT_SMALL=y
CT_LIBC_NEWLIB_NANO_MULTITHREAD=y
CT_LIBC_NEWLIB_NANO_RETARGETABLE_LOCKING=y
CT_LIBC_NEWLIB_NANO_EXTRA_SECTIONS=y
# CT_LIBC_NEWLIB_NANO_WIDE_ORIENT is not set
CT_LIBC_NEWLIB_NANO_ENABLE_TARGET_OPTSPACE=y
# CT_LIBC_NEWLIB_NANO_LTO is not set
CT_LIBC_NEWLIB_NANO_NANO_MALLOC=y
CT_LIBC_NEWLIB_NANO_NANO_FORMATTED_IO=y