Skip to content

Commit 11c9619

Browse files
Merge branch 'updateguide' into 'master'
Update README See merge request idf/idf-eclipse-plugin!70
2 parents cd11b24 + 946d1b4 commit 11c9619

File tree

1 file changed

+109
-107
lines changed

1 file changed

+109
-107
lines changed

README.md

Lines changed: 109 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ IDF Eclipse Plugins aiming to provide better tooling capabilities, which simplif
44

55
# Table Of Contents
66
* [ Prerequisites ](#Prerequisites) <br>
7-
* [ Getting Started ](#GettingStarted) <br>
8-
* [ Installation of Tools ](#InstallTools) <br>
9-
* [ Configuring Environment Variables ](#configureEnvironmentVariables)<br>
10-
* [ Create a new Project using default template ](#NewProjectUsingDefault)<br>
11-
* [ Create a new project using idf examples/templates ](#NewProjectUsingTemplates)<br>
7+
* [ Installing IDF Eclipse Plugins ](#GettingStarted) <br>
8+
* [ Installing ESP-IDF Tools ](#InstallTools) <br>
9+
* [ Creating a new Project ](#NewProjectUsingDefault)<br>
10+
* [ Creating new project using ESP-IDF Templates ](#NewProjectUsingTemplates)<br>
1211
* [ Import an existing IDF Project ](#ImportProject)<br>
13-
* [ Configuring Core Build Toolchains ](#ConfigureToolchains)<br>
14-
* [ Configuring CMake Toolchain ](#ConfigureCMakeToolchain)<br>
1512
* [ Configuring Launch Target ](#ConfigureLaunchTarget)<br>
1613
* [ Compiling the Project ](#BuildApplication)<br>
17-
* [ Viewing Serial Output ](#ConfigureLaunchTerminal)<br>
1814
* [ Flashing the Project ](#FlashApplication)<br>
15+
* [ Viewing Serial Output ](#ConfigureLaunchTerminal)<br>
1916
* [ Configuring the Project using sdkconfig Editor](#projectconfigure)<br>
2017
* [ CMake Editor](#cmakeproject)<br>
2118
* [ Debugging the Project ](#debugging)<br>
19+
* [ Configuring Build Environment Variables ](#configureEnvironmentVariables)<br>
20+
* [ Configuring Core Build Toolchain ](#ConfigureToolchains)<br>
21+
* [ Configuring CMake Toolchain ](#ConfigureCMakeToolchain)<br>
22+
* [ Configuring the flash arguments ](#customizeLaunchConfig)<br>
23+
* [ Troubleshooting Guide](#troubleshooting)<br>
2224
* [ How to raise bugs ](#howToRaiseBugs)<br>
2325
* [ FAQ ](#faq)<br>
2426

@@ -37,18 +39,18 @@ Eclipse provides two ways to install the IDF Plugins
3739
* Installing IDF Plugins from Local
3840

3941
# Installing IDF Plugins using update site url
40-
* You can install the IDF Eclipse plugins into an existing Eclipse CDT installation using the update site url. You first need to add the release repository url as follows:
42+
You can install the IDF Eclipse plugins into an existing Eclipse CDT installation using the update site url. You first need to add the release repository url as follows:
4143
* Go to `Help` -> `Install New Software`
4244
* Click `Add…`
43-
* Enter `Location` of the repository `https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/`
45+
* Enter `Location` of the repository https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/
4446
* Enter `Name` as `Espressif IDF Plugins for Eclipse`
4547
* Click `Ok`
4648
* Select `Espressif IDF` from the list and proceed with the installation
4749

4850
![](docs/images/idf_update_site_install.png)
4951

5052
# Installing IDF Plugins from Local
51-
* Download the latest update site archive for IDF Eclipse Plugins here - `https://github.com/espressif/idf-eclipse-plugin/releases`
53+
* Download the latest update site archive for IDF Eclipse Plugins here - https://github.com/espressif/idf-eclipse-plugin/releases
5254
* Unzip the archive
5355
* In Eclipse, choose `Help` -> `Install New Software`
5456
* Click `Add…` button
@@ -60,7 +62,7 @@ Eclipse provides two ways to install the IDF Plugins
6062
![](docs/images/1_idffeature_install.png)
6163

6264
<a name="InstallTools"></a>
63-
# Installation of IDF Tools
65+
# Installing ESP-IDF Tools
6466
ESP-IDF requires some prerequisite tools to be installed so you can build firmware for the ESP32. The prerequisite tools include Python, Git, cross-compilers, menuconfig tool, CMake and Ninja build tools.
6567

6668
For this getting started follow the instructions below.
@@ -72,58 +74,24 @@ For this getting started follow the instructions below.
7274

7375
![](docs/images/install_tools.png)
7476

75-
ESP_IDF Directory selection dialog:
77+
ESP-IDF Directory selection dialog:
7678

7779
![](docs/images/esp_idf_dir.png)
7880

79-
<a name="configureEnvironmentVariables"></a>
80-
# Configuring Environment Variables
81-
If IDF Tools are installed using `Help` > `Espressif IDF Tools Manager` > `Install Tools` menu option, and Eclipse auto configure these required environment variables.
82-
83-
Mandatory required environment variables:
84-
* IDF_PATH
85-
* PATH
86-
* OPENOCD_SCRIPTS
87-
* IDF_PYTHON_ENV_PATH
88-
89-
If due to any issues if the required environment variables are not configured, please follow the below instructions to add or modify them.
90-
91-
* Click on the `Environment` preference page under `C/C++ Build`.
92-
* Click “Add…” again, and enter name `IDF_PATH`. The value should be the full path where ESP-IDF is installed.
93-
* Similarly we shoud configure OPENOCD_SCRIPTS, IDF_PYTHON_ENV_PATH and PATH environment variables
94-
95-
This is how they looks like:
96-
97-
##### IDF_PATH #####
98-
`/Users/kondal/esp/esp-idf`
99-
100-
##### OPENOCD_SCRIPTS #####
101-
`/Users/kondal/.espressif/tools/openocd-esp32/v0.10.0-esp32-20190313/openocd-esp32/share/openocd/scripts`
102-
103-
##### IDF_PYTHON_ENV_PATH #####
104-
`/Users/kondal/.espressif/python_env/idf4.0_py3.7_env`
105-
106-
##### PATH #####
107-
`/Users/kondal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin:/Users/kondal/.espressif/tools/esp32ulp-elf/2.28.51.20170517/esp32ulp-elf-binutils/bin:/Users/kondal/.espressif/tools/cmake/3.13.4/CMake.app/Contents/bin:/Users/kondal/.espressif/tools/openocd-esp32/v0.10.0-esp32-20190313/openocd-esp32/bin:/Users/kondal/.espressif/tools/ninja/1.9.0/:/Users/kondal/.espressif/python_env/idf4.0_py3.7_env/bin:/Users/kondal/esp/esp-idf/tools:$PATH`
108-
109-
![](docs/images/2_environment_pref.png)
110-
11181
<a name="NewProjectUsingDefault"></a>
112-
# CMake IDF Project
113-
114-
## To create a new Project using default esp-idf-template:
115-
* Make sure you are in C/C++ perspective.
82+
# Create a new Project
83+
* Make sure you are in `C/C++ Perspective`
11684
* Go to `File` > `New` > `Espressif IDF Project` (If you don't see this, please reset the perspective from `Window` > `Perspective` > `Reset Perspective..`)
117-
* Provide the project Name
85+
* Provide the `Project name`
11886
* Click `Finish`
11987

12088
![](docs/images/3_new_project_default.png)
12189

12290
<a name="NewProjectUsingTemplates"></a>
123-
## To create a new project using idf examples/templates:
124-
* Make sure you're in C/C++ perspective.
91+
# Create a new project using ESP-IDF Templates
92+
* Make sure you're in `C/C++ Perspective`
12593
* Go to `File` > `New` > `Espressif IDF Project` (If you don't see this, please reset the perspective from `Window` > `Perspective` > `Reset Perspective..`)
126-
* Provide the Project Name
94+
* Provide the `Project name`
12795
* Click `Next`
12896
* Check `Create a project using one of the templates`
12997
* Select the required template from the tree
@@ -132,54 +100,18 @@ This is how they looks like:
132100
![](docs/images/4_new_project_templates.png)
133101

134102
<a name="ImportProject"></a>
135-
# Import an existing IDF Project
103+
# Import an existing IDF Project
136104
* Make sure you're in `C/C++ Perspective`.
137-
* Right click on the Project Explorer
105+
* Right click in the Project Explorer
138106
* Select `Import..` Menu
139107
* Select `Existing IDF Project` from `Espressif` import wizard menu list
140108
* Click `Next`
141109
* Click on `Browse...` to choose an existing project location directory
142-
* Provide project name if you wish you have a different name
110+
* Provide `Project name` if you wish you have a different name
143111
* Click `Finish` to import the selected project into eclipse workspace as a CMake project
144112

145113
![](docs/images/5_import_project.png)
146114

147-
<a name="BuildIDFProject"></a>
148-
# Building the IDF projects
149-
150-
We need to tell Eclipse CDT what is the CMake toolchain and toolchain file which need to be used to build the project. However, this will be auto-detected if you've installed the tools using the `Help > Espressif IDF Tools Manager > Install Tools` option from the Eclipse.
151-
152-
If you see toolchain is not auto-detected you can always configure using the below instructions.
153-
154-
<a name="ConfigureToolchains"></a>
155-
# Configuring Core Build Toolchains
156-
157-
* Open Eclipse Preferences
158-
* Navigate to `C/C++ -> “Core Build Toolchains` preference page
159-
* Click on `Add..` from the User defined Toolchians tables
160-
* Select `GCC` as a toolchain type
161-
* Click on `Next>`
162-
* Provide the GCC Toolchain Settings:
163-
164-
**Compiler:** /Users/kondal/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc,
165-
**Operating System:** esp32,
166-
**CPU Architecture:** xtensa
167-
168-
![](docs/images/6_core_build_toolchains.png)
169-
170-
<a name="ConfigureCMakeToolchain"></a>
171-
# Configuring CMake Toolchain
172-
We now need to tell CDT which toolchain to use when building the project. This will pass the required arguments to CMake when generating the Ninja files.
173-
174-
* Navigate to “C/C++ -> “CMake” preference page
175-
* Click `Add..` and this will launch the New CMake Toolchain configuration dialog
176-
* Browse CMake toolchain `Path`. Example: `/Users/kondal/esp/esp-idf/tools/cmake/toolchain-esp32.cmake`
177-
* Select GCC Xtensa Toolchain compiler from the drop-down list. Example: `esp32 xtensa /Users/kondal/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc`
178-
179-
**NOTE:** Eclipse CDT has a bug in saving the toolchain preferences, hence it's recommended to restart the Eclipse before we move further configuring the launch target.
180-
181-
![](docs/images/7_cmake_toolchain.png)
182-
183115
<a name="ConfigureLaunchTarget"></a>
184116
# Configuring Launch target
185117
Next, we need to tell CDT to use the toolchain for our project. This is accomplished through the Launch Bar, the new widget set you see on the far left of the toolbar. And this will be shown only when you have a project in the project explorer.
@@ -203,22 +135,9 @@ Next, we need to tell CDT to use the toolchain for our project. This is accompli
203135

204136
<a name="FlashApplication"></a>
205137
# Flashing the Project
206-
ESP-IDF has a tool called "idf.py" which is a wrapper around make flash command with some handy operations. Flash operation can be initiated with just a click of a launch button(second button from the left) and it's auto-configured to flash the application with the default flash command i.e, "idf.py -p PORT flash".
207-
208-
To provide the customized flash arguments, follow the below instructions to launch the configuration UI
209-
210-
* Click on the `Launch Configuration` edit button
211-
* Switch to the `Main` tab
212-
* Specify the `Location` where this application has to run on. Since idf.py is a python file, will configure the python system path. Example:`${system_path:python}`
213-
* Specify `Working directory` of the application. Example: `${workspace_loc:/hello_world}`
214-
* In additional arguments, provide a flashing command which will run in the specified working directory
215-
* Flash command looks like this: `/Users/kondal/esp/esp-idf/tools/idf.py -p /dev/cu.SLAB_USBtoUART flash`
216-
* Click OK to save the settings
217-
* Click on the `Launch` icon to flash the application to the selected board
138+
ESP-IDF has a tool called `idf.py` which is a wrapper around make flash command with some handy operations. Flash operation can be initiated with just a click of a launch button(second button from the left) and it's auto-configured to flash the application with the default flash command i.e, `idf.py -p PORT flash`.
218139

219-
![](docs/images/11_launch_configuration.png)
220-
221-
![](docs/images/12_flashing.png)
140+
To provide the customized flash arguments, please follow [this](#customizeLaunchConfig) link for further instructions.
222141

223142
<a name="ConfigureLaunchTerminal"></a>
224143
# Viewing Serial Output
@@ -260,6 +179,89 @@ CMake editor preferences can be controlled using `Eclipse > Preferences > CMakeE
260179
# Debugging the Project
261180
Please refer to <a href ="https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html" > JTAG Debugging guide</a>
262181

182+
<a name="configureEnvironmentVariables"></a>
183+
# Configuring Environment Variables
184+
Eclipse auto configure the required environment variables in the `Preferences > C/C++ Build > Environment` section If IDF Tools are installed using `Help` > `Espressif IDF Tools Manager` > `Install Tools` menu option.
185+
186+
Mandatory required environment variables:
187+
* IDF_PATH
188+
* PATH
189+
* OPENOCD_SCRIPTS
190+
* IDF_PYTHON_ENV_PATH
191+
192+
Due to any issues if the required environment variables are not configured, Please follow the step by step instructions below.
193+
* Click on the `Environment` preference page under `C/C++ Build`.
194+
* Click “Add…” again, and enter name `IDF_PATH`. The value should be the full path where ESP-IDF is installed.
195+
* Similarly we shoud configure OPENOCD_SCRIPTS, IDF_PYTHON_ENV_PATH and PATH environment variables
196+
197+
This is how they looks like:
198+
199+
##### IDF_PATH #####
200+
`/Users/kondal/esp/esp-idf`
201+
202+
##### OPENOCD_SCRIPTS #####
203+
`/Users/kondal/.espressif/tools/openocd-esp32/v0.10.0-esp32-20190313/openocd-esp32/share/openocd/scripts`
204+
205+
##### IDF_PYTHON_ENV_PATH #####
206+
`/Users/kondal/.espressif/python_env/idf4.0_py3.7_env`
207+
208+
##### PATH #####
209+
`/Users/kondal/.espressif/tools/xtensa-esp32-elf/esp32-2019r1-8.2.0/xtensa-esp32-elf/bin:/Users/kondal/.espressif/tools/esp32ulp-elf/2.28.51.20170517/esp32ulp-elf-binutils/bin:/Users/kondal/.espressif/tools/cmake/3.13.4/CMake.app/Contents/bin:/Users/kondal/.espressif/tools/openocd-esp32/v0.10.0-esp32-20190313/openocd-esp32/bin:/Users/kondal/.espressif/tools/ninja/1.9.0/:/Users/kondal/.espressif/python_env/idf4.0_py3.7_env/bin:/Users/kondal/esp/esp-idf/tools:$PATH`
210+
211+
![](docs/images/2_environment_pref.png)
212+
213+
# Configuring Toolchains
214+
We need to tell Eclipse CDT what is the core build toolchain and CMake toolchain which need to be used to build the project. However, this will be auto-detected if you've installed the tools using the `Help > Espressif IDF Tools Manager > Install Tools` option from the Eclipse.
215+
216+
If due to any issues if these toolchains are not detected, Please follow the step by step instructions below to add a new toolchain.
217+
218+
<a name="ConfigureToolchains"></a>
219+
# Configuring Core Build Toolchains
220+
221+
* Open Eclipse Preferences
222+
* Navigate to `C/C++ -> “Core Build Toolchains` preference page
223+
* Click on `Add..` from the User defined Toolchians tables
224+
* Select `GCC` as a toolchain type
225+
* Click on `Next>`
226+
* Provide the GCC Toolchain Settings:
227+
228+
**Compiler:** /Users/kondal/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc,
229+
**Operating System:** esp32,
230+
**CPU Architecture:** xtensa
231+
232+
![](docs/images/6_core_build_toolchains.png)
233+
234+
<a name="ConfigureCMakeToolchain"></a>
235+
# Configuring CMake Toolchain
236+
We now need to tell CDT which toolchain to use when building the project. This will pass the required arguments to CMake when generating the Ninja files.
237+
238+
* Navigate to “C/C++ -> “CMake” preference page
239+
* Click `Add..` and this will launch the New CMake Toolchain configuration dialog
240+
* Browse CMake toolchain `Path`. Example: `/Users/kondal/esp/esp-idf/tools/cmake/toolchain-esp32.cmake`
241+
* Select GCC Xtensa Toolchain compiler from the drop-down list. Example: `esp32 xtensa /Users/kondal/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc`
242+
243+
**NOTE:** Eclipse CDT has a bug in saving the toolchain preferences, hence it's recommended to restart the Eclipse before we move further configuring the launch target.
244+
245+
![](docs/images/7_cmake_toolchain.png)
246+
247+
<a name="customizeLaunchConfig"></a>
248+
# Launch Configuration
249+
To provide the customized launch configuration and flash arguments, please follow the step by step instructions below.
250+
251+
* Click on the `Launch Configuration` edit button
252+
* Switch to the `Main` tab
253+
* Specify the `Location` where this application has to run on. Since `idf.py` is a python file, will configure the python system path. Example:`${system_path:python}`
254+
* Specify `Working directory` of the application. Example: `${workspace_loc:/hello_world}`
255+
* In additional arguments, provide a flashing command which will run in the specified working directory
256+
* Flash command looks like this: `/Users/kondal/esp/esp-idf/tools/idf.py -p /dev/cu.SLAB_USBtoUART flash`
257+
* Click OK to save the settings
258+
* Click on the `Launch` icon to flash the application to the selected board
259+
260+
![](docs/images/11_launch_configuration.png)
261+
262+
![](docs/images/12_flashing.png)
263+
264+
<a name="troubleshooting"></a>
263265
# Troubleshooting
264266

265267
## Error Log

0 commit comments

Comments
 (0)