You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ The ESP-IDF master branch is marked as not supported because the major feature c
30
30
End of Life IDF branches are removed. See [IDF Supported Periods](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html#support-periods) for details.
Copy file name to clipboardExpand all lines: docs/en/get-started/index.rst
+25-94Lines changed: 25 additions & 94 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ To use ESP-ADF you need set up the ESP-IDF first, and this is described in the n
30
30
31
31
.. note::
32
32
33
-
ESP-ADF provides support for specific `ESP-IDF versions (v3.3, v4.0, v4.1, v4.2, v4.3 and v4.4) <https://docs.espressif.com/projects/esp-idf/en/release-v3.3/versions.html>`_. If your have already set up another version, please switch to a supported ESP-IDF version, or you may not be able to compile ESP-ADF applications.
33
+
ESP-ADF provides support for specific `ESP-IDF versions <https://github.com/espressif/esp-adf/blob/master/README.md#idf-version>`_. If your have already set up another version, please switch to a supported ESP-IDF version, or you may not be able to compile ESP-ADF applications. In addition, the python version needs to be between 3.7 and 3.11.
34
34
35
35
.. _get-started-quick-start:
36
36
@@ -56,18 +56,13 @@ The operating environment below is on Linux Ubuntu 18.04 and above.
2. Configure the ``$ESP-IDF`` and ``$ESP-ADF`` compilation environment by running::
60
60
61
61
cd esp-adf
62
-
export ADF_PATH=$PWD
63
-
64
-
3. Configure the ``$ESP-IDF`` compilation environment by running::
65
-
66
-
cd $ADF_PATH/esp-idf
67
62
./install.sh
68
63
. ./export.sh
69
64
70
-
4. After completing the above environment variable configuration, you can compile the ADF sample project ``$ADF_PATH/examples/get-started/play_mp3_control``. Switch to the project's directory, compile, and flash it onto your ESP device by running the following command. Then, you will see the serial port of the routine is printed.
65
+
3. After completing the above environment variable configuration, you can compile the ADF sample project ``$ADF_PATH/examples/get-started/play_mp3_control``. Switch to the project's directory, compile, and flash it onto your ESP device by running the following command. Then, you will see the serial port of the routine is printed.
2. Download the full ESP-IDF Windows Installer from `ESP-IDF Windows Installer <https://dl.espressif.com/dl/esp-idf/?idf=4.4>`_.
85
+
2. Install the ``$ESP-IDF`` compilation environment in the command prompt window::
91
86
87
+
cd esp-adf
88
+
.\install.bat
92
89
93
-
3. Turn off the antivirus software (because it may prevent the installation as the software writes the Windows system regedit) and install the downloaded file. After the installation is complete, open the ESP-IDF-V4.4 CMD shortcut icon on the desktop, the script will automatically help you download submodules, and set environment variables such as ``IDF_PATH``.
90
+
Or first download the full ESP-IDF Windows Installer from `ESP-IDF Windows Installer <https://dl.espressif.com/dl/esp-idf>`_ (Please download the `ESP-IDF versions <https://github.com/espressif/esp-adf/blob/master/README.md#idf-version>`_ supported by ESP-ADF). And then turn off the antivirus software (Because it may prevent the installation as the software writes the Windows system regedit) and install the downloaded file. After the installation is complete, open the ESP-IDF CMD shortcut icon on the desktop, the script will automatically help you download submodules, and set environment variables such as ``IDF_PATH``.
94
91
95
92
96
-
4. Set the ``$ESP-ADF`` path by running the following commands. Note that ``%userprofile%\esp`` is used as an installation folder for ESP-ADF. You can use any directory, but you will need to adjust paths for the commands accordingly.
93
+
3. Set the ``ADF_PATH`` by running the following commands::
97
94
98
-
set ADF_PATH=%userprofile%\esp\esp-adf
95
+
.\export.bat
99
96
echo %ADF_PATH%
100
97
101
98
102
-
5. If your ``ADF_PATH`` variable prints correctly, it's time to compile the ADF routines::
99
+
4. If your ``ADF_PATH`` variable prints correctly, it's time to compile the ADF routines::
103
100
104
101
cd %ADF_PATH%\examples\get-started\play_mp3_control
105
102
idf.py build flash monitor
@@ -117,7 +114,6 @@ Setting up Development Environment
117
114
118
115
* :ref:`get-started-setup-esp-idf` for Windows, Linux or Mac OS
119
116
* :ref:`get-started-get-esp-adf`
120
-
* :ref:`get-started-setup-path`
121
117
* :ref:`get-started-set-up-env`
122
118
123
119
Creating Your First Project
@@ -177,48 +173,12 @@ Open Terminal, and run the following commands::
The toolchain programs access ESP-ADF using ``ADF_PATH`` environment variable. This variable should be set up on your PC, otherwise the projects will not build.
186
-
187
-
Windows
188
-
~~~~~~~
189
-
190
-
Open Command Prompt and run the following command::
191
-
192
-
set ADF_PATH=%userprofile%\esp\esp-adf
193
-
194
-
You need to enter this command each time you start your PC. To avoid retyping you can add it to "ESP-IDF Command Prompt", batch or Power Shell scripts described in Step 4 below.
195
-
196
-
To make sure that ADF_PATH has been set up properly, run::
197
-
198
-
echo %ADF_PATH%
199
-
200
-
It should return the path to your ESP-ADF directory.
201
-
202
-
Linux and macOS
203
-
~~~~~~~~~~~~~~~
204
-
205
-
Open Terminal, and run the following commands::
206
-
207
-
export ADF_PATH=~/esp/esp-adf
208
-
209
-
You need to enter this command each time you open a Terminal. To make this setting permanent follow similar `instructions <https://docs.espressif.com/projects/esp-idf/en/v3.3.1/get-started/add-idf_path-to-profile.html#linux-and-macos>`__ for configuration of ``IDF_PATH`` in ESP-IDF Programming Guide.
210
-
211
-
Check if ``ADF_PATH`` has been set up to point to directory with ESP-ADF::
212
-
213
-
printenv ADF_PATH
214
-
215
-
216
176
.. _get-started-set-up-env:
217
177
218
-
Step 4. Set up the environment variables
178
+
Step 3. Set up the environment
219
179
========================================
220
180
221
-
Before being able to compile ESP-ADF projects, on each new session, ESP-IDF tools should be added to the PATH environment variable. To make the tools usable from the command line, some environment variables must be set. ESP-IDF provides a script which does that.
181
+
Before being able to compile ESP-ADF projects, on each new session, ESP-IDF tools should be added to the PATH environment variable. To make the tools usable from the command line, some environment variables must be set. ESP-ADF provides a script which does that.
222
182
223
183
Windows
224
184
~~~~~~~
@@ -229,13 +189,7 @@ Alternatively, if you want to use ESP-IDF in an existing Command Prompt window,
229
189
230
190
.. code-block:: batch
231
191
232
-
%userprofile%\esp\esp-idf\export.bat
233
-
234
-
or with Windows PowerShell
235
-
236
-
.. code-block:: powershell
237
-
238
-
.$HOME/esp/esp-idf/export.ps1
192
+
%userprofile%\esp\esp-adf\export.bat
239
193
240
194
Linux and macOS
241
195
~~~~~~~~~~~~~~~
@@ -244,22 +198,22 @@ In the terminal where you have installed ESP-IDF, run:
244
198
245
199
.. code-block:: bash
246
200
247
-
.$HOME/esp/esp-idf/export.sh
201
+
.$HOME/esp/esp-adf/export.sh
248
202
249
203
Note the space between the leading dot and the path!
250
204
251
205
You can also create an alias for the export script to your ``.profile`` or ``.bash_profile`` script. This way you can set up the environment in a new terminal window by typing ``get_idf``:
252
206
253
207
.. code-block:: bash
254
208
255
-
alias get_idf='. $HOME/esp/esp-idf/export.sh'
209
+
alias get_idf='. $HOME/esp/esp-adf/export.sh'
256
210
257
211
Note that it is not recommended to source ``export.sh`` from the profile script directly. Doing so activates IDF virtual environment in every terminal session (even in those where IDF is not needed), defeating the purpose of the virtual environment and likely affecting other software.
258
212
259
213
260
214
.. _get-started-start-project:
261
215
262
-
Step 5. Start a Project
216
+
Step 4. Start a Project
263
217
=======================
264
218
265
219
After initial preparation you are ready to build the first audio application. The process has already been described in ESP-IDF documentation. Now we would like to discuss remaining key steps and show how the toolchain is able to access the ESP-ADF :adf:`components` by using the ``ADF_PATH`` variable.
@@ -294,7 +248,7 @@ It is also possible to build examples in-place, without copying them first.
294
248
295
249
.. _get-started-connect:
296
250
297
-
Step 6. Connect Your Device
251
+
Step 5. Connect Your Device
298
252
===========================
299
253
300
254
Connect the audio board to the PC, check under what serial port the board is visible and verify, if serial communication works as described in `ESP-IDF documentation <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/establish-serial-connection.html>`_.
@@ -306,36 +260,13 @@ Connect the audio board to the PC, check under what serial port the board is vis
306
260
307
261
.. _get-started-configure:
308
262
309
-
Step 7. Configure
263
+
Step 6. Configure
310
264
=================
311
265
312
266
Navigate to your ``play_mp3_control`` directory from :ref:`get-started-start-project` and configure the project:
313
267
314
-
ESP-IDF v3.3.2 and v4.0 releases
315
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
316
-
317
-
Windows
318
-
^^^^^^^
319
-
320
-
.. code-block:: batch
321
-
322
-
cd%userprofile%\esp\play_mp3_control
323
-
idf.py menuconfig
324
-
325
-
Linux and macOS
326
-
^^^^^^^^^^^^^^^
327
-
328
-
.. code-block:: bash
329
-
330
-
cd~/esp/play_mp3_control
331
-
idf.py menuconfig
332
-
333
-
334
-
ESP-IDF v4.1 and master releases
335
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
336
-
337
268
Windows
338
-
^^^^^^^
269
+
~~~~~~~
339
270
340
271
.. code-block:: batch
341
272
@@ -344,7 +275,7 @@ Windows
344
275
idf.py menuconfig
345
276
346
277
Linux and macOS
347
-
^^^^^^^^^^^^^^^
278
+
~~~~~~~~~~~~~~~
348
279
349
280
.. code-block:: bash
350
281
@@ -354,7 +285,7 @@ Linux and macOS
354
285
355
286
.. note::
356
287
357
-
If you are using an ESP32-S2 based board, then the second command above should be ``idf.py set-target esp32s2`` for ESP-IDF master release or ``idf.py set-target esp32s2beta`` for ESP-IDF v4.1 release.
288
+
If you are using an ESP32-S2 based board, then the second command above should be ``idf.py set-target esp32s2``.
358
289
359
290
Setting the target with ``idf.py set-target <target>`` should be done once, after opening a new project. If the project contains some existing builds and configuration, they will be cleared and initialized. The target may be saved in environment variable to skip this step at all. See `Selecting the Target <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#step-7-configure>`__ in ESP-IDF Programming Guide for additional information.
360
291
@@ -385,7 +316,7 @@ Select your board from the menu, press ``S`` to save configuration and then ``Q`
385
316
386
317
.. _get-started-build:
387
318
388
-
Step 8. Build the Project
319
+
Step 7. Build the Project
389
320
=========================
390
321
391
322
Build the project by running:
@@ -419,7 +350,7 @@ If there are no errors, the build will finish by generating the firmware binary
419
350
420
351
.. _get-started-flash:
421
352
422
-
Step 9. Flash onto the Device
353
+
Step 8. Flash onto the Device
423
354
=============================
424
355
425
356
Flash the binaries that you just built onto your board by running:
@@ -467,7 +398,7 @@ If there are no issues by the end of the flash process, the board will reboot an
467
398
468
399
.. _get-started-build-monitor:
469
400
470
-
Step 10. Monitor
401
+
Step 9. Monitor
471
402
================
472
403
473
404
At this point press the **Reset** button to start the application. Following several lines of start up log, the ``play_mp3_control`` application specific messages should be displayed::
@@ -538,7 +469,7 @@ Install and Set up Environment Variables
538
469
539
470
2. To install ESP-ADF, follow section :ref:`get-started-get-esp-adf`.
540
471
541
-
3. 3. To set ``ADF_PATH`` environment variable, open ``Window`` > ``Preferences`` > ``C/C++`` > ``Build`` > ``Environment`` panel, click **Add** button and fill in ``ADF_PATH``. After you complete the above steps, select ``ADF_PATH`` in ``Environment variables`` table and click **Edit** and **OK** button without changing any value (There is a bug in Eclipse CDT that is appending a null value before the path hence we need to click on edit and save it.).
472
+
3. To set ``ADF_PATH`` environment variable, open ``Window`` > ``Preferences`` > ``C/C++`` > ``Build`` > ``Environment`` panel, click **Add** button and fill in ``ADF_PATH``. After you complete the above steps, select ``ADF_PATH`` in ``Environment variables`` table and click **Edit** and **OK** button without changing any value (There is a bug in Eclipse CDT that is appending a null value before the path hence we need to click on edit and save it.).
542
473
543
474
If this step does not work, you can delete ``ADF_PATH`` set in Eclipse and set ``ADF_PATH`` as system environment variable. For Windows, set environment variable in ``Advanced System Setting`` panel. For Linux and macOS, add ``export ADF_PATH=your adf path`` in file ``/etc/profile``. However, it is not recommended. Doing so activates ADF virtual environment in every terminal session (including those where ADF is not needed), defeating the purpose of the virtual environment and likely affecting other software.
0 commit comments