-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1a96b11
Documentation update preview (esp idf component)
PilnyTomas a92758b
Deleted mention about HAL locks from doc
PilnyTomas f62b471
Finished formatting doc - arduino as idf component
PilnyTomas 4841cc7
Fixes in doc
PilnyTomas 2bff48b
Hopefully fixing note block
PilnyTomas d05a210
Spelling fixes
PilnyTomas dd10d6d
Merge branch 'espressif:master' into master
PilnyTomas 3adc544
Updated doc
PilnyTomas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Deleted mention about HAL locks from doc
- Loading branch information
commit a92758b8ef433516d6ae47731af9cf470c1d9626
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ 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>`_. | ||
|
||
To build your own Arduino core see `Arduino lib builder <https://github.com/espressif/esp32-arduino-lib-builder>`_ | ||
|
||
|
||
Installation | ||
------------ | ||
|
@@ -33,6 +35,13 @@ 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`` | ||
2. For usage of ``setup()`` and ``loop()`` functions - Turn on ``Autostart Arduino setup and loop on boot`` | ||
|
||
Experienced users can explore other options in the Arduino section. | ||
|
||
After the setup you can save and exit: | ||
|
||
- Save [S] | ||
|
@@ -46,12 +55,6 @@ After the setup you can save and exit: | |
Option 1. Using Arduino setup() and loop() | ||
****************************************** | ||
|
||
While in the menuconfig go to `Arduino Configuration --->` | ||
|
||
- Turn on ``Autostart Arduino setup and loop on boot`` | ||
- Turn off ``Disable mutex locks for HAL`` | ||
- Save and exit | ||
|
||
- In main folder rename file `main.c` to `main.cpp`. | ||
|
||
- In main folder open file `CMakeList.txt` and change `main.c` to `main.cpp` as described below. | ||
|
@@ -75,12 +78,6 @@ While in the menuconfig go to `Arduino Configuration --->` | |
Option 2. Using ESP-IDF appmain() | ||
********************************* | ||
|
||
While in the menuconfig go to `Arduino Configuration --->` | ||
|
||
- Turn off ``Autostart Arduino setup and loop on boot`` | ||
- Turn on ``Disable mutex locks for HAL`` | ||
- Save and exit | ||
|
||
In main.c or main cpp you need to implement ``app_main()`` and call ``initArduino();`` in it. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing . (period) between main and cpp. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for catching this. I will commit fix later if there is nothing else to be fixed. |
||
|
||
Keep in mind that setup() and loop() will not be called in this case. | ||
|
@@ -107,11 +104,6 @@ Furthermore the ``app_main()`` is single execution as normal function so if you | |
// WARNING: if program reaches end of function app_main() the MCU will restart. | ||
} | ||
|
||
- "Disable mutex locks for HAL" | ||
|
||
- If enabled, there will be no protection on the drivers from concurently accessing them from another thread/interrupt/core | ||
|
||
|
||
Build, flash and monitor | ||
************************ | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.