Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for ESP-IDF Manager view and some minor fixes #953

Merged
merged 1 commit into from
May 28, 2024
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
62 changes: 18 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ To get a quick understanding of ESP-IDF and Eclipse plugin features, check our s
<details open>
<summary>Other IDE Features</summary>

* [ Installing ESP-IDF and Tools via Tools Installation Wizard ](#InstallToolsWizard) <br>
* [ Configuring the Project using sdkconfig Editor](#projectconfigure)<br>
* [ CMake Editor](#cmakeproject)<br>
* [ ESP-IDF Application Size Analysis Editor](#sizeanalysiseditor)<br>
Expand Down Expand Up @@ -112,42 +111,35 @@ For adding beta and nightly builds, you can use the following update site urls.
<a name="InstallTools"></a>
# Installing ESP-IDF

To install ESP-IDF directly from the Eclipse:
>With release of the beata 3.0 all the old installation flows for the ESP-IDF are now closed. We will be moving forward with this approach from next stable release.
Copy link

Choose a reason for hiding this comment

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

Correct the typo in "beata 3.0" to "beta 3.0".

- With release of the beata 3.0 all the old installation flows for the ESP-IDF are now closed.
+ With release of the beta 3.0 all the old installation flows for the ESP-IDF are now closed.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
>With release of the beata 3.0 all the old installation flows for the ESP-IDF are now closed. We will be moving forward with this approach from next stable release.
>With release of the beta 3.0 all the old installation flows for the ESP-IDF are now closed. We will be moving forward with this approach from next stable release.


1. Go to `Espressif` > `Download and Configure ESP-IDF`.
1. From the `Download ESP-IDF` section, choose ESP-IDF version and directory to download.
1. Click on `Finish`.

To configure an existing ESP-IDF:
Please follow the instructions bleow for installing ESP-IDF in the Espressif IDE.

1. Go to `Espressif` > `Download and Configure ESP-IDF`.
1. Check `Use an existing ESP-IDF directory from the file system`.
1. Choose an existing ESP-IDF directory from the file system.
1. Click on `Finish`.

This will download a specified ESP-IDF version and configure `IDF_PATH` in the Eclipse CDT build environment variables.
1. Go to `Espressif` > `ESP-IDF Manager`. The following editor will open
![](docs/images/ToolsManager/ESP-IDF_Manager_Editor_Screen.png)

![](docs/images/espidf_download.png)
1. Click on `Add ESP-IDF` button.
![](docs/images/ToolsManager/ESP-IDF_Configuration_Download_or_Use_ESP-IDF.png)
From the screen shown above you can choose an already downloaded ESP-IDF Directory or you can select and download directly from the given dialog. The `Git` and `Python` must be installed and if it is configured in system PATH it will be preloaded in the given view. If not you can Browse to the directory and select the proper executables.
Copy link

Choose a reason for hiding this comment

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

Add missing commas for clarity.

- The `Git` and `Python` must be installed and if it is configured in system PATH it will be preloaded in the given view.
+ The `Git` and `Python` must be installed, and if it is configured in system PATH, it will be preloaded in the given view.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
From the screen shown above you can choose an already downloaded ESP-IDF Directory or you can select and download directly from the given dialog. The `Git` and `Python` must be installed and if it is configured in system PATH it will be preloaded in the given view. If not you can Browse to the directory and select the proper executables.
From the screen shown above you can choose an already downloaded ESP-IDF Directory or you can select and download directly from the given dialog. The `Git` and `Python` must be installed, and if it is configured in system PATH, it will be preloaded in the given view. If not you can Browse to the directory and select the proper executables.


# Installing ESP-IDF Tools
1. Click on `Finish` which will be enabled after all the paths and executables are properly configured.

ESP-IDF requires the installation of several prerequisite tools to build firmware for the ESP32. These tools include Python, Git, cross-compilers, the menuconfig tool, CMake, and Ninja build tools.
> **Note** Please note that the python executable is not the one from the virtual environment created from the installation of the ESP-IDF via other means like from CLI. If you are selecting an already installed ESP-IDF directory IDE will automatically pick up the python once you have installed the tools.
To configure an existing ESP-IDF:

Follow the below instructions to get started.
After you have clicked `Finish` you will see the progress on console for the tools getting installed. Once the installation is done and this is the very first set of ESP-IDF installed in the IDE it will be activated as well and you will see a similar entry in the editor for ESP-IDF Manager
![](docs/images/ToolsManager/Tool_installed_and_activated.png)

1. Navigate to `Espressif` > `ESP-IDF Tools Manager` > `Install Tools`.
1. Provide the `ESP-IDF Directory` path.
1. Provide `Git` and `Python` executable locations if they are not auto-detected.
1. Click on `Install Tools` to proceed with the installation process. Check the Console for the installation details.
1. Installation might take a while if you're doing it for the first time since it has to download and install `xtensa-esp32-elf`, `esp32ulp-elf`, Cmake, `openocd-esp32` and Ninja tools.
You can add as many version of ESP-IDF as you want but only one of the version can be set active and that will be used to compile and index projects in your workspace. This new feature can help you in swithcing between versions in the workspace easily.
Copy link

Choose a reason for hiding this comment

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

Correct grammatical error: change "many version" to "many versions".

- You can add as many version of ESP-IDF as you want but only one of the version can be set active and that will be used to compile and index projects in your workspace.
+ You can add as many versions of ESP-IDF as you want, but only one of the versions can be set active and that will be used to compile and index projects in your workspace.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
You can add as many version of ESP-IDF as you want but only one of the version can be set active and that will be used to compile and index projects in your workspace. This new feature can help you in swithcing between versions in the workspace easily.
You can add as many versions of ESP-IDF as you want, but only one of the versions can be set active and that will be used to compile and index projects in your workspace. This new feature can help you in swithcing between versions in the workspace easily.


Copy link

Choose a reason for hiding this comment

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

Correct the phrase "look like" to "look".

- Lets take a look at how the multiple versions will look like.
+ Let's take a look at how the multiple versions will look.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
Let's take a look at how the multiple versions will look.

> **Note:** Ensure that you perform this step even if you have already installed the necessary tools. This step sets the IDF_PATH, PATH, OPENOCD_SCRIPTS, and IDF_PYTHON_ENV_PATH in the Eclipse CDT build environment based on the idf_tools.py export command.
Lets take a look at how the multiple versions will look like. You have to follow the same steps as done previously to add another ESP-IDF version to the IDE.
![](docs/images/ToolsManager/ESP-IDF_Manager_Multiple_versions.png)

![](docs/images/install_tools.png)
To activate any specific version simply click on the radio button next to it in the `Active` column.

ESP-IDF Directory selection dialog:
The refresh button in last column for the active ESP-IDF version can be used to reload any changes in the directory you made.

![](docs/images/esp_idf_dir.png)
> **Note** Please note that you can not delete an active ESP-IDF Version you need to activate another version before deleting that.
Copy link

Choose a reason for hiding this comment

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

Change "can not" to "cannot" for better readability.

- > **Note** Please note that you can not delete an active ESP-IDF Version you need to activate another version before deleting that.
+ > **Note** Please note that you cannot delete an active ESP-IDF Version; you need to activate another version before deleting that.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
> **Note** Please note that you can not delete an active ESP-IDF Version you need to activate another version before deleting that.
> **Note** Please note that you cannot delete an active ESP-IDF Version; you need to activate another version before deleting that.


<a name="NewProjectUsingDefault"></a>
# Create a new Project
Expand Down Expand Up @@ -256,24 +248,6 @@ To learn more about the debug configuration, please refer to <a href="https://gi

![](docs/images/4_new_project_templates.png)

<a name="InstallToolsWizard"></a>
# Tools Installation Wizard

You can use the Tools Installation Wizard to manage the tools installation via a wizard. The advantage of this method over the existing installation is that you can easily manage the whole flow via the wizard and install the tools in ESP-IDF framework that you only need.<br/>

To get started:

1. Navigate to `Espressif` > `ESP-IDF Tools Manager` > `Tools Installation Wizard (Preview)`.
![](docs/images/ToolsManager/install_tools_manager.png)

1. The wizard will start and you can select the location for the Git and Python, if they are already present on the system PATH or registry the tools will be populated. After selection, you can click `Next`.
![](docs/images/ToolsManager/git_python_selection.png)

1. Next page will let you select the folder for existing ESP-IDF or you can also select from the drop down list to download the available versions. You can also select master from the list to clone the master for ESP-IDF from GitHub.
![](docs/images/ToolsManager/select_or_download_new_esp_idf.png)

1. After you select `Next` you will see the list of all the available tools in the selected ESP-IDF version, this page lets you select only the recommended tools or you can select the tools you want to. You can also filter out the tools via the filter text box or based on the target. The wizard page is the last page and will Install and Download if necessary all the selected tools required. After you have installed all the tools you can finish the wizard and start creating projects.
![](docs/images/ToolsManager/manage_tools_installation.png)

<a name="projectconfigure"></a>
# SDK Configuration editor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
GridLayout gridLayout = new GridLayout(numColumns, false);
container.setLayout(gridLayout);
createIdfTable(container);
return container;

Check warning on line 74 in bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/manager/pages/ESPIDFMainTablePage.java

View workflow job for this annotation

GitHub Actions / spotbugs

EI_EXPOSE_REP

com.espressif.idf.ui.tools.manager.pages.ESPIDFMainTablePage.createPage(Composite) may expose internal representation by returning ESPIDFMainTablePage.container
Raw output
Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object.  If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.
}

public void refreshTable()
Expand Down Expand Up @@ -392,17 +392,6 @@

item.setData(EDITOR_KEY, editor);
IDFToolSet idfToolSet = (IDFToolSet) cell.getElement();
Button removeButton = new Button(buttonComposite, SWT.PUSH | SWT.FLAT);
removeButton.pack();
removeButton.setData(IDF_TOOL_SET_BTN_KEY, idfToolSet);
removeButton.setImage(UIPlugin.getImage(REMOVE_ICON));
removeButton.setToolTipText(Messages.EspIdfManagerDeleteBtnToolTip);
removeButton.addListener(SWT.Selection, e -> {
Button btn = (Button) e.widget;
IDFToolSet selectedToolSet = (IDFToolSet) btn.getData(IDF_TOOL_SET_BTN_KEY);
performDeleteOperation(selectedToolSet);
refreshTable();
});

if (idfToolSet.isActive())
{
Expand All @@ -420,6 +409,20 @@
toolsActivationJob.schedule();
});
}
else
{
Button removeButton = new Button(buttonComposite, SWT.PUSH | SWT.FLAT);
removeButton.pack();
removeButton.setData(IDF_TOOL_SET_BTN_KEY, idfToolSet);
removeButton.setImage(UIPlugin.getImage(REMOVE_ICON));
removeButton.setToolTipText(Messages.EspIdfManagerDeleteBtnToolTip);
removeButton.addListener(SWT.Selection, e -> {
Button btn = (Button) e.widget;
IDFToolSet selectedToolSet = (IDFToolSet) btn.getData(IDF_TOOL_SET_BTN_KEY);
performDeleteOperation(selectedToolSet);
refreshTable();
});
}

editor.grabHorizontal = true;
editor.setEditor(buttonComposite, item, cell.getColumnIndex());
Expand All @@ -444,56 +447,56 @@
{
private int propertyIndex;
private static final int DESCENDING = 1;
private int direction = 0;

public ColumnViewerComparator()
{
this.propertyIndex = 0;
direction = DESCENDING;
}

public void setColumn(int column)
{
if (column == this.propertyIndex)
{
// If the same column is clicked again, toggle the direction
direction = 1 - direction;
}
else
{
// Else, sort the new column in ascending order
this.propertyIndex = column;
direction = DESCENDING;
}
}

@Override
public int compare(Viewer viewer, Object e1, Object e2)
{
IDFToolSet p1 = (IDFToolSet) e1;
IDFToolSet p2 = (IDFToolSet) e2;
int rc = 0;
switch (propertyIndex)
{
case 0:
rc = p1.getIdfVersion().compareTo(p2.getIdfVersion());
break;
case 1:
rc = p1.getIdfLocation().compareTo(p2.getIdfLocation());
break;
case 2:
Boolean p1State = p1.isActive();
Boolean p2State = p2.isActive();
rc = p1State.compareTo(p2State);
break;
default:
break;
}
if (direction == DESCENDING)
{
rc = -rc;
}
return rc;

Check warning on line 499 in bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/manager/pages/ESPIDFMainTablePage.java

View workflow job for this annotation

GitHub Actions / spotbugs

SIC_INNER_SHOULD_BE_STATIC

Should com.espressif.idf.ui.tools.manager.pages.ESPIDFMainTablePage$ColumnViewerComparator be a _static_ inner class?
Raw output
This class is an inner class, but does not use its embedded reference to the object which created it.  This reference makes the instances of the class larger, and may keep the reference to the creator object alive longer than necessary.  If possible, the class should be made static.
}

}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ToolsManager/git_python_selection.png
Binary file not shown.
Binary file removed docs/images/ToolsManager/install_tools_manager.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/images/esp_idf_dir.png
Binary file not shown.
Binary file removed docs/images/espidf_download.png
Binary file not shown.
Binary file removed docs/images/install_tools.png
Binary file not shown.
Loading