You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/22 03:15:44 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7389: Ci

xiaoxiang781216 opened a new pull request, #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389

   ## Summary
   
   - tools/ci/cibuild.sh: Change wget to curl 
   - tools/ci/cibuild.sh: Move all pip3 installation into python-tools
   - tools/ci/cibuild.sh: Keep the installation in alphabetical order 
   
   ## Impact
   None code refactor only
   
   ## Testing
   Pass CI
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002434986


##########
tools/ci/cibuild.sh:
##########
@@ -229,6 +302,8 @@ function arm64-gcc-toolchain {
   aarch64-none-elf-gcc --version
 }
 
+=======

Review Comment:
   Is this a merge conflict leftover?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002573283


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar

Review Comment:
   sorry. here will not work since I just noticed that file is `xz` and not `gz`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#issuecomment-1290889129

   Please fix MAC OS variant


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1004511122


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi

Review Comment:
   Ok. after extract the zip to the final directory, the origin method reduce to three statement, which is simple as your suggestion. That's why I keep the old flow.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002553306


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi

Review Comment:
   Maybe something like
   ```suggestion
     if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
       mkdir -p "${prebuilt}"/clang-arm-none-eabi
       curl -SL https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz | tar -xzC "${prebuilt}"/clang-arm-none-eabi --strip 1
     fi
   ```
   ?



##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+  fi
+  arm-none-eabi-gcc --version
 }
 
-function clang_clang-tidy {
-  # Install Clang and Clang-Tidy for Ubuntu.
-  apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \
-    -o APT::Immediate-Configure=0 \
-    clang \
-    clang-tidy
+function arm64-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-aarch64-none-elf/bin
+
+  if [ ! -f "${prebuilt}/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=darwin-x86_64
+        ;;
+      Linux)
+        flavor=x86_64
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar.xz
+    xz -d gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar.xz
+    tar xf gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar
+    mv gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf gcc-aarch64-none-elf
+    rm gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar

Review Comment:
   ditto



##########
tools/ci/cibuild.sh:
##########
@@ -131,7 +216,7 @@ function gperf {
 
   if [ ! -f "${prebuilt}/gperf/bin/gperf" ]; then
     cd "${prebuilt}"
-    wget --quiet http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
+    curl -O -L -s http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz

Review Comment:
   ditto



##########
tools/ci/cibuild.sh:
##########
@@ -363,78 +383,33 @@ function sparc-gcc-toolchain {
   sparc-gaisler-elf-gcc --version
 }
 
-function c-cache {
-  add_path "${prebuilt}"/ccache/bin
+function xtensa-esp32-gcc-toolchain {
+  add_path "${prebuilt}"/xtensa-esp32-elf/bin
 
-  if ! type ccache &> /dev/null; then
+  if [ ! -f "${prebuilt}/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc" ]; then
+    cd "${prebuilt}"
     case ${os} in
       Darwin)
-        brew install ccache
+        curl -O -L -s https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
+        tar xzf xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
+        rm xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
         ;;
       Linux)
-        cd "${prebuilt}";
-        wget https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz
-        tar zxf ccache-3.7.7.tar.gz
-        cd ccache-3.7.7; ./configure --prefix="${prebuilt}"/ccache; make; make install
-        cd "${prebuilt}"; rm -rf ccache-3.7.7; rm ccache-3.7.7.tar.gz
-        ;;
-    esac
-  fi
-
-  ccache --version
-  mkdir -p "${prebuilt}"/ccache/bin/
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/x86_64-elf-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/x86_64-elf-g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/cc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/c++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/clang
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/clang++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/arm-none-eabi-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/arm-none-eabi-g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/aarch64-none-elf-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/aarch64-none-elf-g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/p32-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/riscv64-unknown-elf-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/riscv64-unknown-elf-g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/xtensa-esp32-elf-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/avr-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/avr-g++
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/sparc-gaisler-elf-gcc
-  ln -sf "$(which ccache)" "${prebuilt}"/ccache/bin/sparc-gaisler-elf-g++
-}
-
-function binutils {
-  mkdir -p "${prebuilt}"/bintools/bin
-  add_path "${prebuilt}"/bintools/bin
-
-  if ! type objcopy &> /dev/null; then
-    case ${os} in
-      Darwin)
-        brew install binutils
-        # It is possible we cached prebuilt but did brew install so recreate
-        # symlink if it exists
-        rm -f "${prebuilt}"/bintools/bin/objcopy
-        ln -s /usr/local/opt/binutils/bin/objcopy "${prebuilt}"/bintools/bin/objcopy
+        curl -O -L -s https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp32-2021r1-linux-amd64.tar.xz
+        xz -d xtensa-esp32-elf-gcc8_4_0-esp32-2021r1-linux-amd64.tar.xz
+        tar xf xtensa-esp32-elf-gcc8_4_0-esp32-2021r1-linux-amd64.tar
+        rm xtensa-esp32-elf-gcc8_4_0-esp32-2021r1-linux-amd64.tar

Review Comment:
   ditto



##########
tools/ci/cibuild.sh:
##########
@@ -304,13 +324,13 @@ function rx-gcc-toolchain {
         # Download toolchain source code
         # RX toolchain is built from source code. Once prebuilt RX toolchain is made available, the below code snippet can be removed.
         mkdir -p "${prebuilt}"/renesas-tools/rx/source; cd "${prebuilt}"/renesas-tools/rx/source
-        wget --quiet https://gcc-renesas.com/downloads/d.php?f=rx/binutils/4.8.4.201803-gnurx/rx_binutils2.24_2018Q3.tar.gz \
+        curl -O -L -s https://gcc-renesas.com/downloads/d.php?f=rx/binutils/4.8.4.201803-gnurx/rx_binutils2.24_2018Q3.tar.gz \
           -O rx_binutils2.24_2018Q3.tar.gz

Review Comment:
   what is this `-O` about?



##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar

Review Comment:
   ```suggestion
       mkdir -p "${prebuilt}"/gcc-arm-none-eabi
       curl -SL https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz | tar -xzC "${prebuilt}"/gcc-arm-none-eabi --strip 1
       patch -d "${prebuilt}"/gcc-arm-none-eabi -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
   ```
   Please try if this will work



##########
tools/ci/cibuild.sh:
##########
@@ -253,43 +289,27 @@ function riscv-gcc-toolchain {
         ;;
     esac
     cd "${prebuilt}"
-    wget --quiet https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz
+    curl -O -L -s https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz
     tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz
     mv riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor} riscv64-unknown-elf-gcc
     rm riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-${flavor}.tar.gz

Review Comment:
   ditto



##########
tools/ci/cibuild.sh:
##########
@@ -352,7 +372,7 @@ function sparc-gcc-toolchain {
     case ${os} in
       Linux)
         cd "${prebuilt}"

Review Comment:
   ditto



##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+  fi
+  arm-none-eabi-gcc --version
 }
 
-function clang_clang-tidy {
-  # Install Clang and Clang-Tidy for Ubuntu.
-  apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \
-    -o APT::Immediate-Configure=0 \
-    clang \
-    clang-tidy
+function arm64-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-aarch64-none-elf/bin
+
+  if [ ! -f "${prebuilt}/gcc-aarch64-none-elf/bin/aarch64-none-elf-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=darwin-x86_64
+        ;;
+      Linux)
+        flavor=x86_64
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.2-2022.02/binrel/gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar.xz
+    xz -d gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar.xz
+    tar xf gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar
+    mv gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf gcc-aarch64-none-elf
+    rm gcc-arm-11.2-2022.02-${flavor}-aarch64-none-elf.tar
+  fi
+  aarch64-none-elf-gcc --version
 }
 
-function u-boot-tools {
-  if ! type mkimage &> /dev/null; then
+function avr-gcc-toolchain {
+  if ! type avr-gcc &> /dev/null; then
     case ${os} in
       Darwin)
-        brew install u-boot-tools
+        brew tap osx-cross/avr
+        brew install avr-gcc
+        ;;
+    esac
+  fi
+}
+
+function binutils {
+  mkdir -p "${prebuilt}"/bintools/bin
+  add_path "${prebuilt}"/bintools/bin
+
+  if ! type objcopy &> /dev/null; then
+    case ${os} in
+      Darwin)
+        brew install binutils
+        # It is possible we cached prebuilt but did brew install so recreate
+        # symlink if it exists
+        rm -f "${prebuilt}"/bintools/bin/objcopy
+        ln -s /usr/local/opt/binutils/bin/objcopy "${prebuilt}"/bintools/bin/objcopy
         ;;
     esac
   fi
 }
 
+function bloaty {
+  add_path "${prebuilt}"/bloaty/bin
+  if [ ! -f "${prebuilt}/bloaty/bin/bloaty" ]; then
+    git clone --depth 1 --branch v1.1 https://github.com/google/bloaty bloaty-src
+    cd bloaty-src
+    mkdir -p "${prebuilt}"/bloaty
+    cmake -DCMAKE_SYSTEM_PREFIX_PATH="${prebuilt}"/bloaty
+    make install -j 6
+    cd "${prebuilt}"
+    rm -rf bloaty-src
+  fi
+}
+
+function c-cache {
+  add_path "${prebuilt}"/ccache/bin
+
+  if ! type ccache &> /dev/null; then
+    case ${os} in
+      Darwin)
+        brew install ccache
+        ;;
+      Linux)
+        cd "${prebuilt}";
+        curl -O -L -s https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz
+        tar zxf ccache-3.7.7.tar.gz
+        cd ccache-3.7.7; ./configure --prefix="${prebuilt}"/ccache; make; make install
+        cd "${prebuilt}"; rm -rf ccache-3.7.7; rm ccache-3.7.7.tar.gz

Review Comment:
   ```suggestion
           mkdir -p "${prebuilt}"/ccache-src
           curl -SL -s https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3.7.7.tar.gz | tar -xzC "${prebuilt}"/ccache-src --strip 1
           cd "${prebuilt}"/ccache-src; ./configure --prefix="${prebuilt}"/ccache; make; make install
           cd "${prebuilt}"; rm -rf ccache-src
   ```



##########
tools/ci/cibuild.sh:
##########
@@ -363,78 +383,33 @@ function sparc-gcc-toolchain {
   sparc-gaisler-elf-gcc --version
 }
 
-function c-cache {
-  add_path "${prebuilt}"/ccache/bin
+function xtensa-esp32-gcc-toolchain {
+  add_path "${prebuilt}"/xtensa-esp32-elf/bin
 
-  if ! type ccache &> /dev/null; then
+  if [ ! -f "${prebuilt}/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc" ]; then
+    cd "${prebuilt}"
     case ${os} in
       Darwin)
-        brew install ccache
+        curl -O -L -s https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
+        tar xzf xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
+        rm xtensa-esp32-elf-gcc8_4_0-esp-2021r1-macos.tar.gz
         ;;

Review Comment:
   ditto



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002574194


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar

Review Comment:
   BTW, I can't download that file with `curl`on my laptop while all is ok with `wget`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1007889447


##########
tools/ci/cibuild.sh:
##########
@@ -37,7 +37,7 @@ EXTRA_PATH=
 
 case ${os} in
   Darwin)
-    install="python-tools u-boot-tools elf-toolchain gen-romfs kconfig-frontends rust arm-gcc-toolchain arm64-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain avr-gcc-toolchain c-cache binutils"
+    install="arm-gcc-toolchain arm64-gcc-toolchain avr-gcc-toolchain binutils bloaty ccache elf-toolchain gen-romfs kconfig-frontends python-tools riscv-gcc-toolchain rust xtensa-esp32-gcc-toolchain u-boot-tools"

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002439503


##########
tools/ci/cibuild.sh:
##########
@@ -229,6 +302,8 @@ function arm64-gcc-toolchain {
   aarch64-none-elf-gcc --version
 }
 
+=======

Review Comment:
   Yes, fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#issuecomment-1293127922

   > Please fix MAC OS variant
   
   @pkarashchenko I will provide a new PR to switch wget to curl and sync with Dockerfile command style.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1004482163


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi

Review Comment:
   @xiaoxiang781216 the comments are marked as resolved, but suggestion is not applied. It would be nice to write back a comment that you would like to keep current variant together with marking comments as resolved



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1007703308


##########
tools/ci/cibuild.sh:
##########
@@ -37,7 +37,7 @@ EXTRA_PATH=
 
 case ${os} in
   Darwin)
-    install="python-tools u-boot-tools elf-toolchain gen-romfs kconfig-frontends rust arm-gcc-toolchain arm64-gcc-toolchain riscv-gcc-toolchain xtensa-esp32-gcc-toolchain avr-gcc-toolchain c-cache binutils"
+    install="arm-gcc-toolchain arm64-gcc-toolchain avr-gcc-toolchain binutils bloaty ccache elf-toolchain gen-romfs kconfig-frontends python-tools riscv-gcc-toolchain rust xtensa-esp32-gcc-toolchain u-boot-tools"

Review Comment:
   ```suggestion
       install="arm-gcc-toolchain arm64-gcc-toolchain avr-gcc-toolchain binutils bloaty c-cache elf-toolchain gen-romfs kconfig-frontends python-tools riscv-gcc-toolchain rust xtensa-esp32-gcc-toolchain u-boot-tools"
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#issuecomment-1294055000

   Seems like permission change cause an issue on CI: `/bin/bash: line 10: ./cibuild.sh: Permission denied`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#issuecomment-1294404879

   > Seems like permission change cause an issue on CI: `/bin/bash: line 10: ./cibuild.sh: Permission denied`
   
   It's strange, cibuild.sh still has execution permission in my local.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#issuecomment-1287849675

   ci error fix here: https://github.com/apache/incubator-nuttx/pull/7394/commits/3fb97c0f30e82c6724f9d41beed92da4a62f5a6f


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7389: Minor improvement for tools/ci/cibuild.sh

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7389:
URL: https://github.com/apache/incubator-nuttx/pull/7389#discussion_r1002640067


##########
tools/ci/cibuild.sh:
##########
@@ -55,50 +55,135 @@ function add_path {
   EXTRA_PATH=$1:${EXTRA_PATH}
 }
 
-function python-tools {
-  # Python User Env
-  PIP_USER=yes
-  export PIP_USER
-  PYTHONUSERBASE=${prebuilt}/pylocal
-  export PYTHONUSERBASE
-  add_path "${PYTHONUSERBASE}"/bin
-  pip3 install pexpect==4.8.0
-  pip3 install pytest==6.2.5
-  pip3 install pytest-repeat==0.9.1
-  pip3 install pytest-json==0.4.0
-  pip3 install pytest-ordering==0.6
-  pip3 install pyserial==3.5
-  pip3 install pyelftools
-  pip3 install cxxfilt
+function arm-clang-toolchain {
+  add_path "${prebuilt}"/clang-arm-none-eabi/bin
 
-  # MCUboot's tool for image signing and key management
-  if ! command -v imgtool &> /dev/null; then
-    pip3 install imgtool
+  if [ ! -f "${prebuilt}/clang-arm-none-eabi/bin/clang" ]; then
+    cd "${prebuilt}"
+    curl -O -L -s https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-14.0.0/LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    tar zxf LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
+    mv LLVMEmbeddedToolchainForArm-14.0.0 clang-arm-none-eabi
+    rm LLVMEmbeddedToolchainForArm-14.0.0-linux.tar.gz
   fi
+  clang --version
 }
 
-function codechecker {
-  pip3 install CodeChecker
+function arm-gcc-toolchain {
+  add_path "${prebuilt}"/gcc-arm-none-eabi/bin
+
+  if [ ! -f "${prebuilt}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
+    local flavor
+    case ${os} in
+      Darwin)
+        flavor=-darwin
+        ;;
+      Linux)
+        flavor=
+        ;;
+    esac
+    cd "${prebuilt}"
+    curl -O -L -s https://developer.arm.com/-/media/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    xz -d arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar.xz
+    tar xf arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar
+    mv arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
+    patch -p0 < ${nuttx}/tools/ci/patch/arm-none-eabi-workaround-for-newlib-version-break.patch
+    rm arm-gnu-toolchain-11.3.rel1${flavor}-x86_64-arm-none-eabi.tar

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org