Skip to content
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
27 changes: 10 additions & 17 deletions Documentation/platforms/xtensa/esp32/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
------------------------------------
Expand All @@ -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.

Expand Down
27 changes: 10 additions & 17 deletions Documentation/platforms/xtensa/esp32s2/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
------------------------------------
Expand All @@ -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.

Expand Down
27 changes: 10 additions & 17 deletions Documentation/platforms/xtensa/esp32s3/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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)
------------------------------------
Expand All @@ -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.

Expand Down
30 changes: 7 additions & 23 deletions tools/ci/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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/
Expand Down