[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
This commit is contained in:
simbit18 2024-11-25 11:58:26 +01:00 committed by Xiang Xiao
parent eb65c5a8cd
commit 00f831028f
5 changed files with 85 additions and 4 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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() {

View file

@ -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