Skip to content

Update doc: Arduino as IDF component; fixes #5833 #6299

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

Merged
merged 8 commits into from
Feb 23, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Finished formatting doc - arduino as idf component
  • Loading branch information
PilnyTomas committed Feb 17, 2022
commit f62b4717e995a52bd50f28ce6ba09ee163af6a7f
23 changes: 13 additions & 10 deletions docs/source/esp-idf_component.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@
Arduino as a ESP-IDF component
##############################

This method is recommended for advanced users. To use this method, you will need to have the ESP-IDF toolchain installed.

For a simplified method, see `Installing using Boards Manager <https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager>`_.

ESP32 Arduino lib-builder
-------------------------

For a simplified method, see `Installing using Boards Manager <https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager>`_.
If you don't need any modifications in the default Arduino ESP32 core, we recommend you to install using the Boards Manager.

To build your own Arduino core see `Arduino lib builder <https://github.com/espressif/esp32-arduino-lib-builder>`_
Arduino lib builder will allow you to build your own version of Arduino core for Arduino IDE.

To build your own Arduino core see `Arduino lib builder <https://github.com/espressif/esp32-arduino-lib-builder>`_
Copy link
Member

Choose a reason for hiding this comment

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

It does not build the Arduino core. It builds ESP-IDF and collects all necessary headers, libraries and bootloaders. Basically everything inside tools/sdk.

Copy link
Member

Choose a reason for hiding this comment

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

It is used when you need to have some specific ESP-IDF option that differs from what is already compiled in Arduino.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What should the line be?

Copy link
Member

Choose a reason for hiding this comment

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

Arduino Lib Builder is the tool that integrates ESP-IDF into Arduino. It allows you to customize the default settings used by Espressif and try them in Arduino IDE.


Installation
------------

.. note:: Latest Arduino Core ESP32 version is now compatible with `ESP-IDF v4.4 <https://github.com/espressif/esp-idf/tree/release/v4.4>`_. Please consider this compability when using Arduino as component in ESP-IDF.

- Download and install `ESP-IDF <https://github.com/espressif/esp-idf>`_.
#. Download and install `ESP-IDF <https://github.com/espressif/esp-idf>`_.

- For more information see `Installation step by step <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation-step-by-step>`_.
- Create blank ESP-IDF project (use sample_project from /examples/get-started) or choose one of the examples.
- In the project folder, create a new folder called `components` and clone this repository inside the new created folder.
* For more information see `Get Started <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#installation-step-by-step>`_.
#. Create blank ESP-IDF project (use sample_project from /examples/get-started) or choose one of the examples.
#. In the project folder, create a new folder called ``components`` and clone this repository inside the new created folder.

.. code-block:: bash

Expand All @@ -35,6 +40,7 @@ Configuration
-------------

Depending on one the two following options, in the menuconfig set the appropriate settings.

Go to section ``Arduino Configuration --->``

1. For usage of ``app_main()`` function - Turn off ``Autostart Arduino setup and loop on boot``
Expand All @@ -45,11 +51,8 @@ Experienced users can explore other options in the Arduino section.
After the setup you can save and exit:

- Save [S]

- Confirm default filename [Enter]

- Close confirmation window [Enter] or [Space] or [Esc]

- Quit [Q]

Option 1. Using Arduino setup() and loop()
Expand All @@ -59,7 +62,7 @@ Option 1. Using Arduino setup() and loop()

- In main folder open file `CMakeList.txt` and change `main.c` to `main.cpp` as described below.

- Your main.cpp should be formated like any other sketch.
- Your main.cpp should be formatted like any other sketch.

.. code-block:: c

Expand Down