Skip to content

Commit ed9e5d1

Browse files
docs: Move documentation to docs.espressif #1076)
Move documentation to docs.espressif
1 parent 56fcb66 commit ed9e5d1

File tree

198 files changed

+1648
-56
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+1648
-56
lines changed

.github/workflows/docs_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Documentation Build and Deploy CI
1+
name: Documentation Build and Preview Deploy CI
22

33
on:
44
push:

.github/workflows/docs_production.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
env:
3333
# Deploy to production server
3434
# DOCS_BUILD_DIR: "./docs/_build/"
35-
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PREVIEW_PRIVATEKEY }}
36-
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PREVIEW_PATH }}
37-
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PREVIEW_SERVER }}
38-
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PREVIEW_USER }}
39-
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PREVIEW_URL_BASE }}
35+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_PROD_PRIVATEKEY }}
36+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PROD_PATH }}
37+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_PROD_SERVER }}
38+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_PROD_USER }}
39+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_PROD_URL_BASE }}
4040
run: |
4141
sudo apt update
4242
sudo apt install python3-pip python3-setuptools

.github/workflows/pr-comment.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Comment on pull request
2+
on:
3+
workflow_run:
4+
workflows: [CI]
5+
types: [completed]
6+
jobs:
7+
pr_comment:
8+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@v7
12+
with:
13+
# This snippet is public-domain, taken from
14+
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
15+
script: |
16+
async function upsertComment(owner, repo, issue_number, purpose, body) {
17+
const {data: comments} = await github.rest.issues.listComments(
18+
{owner, repo, issue_number});
19+
20+
const marker = `<!-- bot: ${purpose} -->`;
21+
body = marker + "\n" + body;
22+
23+
const existing = comments.filter((c) => c.body.includes(marker));
24+
if (existing.length > 0) {
25+
const last = existing[existing.length - 1];
26+
core.info(`Updating comment ${last.id}`);
27+
await github.rest.issues.updateComment({
28+
owner, repo,
29+
body,
30+
comment_id: last.id,
31+
});
32+
} else {
33+
core.info(`Creating a comment in issue / PR #${issue_number}`);
34+
await github.rest.issues.createComment({issue_number, body, owner, repo});
35+
}
36+
}
37+
38+
const {owner, repo} = context.repo;
39+
const run_id = ${{github.event.workflow_run.id}};
40+
41+
const pull_requests = ${{ toJSON(github.event.workflow_run.pull_requests) }};
42+
if (!pull_requests.length) {
43+
return core.error("This workflow doesn't match any pull requests!");
44+
}
45+
46+
const artifacts = await github.paginate(
47+
github.rest.actions.listWorkflowRunArtifacts, {owner, repo, run_id});
48+
if (!artifacts.length) {
49+
return core.error(`No artifacts found`);
50+
}
51+
let body = `Download the artifacts for this pull request:\n`;
52+
for (const art of artifacts) {
53+
body += `\n* [${art.name}.zip](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
54+
}
55+
56+
core.info("Review thread message body:", body);
57+
58+
for (const pr of pull_requests) {
59+
body += `\n [Espressif-IDE Documentation Preview](https://preview-docs.espressif.com/projects/espressif-ide/en/${pr.number}-merge/index.html)`;
60+
await upsertComment(owner, repo, pr.number,
61+
"nightly-link", body);
62+
}

FAQ.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,6 @@ Check below links:
9595
- https://esp32.com/viewtopic.php?f=13&t=12327&start=10#p50137
9696
- https://stackoverflow.com/questions/6908948/java-sun-security-provider-certpath-suncertpathbuilderexception-unable-to-find
9797

98-
## Why Java 11 recommended for IDF Eclipse Plugin?
99-
We recommend using Java 11(that's the latest LTS version from Oracle) and above while working with IDF Eclipse Plugin considering Eclipse 2020-06 has a requirement for Java 11 to work with the CDT. Here are some important pointers from Eclipse.
100-
101-
### Installing CDT 9.11 on Eclipse 2020-06 and later requires a workaround when using Java 8
102-
Check this - https://wiki.eclipse.org/CDT/User/NewIn911#Release
103-
104-
CDT 9.11 only requires Java 8 to run. However, a new feature in Eclipse 2020-06 and later means that the install wizard may prevent installation. The workaround is to disable "Verify provisioning operation is compatible with currently running JRE" in Windows -> Preferences -> Install/Update. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=564407#c1
105-
106-
### CDT 10.0 required Java 11 or later
107-
Check this - https://wiki.eclipse.org/CDT/User/NewIn100
108-
109-
Starting with CDT 10.0 Java 11 or later is required to run CDT. This aligns with requirements of Eclipse IDE which also requires Java 11 to run starting in 2020-09.
110-
11198
## How to delete Launch Targets from the Eclipse
11299
There is no UI option to delete launch targets directly from the eclipse, however this can be achieved by following the below instructions.
113100
- Go to the Eclipse workspace directory. For example: In my case /Users/myName/myTesteclipseWorkspace

docs/en/additionalfeatures.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,21 @@ Additional IDE Features
33
.. toctree::
44
:maxdepth: 1
55

6+
LSP C/C++ Editor<additionalfeatures/lspeditor>
7+
CMake Editor<additionalfeatures/cmakeeditor>
68
ESP-IDF Application Size Analysis<additionalfeatures/application-size-analysis>
79
ESP-IDF Terminal<additionalfeatures/esp-terminal>
810
Install ESP-IDF Components<additionalfeatures/install-esp-components>
9-
11+
Heap Tracing<additionalfeatures/heaptracing>
12+
ESP-IDF OpenOCD Debugging<openocddebugging>
13+
GDB Stub Debugging<additionalfeatures/gdbstubdebugging>
14+
Core Dump Debugging<additionalfeatures/coredumpdebugging>
15+
Application Level Tracing<additionalfeatures/appleveltracing>
16+
Partition Table Editor<additionalfeatures/partitiontableeditor>
17+
NVS Partition Editor<additionalfeatures/nvspartitioneditor>
18+
Write Binary to Flash<additionalfeatures/writebinarytoflash>
19+
DFU Flashing<additionalfeatures/dfu>
20+
Wokwi Simulator<additionalfeatures/wokwisimulator>
21+
Switch Between Languages<additionalfeatures/switchlanguage>
22+
23+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Application Level Tracing
2+
=========================
3+
4+
ESP-IDF provides a useful feature for program behavior analysis called `Application Level Tracing <https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/app_trace.html?>`_. The IDF-Eclipse plugin has a UI that allows you to start and stop tracing commands and process the received data. To familiarize yourself with this library, you can use the `app_trace_to_host <https://github.com/espressif/esp-idf/tree/release/v5.0/examples/system/app_trace_to_host>`_ project or the `app_trace_basic <https://github.com/espressif/esp-idf/tree/release/v5.1/examples/system/app_trace_basic>`_ project (if using esp-idf 5.1 and higher). These projects can be created from the plugin itself:
5+
6+
.. image:: ../../../media/AppLvlTracing_1.png
7+
:alt: Application Level Tracing project creation
8+
9+
Before using application-level tracing, create a debug configuration for the project where you must select the board you are using to successfully start the OpenOCD server.
10+
11+
.. image:: ../../../media/AppLvlTracing_3.png
12+
:alt: Debug configuration setup
13+
14+
After creating the debug configuration, right-click on the project in the Project Explorer and select *ESP-IDF > Application Level Tracing*:
15+
16+
.. image:: ../../../media/AppLvlTracing_2.png
17+
:alt: Application Level Tracing option in the context menu
18+
19+
It may take a moment to open the application level tracing dialog, as the OpenOCD server starts first. At the top of the dialog, you will find auto-configured fields that you can adjust for the trace start command.
20+
21+
**Start Command:**
22+
23+
- Syntax: ``start <outfile> [poll_period [trace_size [stop_tmo [wait4halt [skip_size]]]]``
24+
- Arguments:
25+
- ``outfile``: Path to the file where data from both CPUs will be saved, with format ``file://path/to/file``.
26+
- ``poll_period``: Data polling period (in ms). If greater than 0, the command runs in non-blocking mode. Default: 1 ms.
27+
- ``trace_size``: Maximum data size to collect (in bytes). Tracing stops after the specified amount of data is received. Default: -1 (disabled).
28+
- ``stop_tmo``: Idle timeout (in sec). Stops tracing if there is no data for the specified period. Default: -1 (disabled).
29+
- ``wait4halt``: If 0, tracing starts immediately; otherwise, waits for the target to halt before starting. Default: 0.
30+
- ``skip_size``: Bytes to skip at the start. Default: 0.
31+
32+
Additional information can be found `here <https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/app_trace.html?>`_.
33+
34+
.. image:: ../../../media/AppLvlTracing_4.png
35+
:alt: Application Level Tracing dialog
36+
37+
The next two fields, *Trace Processing Script* and *Start Parsing Command*, are used to parse the output file.
38+
39+
- **Trace Processing Script**: Path to the parsing script, which by default is ``logtrace_proc.py`` from esp-idf.
40+
- **Start Parsing Command**: Allows you to check and edit the parsing command if necessary. By default, it is configured as: ``$IDF_PATH/tools/esp_app_trace/logtrace_proc.py/path/to/trace/file/path/to/program/elf/file``.
41+
42+
The *Start parse* button is disabled until a dump file is generated. To generate it, click the *Start* button at the bottom of the dialog box. This button changes to *Stop* once tracing starts, allowing you to stop it.
43+
44+
When the output file is available, click *Start parse* to view the parsed script output in the Eclipse console:
45+
46+
.. image:: ../../../media/AppLvlTracing_5.png
47+
:alt: Parsed script output in Eclipse console
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,24 @@
11
ESP-IDF Application Size Analysis
22
===================================
3+
4+
The Application Size Analysis editor provides a way to analyze the static memory footprint of your application. It has two sections:
5+
6+
- The **Overview** section provides a summary of the application's memory usage;
7+
- The **Details** section includes in-depth details about components and per-symbol level memory information.
8+
9+
The **Details** table viewer also provides searching and sorting capabilities on various columns.
10+
11+
To launch the Application Size Analysis editor:
12+
13+
#. Right-click on the project.
14+
#. Select **ESP-IDF > Application Size Analysis** menu option to launch the editor.
15+
16+
**Application Size Analysis - Overview**
17+
18+
.. image:: ../../../media/sizeanalysis_overview.png
19+
:alt: Application Size Analysis - Overview
20+
21+
**Application Size Analysis - Details**
22+
23+
.. image:: ../../../media/sizeanalysis_details.png
24+
:alt: Application Size Analysis - Details
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.. _clangd_cdt_support:
2+
3+
Espressif-IDE LSP Support for C/C++ Editor
4+
==========================================
5+
6+
The Espressif-IDE 3.0.0 (and higher) now includes the `Eclipse CDT-LSP <https://github.com/eclipse-cdt/cdt-lsp/>`, enabling support for the latest C/C++ standards and providing an LSP-based C/C++ Editor. This editor, powered by the `LLVM <https://clangd.llvm.org/>` clangd C/C++ language server, offers advanced functionality for ESP-IDF developers.
7+
8+
In line with this enhancement, we've discontinued support for the standard CDT Editor/Indexer, as it only offers support for up to C++ 14. This has been replaced with a new LSP editor, especially considering that ESP-IDF now utilizes C++ 20 (with GCC 11.2) in v5.0.x, transitions to C++ 23 (with GCC 12.1) in v5.1, and to C++ 23 with GCC 13.1 in v5.2.
9+
10+
The LSP powered C/C++ editor greatly benefits ESP-IDF developers by aligning with the latest language standards and compiler versions, enhancing productivity, and improving code quality.
11+
12+
You can find more details on the LSP based C/C++ Editor features `here <https://github.com/eclipse-cdt/cdt-lsp/>`_.
13+
14+
Prerequisites
15+
-------------
16+
* You need to have Espressif-IDE 3.0.0 (and higher) to have access to the LSP powered C/C++ editor.
17+
* If you are updating Eclipse CDT or Espressif-IDE via the update site, you need to select the ESP-IDF Eclipse Plugin and its dependencies, as shown below:
18+
19+
.. image:: ../../../media/clangd/cdtlsp_updatesite.png
20+
21+
Clangd Configuration
22+
--------------------
23+
24+
By default, the esp-clang toolchain is installed as a part of the ESP-IDF tools installation process, and clangd **Path** is configured in the preferences.
25+
26+
The **Drivers** path and **--compile-commands-dir** path will be configured based on the selected target (esp32, esp32c6 etc.) and the project you're building.
27+
28+
However, if there are any issues in configuration, this can be configured in the following way:
29+
30+
1. Go to `Window` > `Preferences` > `C/C++` > `Editor(LSP)`
31+
2. Navigate to `clangd` node
32+
3. Provide `Drivers` path as shown in the screenshot.
33+
4. Set `--compile-commands-dir=/project/build` in the additional argument section.
34+
5. Click on `Apply and Close`.
35+
36+
.. image:: ../../../media/clangd/clangd_config.png
37+
38+
By default, when you create a new project, a `.clangd` configuration file is created with the following arguments.
39+
40+
However, if you are dealing with an existing project, please create a `.clangd` file at the root of the project and add the following content.
41+
42+
.. code-block:: yaml
43+
44+
CompileFlags:
45+
CompilationDatabase: build
46+
Remove: [-m*, -f*]
47+
48+
Disable CDT Indexer
49+
-------------------
50+
51+
With Espressif-IDE 3.0.0 (and higher), the CDT Indexer is disabled by default; instead, the LSP Indexer server will be used for code analysis.
52+
53+
If, for some reason, it is not disabled, please follow the steps below to disable it.
54+
55+
1. Go to `Window` > `Preferences` > `C/C++` > `Indexer`
56+
2. Uncheck `Enable Indexer` option and then click on `Apply and Close`.
57+
58+
.. image:: ../../../media/clangd/cdt_indexer_disable.png
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Configuring Clang Toolchain
2+
===========================
3+
4+
1. After creating a new project, edit the project configuration.
5+
6+
.. image:: https://user-images.githubusercontent.com/24419842/194882285-9faadb5d-0fe2-4012-bb6e-bc23dedbdbd2.png
7+
:alt: Project Configuration
8+
9+
2. Go to the ``Build Settings`` tab and select the clang toolchain:
10+
11+
.. image:: https://user-images.githubusercontent.com/24419842/194882462-3c0fd660-b223-4caf-964d-58224d91b518.png
12+
:alt: Clang Toolchain Selection
13+
14+
.. note::
15+
Clang toolchain is currently an experimental feature, and you may encounter build issues due to incompatibility with ESP-IDF. The following describes how to address the most common build issues on the current ESP-IDF master (ESP-IDF v5.1-dev-992-gaf28c1fa21-dirty). To work around clang build errors, please refer to `this workaround guide <https://github.com/espressif/idf-eclipse-plugin/blob/master/WORKAROUNDS.md#clang-toolchain-buid-errors>`_.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CMake Editor
2+
============
3+
4+
The CMake Editor Plug-in is integrated with the IDF Plugin for editing CMake files, such as ``CMakeLists.txt``. It provides syntax coloring, CMake command content assistance, and code templates.
5+
6+
.. image:: ../../../media/cmake_editor_ca.png
7+
:alt: CMake Editor with content assist
8+
9+
CMake editor preferences can be controlled using **Eclipse > Preferences > CMakeEd**.
10+
11+
.. image:: ../../../media/cmake_editor_preferences.png
12+
:alt: CMake editor preferences

0 commit comments

Comments
 (0)