From 9a8c75214737e81dcec4f8be19214b783ecda8b3 Mon Sep 17 00:00:00 2001 From: Filipe Cavalcanti Date: Thu, 26 Jun 2025 13:32:40 -0300 Subject: [PATCH 1/2] ci: update ESP32 Xtensa compiler version Updates ESP32, ESP32S2 and ESP32S3 compiler version to 14.2.0 of 20241119. Signed-off-by: Filipe Cavalcanti --- tools/ci/docker/linux/Dockerfile | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index e326c07234cc6..0cb1c976d2779 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -259,18 +259,10 @@ RUN mkdir -p sparc-gaisler-elf-gcc && \ # Build image for tool required by ESP32 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-esp32 -# Download the latest ESP32 GCC toolchain prebuilt by Espressif -RUN mkdir -p xtensa-esp32-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ - -RUN mkdir -p xtensa-esp32s2-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ - -RUN mkdir -p xtensa-esp32s3-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ +# Download the latest ESP32, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif +RUN mkdir -p xtensa-esp-elf-gcc && \ + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ RUN echo "ESP Binaries: 2022/01/26" RUN mkdir -p /tools/blobs && cd /tools/blobs \ @@ -470,17 +462,9 @@ ENV PATH="/tools/riscv-none-elf-gcc/bin:$PATH" COPY --from=nuttx-toolchain-sparc /tools/sparc-gaisler-elf-gcc/ sparc-gaisler-elf-gcc/ ENV PATH="/tools/sparc-gaisler-elf-gcc/bin:$PATH" -# ESP32 toolchain -COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp32-elf-gcc/ xtensa-esp32-elf-gcc/ -ENV PATH="/tools/xtensa-esp32-elf-gcc/bin:$PATH" - -# ESP32-S2 toolchain -COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp32s2-elf-gcc/ xtensa-esp32s2-elf-gcc/ -ENV PATH="/tools/xtensa-esp32s2-elf-gcc/bin:$PATH" - -# ESP32-S3 toolchain -COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp32s3-elf-gcc/ xtensa-esp32s3-elf-gcc/ -ENV PATH="/tools/xtensa-esp32s3-elf-gcc/bin:$PATH" +# ESP32, ESP32-S2, ESP32-S3 toolchain +COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp-elf-gcc/ xtensa-esp-elf-gcc/ +ENV PATH="/tools/xtensa-esp-elf-gcc/bin:$PATH" RUN mkdir -p /tools/blobs/esp-bins COPY --from=nuttx-toolchain-esp32 /tools/blobs/* /tools/blobs/esp-bins/ From 1774d77ad79f7aa7911c7c4dc95aec3cea44b857 Mon Sep 17 00:00:00 2001 From: Filipe Cavalcanti Date: Thu, 26 Jun 2025 13:43:50 -0300 Subject: [PATCH 2/2] documentation: update Xtensa ESP32|S2|S3 toolchain version Updates the instructions to install the ESP toolchain 14.2.0. Signed-off-by: Filipe Cavalcanti --- .../platforms/xtensa/esp32/index.rst | 27 +++++++------------ .../platforms/xtensa/esp32s2/index.rst | 27 +++++++------------ .../platforms/xtensa/esp32s3/index.rst | 27 +++++++------------ 3 files changed, 30 insertions(+), 51 deletions(-) diff --git a/Documentation/platforms/xtensa/esp32/index.rst b/Documentation/platforms/xtensa/esp32/index.rst index d6c8a6954ac30..6a1e8c9aff17d 100644 --- a/Documentation/platforms/xtensa/esp32/index.rst +++ b/Documentation/platforms/xtensa/esp32/index.rst @@ -20,6 +20,7 @@ ESP32 Toolchain =============== The toolchain used to build ESP32 firmware can be either downloaded or built from the sources. + It is **highly** recommended to use (download or build) the same toolchain version that is being used by the NuttX CI. @@ -33,20 +34,12 @@ check for the current compiler version being used. For instance: # Build image for tool required by ESP32 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-esp32 - # Download the latest ESP32 GCC toolchain prebuilt by Espressif - RUN mkdir -p xtensa-esp32-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s2-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s3-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ + # Download the latest ESP32, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif + RUN mkdir -p xtensa-esp-elf-gcc && \ + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ -For ESP32, the toolchain version is based on GGC 12.2.0 (``xtensa-esp32-elf-12.2.0_20230208``) +For ESP32, the toolchain version is based on GGC 14.2.0 (``xtensa-esp-elf-14.2.0_20241119``) The prebuilt Toolchain (Recommended) ------------------------------------ @@ -55,20 +48,20 @@ First, create a directory to hold the toolchain: .. code-block:: console - $ mkdir -p /path/to/your/toolchain/xtensa-esp32-elf-gcc + $ mkdir -p /path/to/your/toolchain/xtensa-esp-elf-gcc Download and extract toolchain: .. code-block:: console - $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ + $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ Add the toolchain to your `PATH`: .. code-block:: console - $ echo "export PATH=/path/to/your/toolchain/xtensa-esp32-elf-gcc/bin:$PATH" >> ~/.bashrc + $ echo "export PATH=/path/to/your/toolchain/xtensa-esp-elf-gcc/bin:$PATH" >> ~/.bashrc You can edit your shell's rc files if you don't use bash. diff --git a/Documentation/platforms/xtensa/esp32s2/index.rst b/Documentation/platforms/xtensa/esp32s2/index.rst index 1e8ed289bd2a6..e1b0e707dc970 100644 --- a/Documentation/platforms/xtensa/esp32s2/index.rst +++ b/Documentation/platforms/xtensa/esp32s2/index.rst @@ -13,6 +13,7 @@ ESP32-S2 Toolchain ================== The toolchain used to build ESP32-S2 firmware can be either downloaded or built from the sources. + It is **highly** recommended to use (download or build) the same toolchain version that is being used by the NuttX CI. @@ -26,20 +27,12 @@ check for the current compiler version being used. For instance: # Build image for tool required by ESP32 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-esp32 - # Download the latest ESP32 GCC toolchain prebuilt by Espressif - RUN mkdir -p xtensa-esp32-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s2-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s3-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ + # Download the latest ESP32, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif + RUN mkdir -p xtensa-esp-elf-gcc && \ + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ -For ESP32-S2, the toolchain version is based on GGC 12.2.0 (``xtensa-esp32s2-elf-12.2.0_20230208``) +For ESP32-S2, the toolchain version is based on GGC 14.2.0 (``xtensa-esp-elf-14.2.0_20241119``) The prebuilt Toolchain (Recommended) ------------------------------------ @@ -48,20 +41,20 @@ First, create a directory to hold the toolchain: .. code-block:: console - $ mkdir -p /path/to/your/toolchain/xtensa-esp32s2-elf-gcc + $ mkdir -p /path/to/your/toolchain/xtensa-esp-elf-gcc Download and extract toolchain: .. code-block:: console - $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ + $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ Add the toolchain to your `PATH`: .. code-block:: console - $ echo "export PATH=/path/to/your/toolchain/xtensa-esp32s2-elf-gcc/bin:$PATH" >> ~/.bashrc + $ echo "export PATH=/path/to/your/toolchain/xtensa-esp-elf-gcc/bin:$PATH" >> ~/.bashrc You can edit your shell's rc files if you don't use bash. diff --git a/Documentation/platforms/xtensa/esp32s3/index.rst b/Documentation/platforms/xtensa/esp32s3/index.rst index ca71cf504456b..a9421f17d87bd 100644 --- a/Documentation/platforms/xtensa/esp32s3/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/index.rst @@ -20,6 +20,7 @@ ESP32-S3 Toolchain ================== The toolchain used to build ESP32-S3 firmware can be either downloaded or built from the sources. + It is **highly** recommended to use (download or build) the same toolchain version that is being used by the NuttX CI. @@ -33,20 +34,12 @@ check for the current compiler version being used. For instance: # Build image for tool required by ESP32 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-esp32 - # Download the latest ESP32 GCC toolchain prebuilt by Espressif - RUN mkdir -p xtensa-esp32-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s2-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ - - RUN mkdir -p xtensa-esp32s3-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ + # Download the latest ESP32, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif + RUN mkdir -p xtensa-esp-elf-gcc && \ + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ -For ESP32-S3, the toolchain version is based on GGC 12.2.0 (``xtensa-esp32s3-elf-12.2.0_20230208``) +For ESP32-S3, the toolchain version is based on GGC 14.2.0 (``xtensa-esp-elf-14.2.0_20241119``) The prebuilt Toolchain (Recommended) ------------------------------------ @@ -55,20 +48,20 @@ First, create a directory to hold the toolchain: .. code-block:: console - $ mkdir -p /path/to/your/toolchain/xtensa-esp32s3-elf-gcc + $ mkdir -p /path/to/your/toolchain/xtensa-esp-elf-gcc Download and extract toolchain: .. code-block:: console - $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ + $ curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ Add the toolchain to your `PATH`: .. code-block:: console - $ echo "export PATH=/path/to/your/toolchain/xtensa-esp32s3-elf-gcc/bin:$PATH" >> ~/.bashrc + $ echo "export PATH=/path/to/your/toolchain/xtensa-esp-elf-gcc/bin:$PATH" >> ~/.bashrc You can edit your shell's rc files if you don't use bash.