|
1 | | -How to Add a Preview or Custom ESP-IDF Target in the IDE (Manual Configuration) |
2 | | -=============================================================================== |
| 1 | +Add a Preview or Custom ESP-IDF Target in the IDE |
| 2 | +================================================= |
3 | 3 |
|
4 | | -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: |
| 4 | +:link_to_translation:`zh_CN:[中文]` |
| 5 | + |
| 6 | +To add support for any preview or custom ESP-IDF target (such as ESP32-C5 or other targets not listed by default in the IDE), follow these steps: |
5 | 7 |
|
6 | 8 | Step 1: Configure Toolchain |
7 | 9 | --------------------------- |
8 | | -1. Go to Preferences → C/C++ → Core Build Toolchain. |
9 | | -2. Under User Defined Toolchain, click on Add…. |
10 | | -3. Select GCC and configure as follows: |
11 | | - - **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`) |
12 | | - - **Operating System:** (e.g. `esp32c5` for ESP32-C5) |
13 | | - - **CPU Arch:** (e.g. `riscv32` for ESP32-C5) |
14 | | -4. Click Finish. |
15 | | - |
16 | | -.. image:: ../../../media/toolchain/toolchain_1.png |
| 10 | + |
| 11 | +1. Go to ``Preferences`` > ``C/C++`` > ``Core Build Toolchain``. |
| 12 | +2. Under ``User Defined Toolchains``, click ``Add``. |
| 13 | +3. Select ``GCC`` and configure as follows: |
| 14 | + |
| 15 | + - **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`` |
| 16 | + - **Operating System**: e.g., ``esp32c5`` for ESP32-C5 |
| 17 | + - **CPU Arch**: e.g., ``riscv32`` for ESP32-C5 |
| 18 | + |
| 19 | +4. Click ``Finish``. |
| 20 | + |
| 21 | +.. figure:: ../../../media/toolchain/toolchain_1.png |
| 22 | + :align: center |
17 | 23 | :alt: Core Build Toolchains Preferences (Add Custom Target) |
18 | 24 |
|
19 | | -*Core Build Toolchains Preferences: Adding a custom/preview target toolchain (example: ESP32-C5)* |
| 25 | + Core Build Toolchains Preferences: Adding a custom/preview target toolchain (example: ESP32-C5) |
20 | 26 |
|
21 | 27 | Step 2: Configure CMake Toolchain |
22 | 28 | --------------------------------- |
23 | | -1. Navigate to Preferences → C/C++ → CMake. |
24 | | -2. Click on Add…. |
25 | | -3. Browse and select the CMake toolchain file for your target (e.g. `toolchain-esp32c5.cmake`). |
| 29 | + |
| 30 | +1. Navigate to ``Preferences`` > ``C/C++`` > ``CMake``. |
| 31 | +2. Click ``Add``. |
| 32 | +3. Browse and select the CMake toolchain file for your target (e.g., ``toolchain-esp32c5.cmake``). |
26 | 33 | 4. Choose the corresponding toolchain entry created in Step 1. |
27 | | -5. Click Finish. |
| 34 | +5. Click ``Finish``. |
28 | 35 |
|
29 | | -.. image:: ../../../media/toolchain/toolchain_2.png |
| 36 | +.. figure:: ../../../media/toolchain/toolchain_2.png |
| 37 | + :align: center |
30 | 38 | :alt: CMake Toolchain Preferences (Add Custom Target) |
31 | 39 |
|
32 | | -*CMake Toolchain Preferences: Adding a custom/preview target toolchain file (example: ESP32-C5)* |
| 40 | + CMake Toolchain Preferences: Adding a custom/preview target toolchain file (example: ESP32-C5) |
33 | 41 |
|
34 | 42 | Step 3: Add Launch Target |
35 | 43 | ------------------------- |
36 | | -1. From the IDE's top toolbar target list, click on New Launch Target. |
37 | | -2. Select ESP Target. |
| 44 | + |
| 45 | +1. From the IDE's top toolbar target list, click ``New Launch Target``. |
| 46 | +2. Select ``ESP Target``. |
38 | 47 | 3. Provide the following details: |
39 | | - - **Name:** (e.g. `esp32c5`) |
40 | | - - **IDF Target:** (e.g. `esp32c5`) |
41 | | -4. Click Finish. |
42 | 48 |
|
43 | | -.. image:: ../../../media/toolchain/toolchain_3.png |
| 49 | + - ``Name``: e.g., esp32c5 |
| 50 | + - ``IDF Target``: e.g., esp32c5 |
| 51 | + |
| 52 | +4. Click ``Finish``. |
| 53 | + |
| 54 | +.. figure:: ../../../media/toolchain/toolchain_3.png |
| 55 | + :align: center |
44 | 56 | :alt: New ESP Target Dialog (Custom Target Example) |
45 | 57 |
|
46 | | -*New ESP Target Dialog: Creating a launch target for a custom/preview target (example: ESP32-C5)* |
| 58 | + New ESP Target Dialog: Creating a launch target for a custom/preview target (example: ESP32-C5) |
47 | 59 |
|
48 | 60 | Step 4: Build a Project |
49 | 61 | ----------------------- |
| 62 | + |
50 | 63 | - Create or open a project. |
51 | 64 | - Select your custom/preview target from the target list. |
52 | 65 | - Build the project. |
53 | 66 |
|
54 | | -.. image:: ../../../media/toolchain/toolchain_4.png |
| 67 | +.. figure:: ../../../media/toolchain/toolchain_4.png |
| 68 | + :align: center |
55 | 69 | :alt: Build Output for Custom Target Project |
56 | 70 |
|
57 | | -*Build Output: Successfully building a project for a custom/preview target (example: ESP32-C5)* |
| 71 | + Build Output: Successfully building a project for a custom/preview target (example: ESP32-C5) |
0 commit comments