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
build: support user-provided esp-idf and activated environment (#42)
Allows the user to specify their own esp-idf and makes it possible to use an activated esp-idf environment. For the pio builder, allows re-using an already available `platformio` from $PATH.
For the native builder:
- If an activated esp-idf is available and $ESP_IDF_TOOLS_INSTALL_DIR == "fromenv" or unset, use it.
- If $IDF_PATH is valid, use it as a user-provided esp-idf repository (but installer manages tools).
- Otherwise, the installer manages everything and respects $ESP_IDF_REPOSITORY and $ESP_IDF_VERSION.
For the pio builder:
- If the `platformio` executable is in $PATH and $ESP_IDF_TOOLS_INSTALL_DIR == "fromenv" or unset, use it.
- Otherwise, the installer manages platformio as before.
* Preconfigured env and custom esp-idf support
* Fix cargo fmt
* Improve logging
* Implement pio, update README
* Fix cargo fmt
* Upgrade embuild and strum
* Fix typos in README
Co-authored-by: N3xed <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+25-12Lines changed: 25 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,27 +106,40 @@ The following environment variables are used by the build script:
106
106
107
107
-`ESP_IDF_TOOLS_INSTALL_DIR`:
108
108
109
-
The location where the ESP-IDF framework tooling is assumed to be/will be installed.
110
-
The framework tooling is either PlatformIO (when the `pio` builder is used), or the ESP-IDF native toolset (when the `native` builder is used).
109
+
The location where the ESP-IDF framework tooling is assumed to be/will be installed. The
110
+
framework tooling is either PlatformIO (when the `pio` builder is used), or the ESP-IDF
111
+
native toolset (when the `native` builder is used).
111
112
112
-
This variable can take one of the following values:
113
+
This variable can take one of the following values:
113
114
-`workspace` (default) - the tooling will be installed/used in
114
115
`<crate-workspace-dir>/.embuild/platformio` for `pio`, and `<crate-workspace-dir>/.embuild/espressif` for the `native` builder;
115
116
-`out` - the tooling will be installed/used inside the crate's build output directory, and will be deleted when `cargo clean` is invoked;
116
117
-`global` - the tooling will be installed/used in its standard directory (`~/.platformio` for PlatformIO, and `~./espressif` for the native ESP-IDF toolset);
117
118
-`custom:<dir>` - the tooling will be installed/used in the directory specified by `<dir>`. If this directory is a relative location, it is assumed to be
118
-
relative to the crate's workspace dir.
119
-
120
-
**ATTENTION**: Please be extra careful with the `custom:<dir>` setting when switching from `pio` to `native` and the other way around, because
121
-
the builder will install the tooling in `<dir>` without using any additional `platformio` or `espressif` subdirectories, so if you are not careful, you might end up with
122
-
both PlatformIO, as well as the ESP-IDF native tooling intermingled together in a single folder.
123
-
124
-
125
-
Note that both builders (`native` and `pio`) clone the ESP-IDF GIT repository *inside* the tooling directory as well. This restriction might be lifted soon for the `native` builder, whereas the user would be able to point the build to a custom ESP-IDF repository location.
119
+
relative to the crate's workspace dir;
120
+
-`fromenv` - use the build framework from the environment
121
+
-*native* builder: use activated esp-idf environment (see esp-idf docs
-*pio* builder: use `platformio` from the environment (i.e. `$PATH`)
126
+
127
+
and error if this is not possible.
128
+
129
+
**ATTENTION**: Please be extra careful with the `custom:<dir>` setting when switching from `pio` to `native` and the other way around, because
130
+
the builder will install the tooling in `<dir>` without using any additional `platformio` or `espressif` subdirectories, so if you are not careful, you might end up with
131
+
both PlatformIO, as well as the ESP-IDF native tooling intermingled together in a single folder.
132
+
133
+
134
+
Note that both builders (`native` and `pio`) clone the ESP-IDF GIT repository *inside* the tooling directory as well. This restriction might be lifted soon for the `native` builder, whereas the user would be able to point the build to a custom ESP-IDF repository location.
135
+
136
+
-`IDF_PATH` (*native* builder only):
137
+
A path to a user-provided local clone of the [`esp-idf`](https://github.com/espressif/esp-idf),
138
+
that will be used instead of the one downloaded by the build script.
126
139
127
140
-`ESP_IDF_VERSION` (*native* builder only):
128
141
129
-
The version used for the `esp-idf` can be one of the following:
142
+
The version used for the `esp-idf`, can be one of the following:
130
143
-`commit:<hash>`: Uses the commit `<hash>` of the `esp-idf` repository.
131
144
Note that this will clone the whole `esp-idf` not just one commit.
132
145
-`tag:<tag>`: Uses the tag `<tag>` of the `esp-idf` repository.
0 commit comments