This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 00f831028f [ci] platforms: added toolchains 00f831028f is described below commit 00f831028f4e4bc75565c522a7168b4aa5c796fc Author: simbit18 <101105604+simbi...@users.noreply.github.com> AuthorDate: Mon Nov 25 11:58:26 2024 +0100 [ci] platforms: added toolchains add toolchains for macOS on Apple Intel xtensa-esp32s2 xtensa-esp32s3 add toolchains for macOS on Apple Silicon xtensa-esp32s2 xtensa-esp32s3 add install for ubuntu.sh xtensa-esp32s2 xtensa-esp32s3 add install for linux.sh xtensa-esp32s2 xtensa-esp32s3 --- tools/ci/platforms/darwin.sh | 42 +++++++++++++++++++++++++++++++++++++- tools/ci/platforms/darwin_arm64.sh | 42 +++++++++++++++++++++++++++++++++++++- tools/ci/platforms/linux.sh | 2 +- tools/ci/platforms/msys2.sh | 1 + tools/ci/platforms/ubuntu.sh | 2 +- 5 files changed, 85 insertions(+), 4 deletions(-) diff --git a/tools/ci/platforms/darwin.sh b/tools/ci/platforms/darwin.sh index f4f2eabe69..9ffe87035c 100755 --- a/tools/ci/platforms/darwin.sh +++ b/tools/ci/platforms/darwin.sh @@ -294,6 +294,7 @@ xtensa_esp32_gcc_toolchain() { local basefile basefile=xtensa-esp32-elf-12.2.0_20230208-x86_64-apple-darwin cd "${NUTTXTOOLS}" + # Download the latest ESP32 GCC toolchain prebuilt by Espressif curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz xz -d ${basefile}.tar.xz tar xf ${basefile}.tar @@ -303,6 +304,40 @@ xtensa_esp32_gcc_toolchain() { command xtensa-esp32-elf-gcc --version } +xtensa_esp32s2_gcc_toolchain() { + add_path "${NUTTXTOOLS}"/xtensa-esp32s2-elf/bin + + if [ ! -f "${NUTTXTOOLS}/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc" ]; then + local basefile + basefile=xtensa-esp32s2-elf-12.2.0_20230208-x86_64-apple-darwin + cd "${NUTTXTOOLS}" + # Download the latest ESP32 S2 GCC toolchain prebuilt by Espressif + curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz + xz -d ${basefile}.tar.xz + tar xf ${basefile}.tar + rm ${basefile}.tar + fi + + command xtensa-esp32s2-elf-gcc --version +} + +xtensa_esp32s3_gcc_toolchain() { + add_path "${NUTTXTOOLS}"/xtensa-esp32s3-elf/bin + + if [ ! -f "${NUTTXTOOLS}/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc" ]; then + local basefile + basefile=xtensa-esp32s3-elf-12.2.0_20230208-x86_64-apple-darwin + cd "${NUTTXTOOLS}" + # Download the latest ESP32 S3 GCC toolchain prebuilt by Espressif + curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz + xz -d ${basefile}.tar.xz + tar xf ${basefile}.tar + rm ${basefile}.tar + fi + + command xtensa-esp32s3-elf-gcc --version +} + u_boot_tools() { if ! type mkimage > /dev/null 2>&1; then brew install u-boot-tools @@ -368,13 +403,18 @@ setup_links() { ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-gcc ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-g++ ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-g++ + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s2-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s2-elf-g++ + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s3-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s3-elf-g++ } install_build_tools() { mkdir -p "${NUTTXTOOLS}" echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh - install="ninja_brew autoconf_brew arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty elf_toolchain gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang zig xtensa_esp32_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" + install="ninja_brew autoconf_brew arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty elf_toolchain gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang zig xtensa_esp32_gcc_toolchain xtensa_esp32s2_gcc_toolchain xtensa_esp32s3_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" mkdir -p "${NUTTXTOOLS}"/homebrew export HOMEBREW_CACHE=${NUTTXTOOLS}/homebrew diff --git a/tools/ci/platforms/darwin_arm64.sh b/tools/ci/platforms/darwin_arm64.sh index 05c65cd9bc..3f4cbe005e 100755 --- a/tools/ci/platforms/darwin_arm64.sh +++ b/tools/ci/platforms/darwin_arm64.sh @@ -293,6 +293,7 @@ xtensa_esp32_gcc_toolchain() { if [ ! -f "${NUTTXTOOLS}/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc" ]; then local basefile basefile=xtensa-esp32-elf-12.2.0_20230208-aarch64-apple-darwin + # Download the latest ESP32 GCC toolchain prebuilt by Espressif cd "${NUTTXTOOLS}" curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz xz -d ${basefile}.tar.xz @@ -303,6 +304,40 @@ xtensa_esp32_gcc_toolchain() { command xtensa-esp32-elf-gcc --version } +xtensa_esp32s2_gcc_toolchain() { + add_path "${NUTTXTOOLS}"/xtensa-esp32s2-elf/bin + + if [ ! -f "${NUTTXTOOLS}/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc" ]; then + local basefile + basefile=xtensa-esp32s2-elf-12.2.0_20230208-aarch64-apple-darwin + cd "${NUTTXTOOLS}" + # Download the latest ESP32 S2 GCC toolchain prebuilt by Espressif + curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz + xz -d ${basefile}.tar.xz + tar xf ${basefile}.tar + rm ${basefile}.tar + fi + + command xtensa-esp32s2-elf-gcc --version +} + +xtensa_esp32s3_gcc_toolchain() { + add_path "${NUTTXTOOLS}"/xtensa-esp32s3-elf/bin + + if [ ! -f "${NUTTXTOOLS}/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc" ]; then + local basefile + basefile=xtensa-esp32s3-elf-12.2.0_20230208-aarch64-apple-darwin + cd "${NUTTXTOOLS}" + # Download the latest ESP32 S3 GCC toolchain prebuilt by Espressif + curl -O -L -s https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/${basefile}.tar.xz + xz -d ${basefile}.tar.xz + tar xf ${basefile}.tar + rm ${basefile}.tar + fi + + command xtensa-esp32s3-elf-gcc --version +} + u_boot_tools() { if ! type mkimage > /dev/null 2>&1; then brew install u-boot-tools @@ -368,13 +403,18 @@ setup_links() { ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-gcc ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-g++ ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-g++ + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s2-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s2-elf-g++ + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s3-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32s3-elf-g++ } install_build_tools() { mkdir -p "${NUTTXTOOLS}" echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh - install="ninja_brew autoconf_brew arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty elf_toolchain gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang zig xtensa_esp32_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" + install="ninja_brew autoconf_brew arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty elf_toolchain gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang zig xtensa_esp32_gcc_toolchain xtensa_esp32s2_gcc_toolchain xtensa_esp32s3_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" mkdir -p "${NUTTXTOOLS}"/homebrew export HOMEBREW_CACHE=${NUTTXTOOLS}/homebrew diff --git a/tools/ci/platforms/linux.sh b/tools/ci/platforms/linux.sh index 8421cd58c9..9021203abf 100755 --- a/tools/ci/platforms/linux.sh +++ b/tools/ci/platforms/linux.sh @@ -368,7 +368,7 @@ install_build_tools() { mkdir -p "${NUTTXTOOLS}" echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh - install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain bloaty kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rx_gcc_toolchain sparc_gcc_toolchain xtensa_esp32_gcc_toolchain util_linux wasi_sdk" + install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain bloaty kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rx_gcc_toolchain sparc_gcc_toolchain xtensa_esp32_gcc_toolchain xtensa_esp32s2_gcc_toolchain xtensa_esp32s3_gcc_toolchain util_linux wasi_sdk" oldpath=$(cd . && pwd -P) for func in ${install}; do diff --git a/tools/ci/platforms/msys2.sh b/tools/ci/platforms/msys2.sh index 5d22422cb2..d30bb1a4ea 100755 --- a/tools/ci/platforms/msys2.sh +++ b/tools/ci/platforms/msys2.sh @@ -282,6 +282,7 @@ setup_links() { ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-gcc ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/x86_64-elf-g++ ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-gcc + ln -sf "$(which ccache)" "${NUTTXTOOLS}"/ccache/bin/xtensa-esp32-elf-g++ } install_build_tools() { diff --git a/tools/ci/platforms/ubuntu.sh b/tools/ci/platforms/ubuntu.sh index a268de1e79..bb09deef4d 100755 --- a/tools/ci/platforms/ubuntu.sh +++ b/tools/ci/platforms/ubuntu.sh @@ -448,7 +448,7 @@ install_build_tools() { mkdir -p "${NUTTXTOOLS}" echo "#!/usr/bin/env sh" > "${NUTTXTOOLS}"/env.sh - install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty clang_tidy gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang rx_gcc_toolchain sparc_gcc_toolchain xtensa_esp32_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" + install="arm_clang_toolchain arm_gcc_toolchain arm64_gcc_toolchain avr_gcc_toolchain binutils bloaty clang_tidy gen_romfs gperf kconfig_frontends mips_gcc_toolchain python_tools riscv_gcc_toolchain rust dlang rx_gcc_toolchain sparc_gcc_toolchain xtensa_esp32_gcc_toolchain xtensa_esp32s2_gcc_toolchain xtensa_esp32s3_gcc_toolchain u_boot_tools util_linux wasi_sdk c_cache" oldpath=$(cd . && pwd -P) for func in ${install}; do