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
57 changes: 57 additions & 0 deletions docs/en/additionalfeatures/configuretoolchain.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
How to Add a Preview or Custom ESP-IDF Target in the IDE (Manual Configuration)
===============================================================================

To add support for any preview or custom ESP-IDF target (such as ESP32-C5 or others not listed by default in the IDE), follow these steps:

Step 1: Configure Toolchain
---------------------------
1. Go to Preferences → C/C++ → Core Build Toolchain.
2. Under User Defined Toolchain, click on Add….
3. Select GCC and configure as follows:
- **Compiler:** (Path to the toolchain compiler for your target, e.g. `/Users/testuser/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc`)
- **Operating System:** (e.g. `esp32c5` for ESP32-C5)
- **CPU Arch:** (e.g. `riscv32` for ESP32-C5)
4. Click Finish.

.. image:: ../../../media/toolchain/toolchain_1.png
:alt: Core Build Toolchains Preferences (Add Custom Target)

Comment on lines +16 to +18
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid image paths will break docs build

The relative paths for your screenshots are off by one directory; from docs/en/additionalfeatures, you should use ../../media/... instead of ../../../media/....

--- a/docs/en/additionalfeatures/configuretoolchain.rst
+++ b/docs/en/additionalfeatures/configuretoolchain.rst
@@ -16,3 +16,3 @@
-.. image:: ../../../media/toolchain/toolchain_1.png
-  :alt: Core Build Toolchains Preferences (Add Custom Target)
+.. image:: ../../media/toolchain/toolchain_1.png
+   :alt: Core Build Toolchains Preferences (Add Custom Target)
@@ -29,3 +29,3 @@
-.. image:: ../../../media/toolchain/toolchain_2.png
-  :alt: CMake Toolchain Preferences (Add Custom Target)
+.. image:: ../../media/toolchain/toolchain_2.png
+   :alt: CMake Toolchain Preferences (Add Custom Target)
@@ -43,3 +43,3 @@
-.. image:: ../../../media/toolchain/toolchain_3.png
-  :alt: New ESP Target Dialog (Custom Target Example)
+.. image:: ../../media/toolchain/toolchain_3.png
+   :alt: New ESP Target Dialog (Custom Target Example)
@@ -54,3 +54,3 @@
-.. image:: ../../../media/toolchain/toolchain_4.png
-  :alt: Build Output for Custom Target Project
+.. image:: ../../media/toolchain/toolchain_4.png
+   :alt: Build Output for Custom Target Project

Also applies to: 29-31, 43-44, 54-55

🤖 Prompt for AI Agents
In docs/en/additionalfeatures/configuretoolchain.rst around lines 16 to 18, the
relative image paths are incorrect and cause the docs build to break. Change the
image paths from '../../../media/...' to '../../media/...' to correctly
reference the media directory relative to the current file. Also update the same
path correction for lines 29-31, 43-44, and 54-55.

*Core Build Toolchains Preferences: Adding a custom/preview target toolchain (example: ESP32-C5)*

Step 2: Configure CMake Toolchain
---------------------------------
1. Navigate to Preferences → C/C++ → CMake.
2. Click on Add….
3. Browse and select the CMake toolchain file for your target (e.g. `toolchain-esp32c5.cmake`).
4. Choose the corresponding toolchain entry created in Step 1.
5. Click Finish.

.. image:: ../../../media/toolchain/toolchain_2.png
:alt: CMake Toolchain Preferences (Add Custom Target)

*CMake Toolchain Preferences: Adding a custom/preview target toolchain file (example: ESP32-C5)*

Step 3: Add Launch Target
-------------------------
1. From the IDE's top toolbar target list, click on New Launch Target.
2. Select ESP Target.
3. Provide the following details:
- **Name:** (e.g. `esp32c5`)
- **IDF Target:** (e.g. `esp32c5`)
4. Click Finish.

.. image:: ../../../media/toolchain/toolchain_3.png
:alt: New ESP Target Dialog (Custom Target Example)

*New ESP Target Dialog: Creating a launch target for a custom/preview target (example: ESP32-C5)*

Step 4: Build a Project
-----------------------
- Create or open a project.
- Select your custom/preview target from the target list.
- Build the project.

.. image:: ../../../media/toolchain/toolchain_4.png
:alt: Build Output for Custom Target Project

*Build Output: Successfully building a project for a custom/preview target (example: ESP32-C5)*
4 changes: 3 additions & 1 deletion docs/en/buildproject.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ References
.. toctree::
:maxdepth: 1

Configure CDT Build Environment Variables<additionalfeatures/configureenvvariables>
Configure CDT Build Environment Variables <additionalfeatures/configureenvvariables>
Add a Preview or Custom ESP-IDF Target <additionalfeatures/configuretoolchain>

Binary file added media/toolchain/toolchain_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/toolchain/toolchain_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/toolchain/toolchain_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/toolchain/toolchain_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading