This repository was archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
esp32/README: Update toolchain setup. #238
Closed
Closed
Changes from all commits
Commits
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
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
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 |
|---|---|---|
|
|
@@ -26,34 +26,28 @@ There are two main components that are needed to build the firmware: | |
| different to the compiler used by the ESP8266) | ||
| - the Espressif IDF (IoT development framework, aka SDK) | ||
|
|
||
| Instructions for setting up both of these components are provided by the | ||
| ESP-IDF itself, which is found at https://github.com/espressif/esp-idf . | ||
| Follow the guide "Setting Up ESP-IDF", for Windows, Mac or Linux. You | ||
| only need to perform up to "Step 2" of the guide, by which stage you | ||
| should have installed the cross-compile and cloned the ESP-IDF repository. | ||
| The ESP-IDF changes quickly and MicroPython only supports a certain version. The | ||
| git hash of this version can be found by running `make` without a configured | ||
| `ESPIDF`. Then you can fetch only the given esp-idf using the following command: | ||
|
|
||
| $ git clone https://github.com/espressif/esp-idf.git | ||
| $ git checkout <Current supported ESP-IDF commit hash> | ||
| $ git submodule update --recursive | ||
|
|
||
| The binary toolchain (binutils, gcc, etc.) can be installed using the following | ||
| guides: | ||
|
|
||
| * [Linux installation](https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup-scratch.html) | ||
| * [MacOS installation](https://esp-idf.readthedocs.io/en/latest/get-started/macos-setup-scratch.html) | ||
| * [Windows installation](https://esp-idf.readthedocs.io/en/latest/get-started/windows-setup-scratch.html) | ||
|
|
||
| If you are on a Windows machine then the | ||
| [Windows Subsystem for Linux](https://msdn.microsoft.com/en-au/commandline/wsl/install_guide) | ||
| is the most efficient way to install the ESP32 toolchain and build the project. | ||
| If you use WSL then follow the | ||
| [Linux guidelines](http://esp-idf.readthedocs.io/en/latest/get-started/linux-setup.html) | ||
| [Linux guidelines](https://esp-idf.readthedocs.io/en/latest/get-started/linux-setup-scratch.html) | ||
|
Member
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. Remove scratch. |
||
| for the ESP-IDF instead of the Windows ones. | ||
|
|
||
| Be advised that the ESP-IDF is still undergoing changes and only some | ||
| versions are supported. To find which build is compatible refer to the line | ||
| in the makefile containing the following: | ||
| ``` | ||
| ESPIDF_SUPHASH := <Current supported ESP-IDF commit hash> | ||
| ``` | ||
| After finishing "Step 2" you can roll back your current build of | ||
| the ESP-IDF (and update the submodules accordingly) using: | ||
| ``` | ||
| $ git checkout <Current supported ESP-IDF commit hash> | ||
| $ git submodule update --recursive | ||
| ``` | ||
| Note that you will get a warning when building the code if the ESP-IDF | ||
| version is incorrect. | ||
|
|
||
| The Espressif ESP-IDF instructions above only install pyserial for Python 2, | ||
| so if you're running Python 3 or a non-system Python you'll also need to | ||
| install `pyserial` (or `esptool`) so that the Makefile can flash the board | ||
|
|
@@ -64,7 +58,13 @@ $ pip install pyserial | |
|
|
||
| Once everything is set up you should have a functioning toolchain with | ||
| prefix xtensa-esp32-elf- (or otherwise if you configured it differently) | ||
| as well as a copy of the ESP-IDF repository. | ||
| as well as a copy of the ESP-IDF repository. You will need to update your `PATH` | ||
| environment variable to include the ESP32 toolchain. For example, you can issue | ||
| the following commands on (at least) Linux: | ||
|
|
||
| $ export PATH=$PATH:$HOME/esp/crosstool-NG/builds/xtensa-esp32-elf/bin | ||
|
|
||
| You cam put this command in your `.profile` or `.bash_login`. | ||
|
|
||
| You then need to set the `ESPIDF` environment/makefile variable to point to | ||
| the root of the ESP-IDF repository. You can set the variable in your PATH, | ||
|
|
||
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.
Since it's ok to use the precompiled binaries, please remove the
-scratchpart of the URL.