idf-build-apps 2.4.2__tar.gz → 2.5.0rc0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/check-pre-commit.yml +1 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/test-build-docs.yml +2 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/test-build-idf-apps.yml +8 -5
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.gitignore +2 -2
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.pre-commit-config.yaml +13 -5
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.readthedocs.yml +0 -3
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/CHANGELOG.md +27 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/CONTRIBUTING.md +2 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/PKG-INFO +3 -4
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/README.md +1 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_static/theme_overrides.css +4 -0
- idf_build_apps-2.5.0rc0/docs/conf_common.py +91 -0
- idf_build_apps-2.5.0rc0/docs/en/conf.py +13 -0
- idf_build_apps-2.5.0rc0/docs/en/explanations/build.rst +90 -0
- idf_build_apps-2.5.0rc0/docs/en/explanations/config_rules.rst +203 -0
- idf_build_apps-2.5.0rc0/docs/en/explanations/dependency_driven_build.rst +116 -0
- idf_build_apps-2.5.0rc0/docs/en/explanations/find.rst +159 -0
- idf_build_apps-2.5.0rc0/docs/en/index.rst +36 -0
- idf_build_apps-2.5.0rc0/docs/en/others/CHANGELOG.md +2 -0
- idf_build_apps-2.5.0rc0/docs/en/others/CONTRIBUTING.md +2 -0
- idf_build_apps-2.5.0rc0/docs/en/references/cli.rst +11 -0
- {idf_build_apps-2.4.2/docs → idf_build_apps-2.5.0rc0/docs/en/references}/config_file.md +1 -1
- {idf_build_apps-2.4.2/docs → idf_build_apps-2.5.0rc0/docs/en/references}/manifest.md +1 -61
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/__init__.py +1 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/app.py +35 -27
- idf_build_apps-2.5.0rc0/idf_build_apps/args.py +965 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/config.py +19 -2
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/constants.py +17 -28
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/finder.py +34 -54
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/log.py +2 -0
- idf_build_apps-2.5.0rc0/idf_build_apps/main.py +439 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/manifest/manifest.py +112 -24
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/utils.py +22 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/pyproject.toml +4 -7
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/setup.py +2 -3
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/conftest.py +15 -1
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/test_app.py +1 -10
- idf_build_apps-2.5.0rc0/tests/test_args.py +66 -0
- idf_build_apps-2.5.0rc0/tests/test_cmd.py +73 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/test_finder.py +53 -10
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/test_manifest.py +78 -43
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/test_utils.py +15 -1
- idf_build_apps-2.4.2/docs/CHANGELOG.md +0 -2
- idf_build_apps-2.4.2/docs/CONTRIBUTING.md +0 -2
- idf_build_apps-2.4.2/docs/cli.rst +0 -6
- idf_build_apps-2.4.2/docs/conf.py +0 -68
- idf_build_apps-2.4.2/docs/find_build.md +0 -349
- idf_build_apps-2.4.2/docs/index.rst +0 -22
- idf_build_apps-2.4.2/idf_build_apps/build_apps_args.py +0 -64
- idf_build_apps-2.4.2/idf_build_apps/main.py +0 -947
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.editorconfig +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.git-blame-ignore-revs +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.gitattributes +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/dependabot.yml +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/issue_comment.yml +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/new_issues.yml +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/new_prs.yml +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/.github/workflows/publish-pypi.yml +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/LICENSE +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_apidoc_templates/module.rst_t +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_apidoc_templates/package.rst_t +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_apidoc_templates/toc.rst_t +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_static/espressif-logo.svg +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/docs/_templates/layout.html +0 -0
- {idf_build_apps-2.4.2/docs → idf_build_apps-2.5.0rc0/docs/en}/Makefile +0 -0
- {idf_build_apps-2.4.2/docs/migration → idf_build_apps-2.5.0rc0/docs/en/guides}/1.x_to_2.x.md +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/__main__.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/autocompletions.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/junit/__init__.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/junit/report.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/junit/utils.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/manifest/__init__.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/manifest/if_parser.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/manifest/soc_header.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/session_args.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/yaml/__init__.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/idf_build_apps/yaml/parser.py +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/license_header.txt +0 -0
- {idf_build_apps-2.4.2 → idf_build_apps-2.5.0rc0}/tests/test_build.py +0 -0
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
fetch-depth: 0
|
|
13
13
|
- uses: actions/setup-python@v5
|
|
14
14
|
- id: changed-files
|
|
15
|
-
uses: tj-actions/changed-files@
|
|
15
|
+
uses: tj-actions/changed-files@v45
|
|
16
16
|
- uses: pre-commit/action@v3.0.1
|
|
17
17
|
with:
|
|
18
18
|
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}
|
|
@@ -34,11 +34,11 @@ jobs:
|
|
|
34
34
|
path: dist/idf_build_apps-*.whl
|
|
35
35
|
|
|
36
36
|
build-apps-on-idf-env:
|
|
37
|
-
if: ${{ github.ref == 'refs/heads/main' }}
|
|
37
|
+
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test-old-idf-releases') }}
|
|
38
38
|
needs: build-python-packages
|
|
39
39
|
strategy:
|
|
40
40
|
matrix:
|
|
41
|
-
idf-branch: [ release-v5.0, release-v5.1, release-v5.2 ]
|
|
41
|
+
idf-branch: [ release-v5.0, release-v5.1, release-v5.2, release-v5.3 ]
|
|
42
42
|
runs-on: ubuntu-latest
|
|
43
43
|
container:
|
|
44
44
|
image: espressif/idf:${{ matrix.idf-branch }}
|
|
@@ -52,9 +52,12 @@ jobs:
|
|
|
52
52
|
bash $IDF_PATH/install.sh
|
|
53
53
|
. $IDF_PATH/export.sh
|
|
54
54
|
pip install idf_build_apps-*.whl
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
cd $IDF_PATH/examples/get-started/hello_world
|
|
56
|
+
echo 'CONFIG_IDF_TARGET="esp32"' >sdkconfig.defaults
|
|
57
|
+
idf-build-apps build --build-dir build_@t --size-file size_info.json
|
|
58
|
+
test -f build_esp32/hello_world.bin
|
|
59
|
+
test -f build_esp32/size_info.json
|
|
60
|
+
test ! -f build_esp32s2/hello_world.bin
|
|
58
61
|
|
|
59
62
|
build-apps-on-idf-master:
|
|
60
63
|
runs-on: ubuntu-latest
|
|
@@ -16,23 +16,31 @@ repos:
|
|
|
16
16
|
- license_header.txt # defaults to: LICENSE.txt
|
|
17
17
|
- --use-current-year
|
|
18
18
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
19
|
-
rev: 'v0.
|
|
19
|
+
rev: 'v0.6.2'
|
|
20
20
|
hooks:
|
|
21
21
|
- id: ruff
|
|
22
22
|
args: ['--fix']
|
|
23
23
|
- id: ruff-format
|
|
24
24
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
-
rev: 'v1.
|
|
25
|
+
rev: 'v1.11.2'
|
|
26
26
|
hooks:
|
|
27
27
|
- id: mypy
|
|
28
28
|
args: ['--warn-unused-ignores']
|
|
29
29
|
additional_dependencies:
|
|
30
|
-
- pydantic
|
|
30
|
+
- pydantic
|
|
31
31
|
- packaging
|
|
32
32
|
- toml
|
|
33
33
|
- pyparsing
|
|
34
34
|
- types-PyYAML
|
|
35
35
|
- types-toml
|
|
36
|
-
- pytest
|
|
36
|
+
- pytest
|
|
37
37
|
- argcomplete>=3
|
|
38
|
-
|
|
38
|
+
- repo: https://github.com/hfudev/rstfmt
|
|
39
|
+
rev: v0.1.4
|
|
40
|
+
hooks:
|
|
41
|
+
- id: rstfmt
|
|
42
|
+
args: ['-w', '-1']
|
|
43
|
+
files: "docs\/.+rst$"
|
|
44
|
+
additional_dependencies:
|
|
45
|
+
- sphinx-argparse
|
|
46
|
+
- sphinxcontrib-mermaid
|
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## v2.5.0rc0 (2024-09-10)
|
|
6
|
+
|
|
7
|
+
### Feat
|
|
8
|
+
|
|
9
|
+
- support `idf-build-apps find` with checking modified manfiest files
|
|
10
|
+
- support `idf-build-apps dump-manifest-sha`
|
|
11
|
+
|
|
12
|
+
### Fix
|
|
13
|
+
|
|
14
|
+
- loose env var requirements. IDF_PATH not required
|
|
15
|
+
- stop print build log as error when build with warning-as-error
|
|
16
|
+
- requires typing-extensions below 3.11
|
|
17
|
+
- temp build log got wrongly created/deleted
|
|
18
|
+
|
|
19
|
+
### Refactor
|
|
20
|
+
|
|
21
|
+
- declare argument once. used in both function, cli, and docs
|
|
22
|
+
- move Manifest.ROOTPATH to params
|
|
23
|
+
|
|
24
|
+
## v2.4.3 (2024-08-07)
|
|
25
|
+
|
|
26
|
+
### Feat
|
|
27
|
+
|
|
28
|
+
- set default building target to "all" if `--target` is not specified
|
|
29
|
+
- set default paths to current directory if `--paths` is not specified
|
|
30
|
+
|
|
5
31
|
## v2.4.2 (2024-08-01)
|
|
6
32
|
|
|
7
33
|
### Feat
|
|
@@ -127,7 +153,7 @@ All notable changes to this project will be documented in this file.
|
|
|
127
153
|
|
|
128
154
|
### BREAKING CHANGES
|
|
129
155
|
|
|
130
|
-
2.x introduces a lot of breaking changes. For a detailed migration guide, please refer to our [Migration From 1.x to 2.x Guide](https://
|
|
156
|
+
2.x introduces a lot of breaking changes. For a detailed migration guide, please refer to our [Migration From 1.x to 2.x Guide](https://docs.espressif.com/projects/idf-build-apps/en/latest/guides/1.x_to_2.x.html)
|
|
131
157
|
|
|
132
158
|
Here are the breaking changes:
|
|
133
159
|
|
|
@@ -15,7 +15,8 @@ Here's a table shows the supported ESP-IDF versions and the corresponding Python
|
|
|
15
15
|
| 5.0 | 3.7+ | main (2.x) |
|
|
16
16
|
| 5.1 | 3.7+ | main (2.x) |
|
|
17
17
|
| 5.2 | 3.7+ | main (2.x) |
|
|
18
|
-
|
|
|
18
|
+
| 5.3 | 3.8+ | main (2.x) |
|
|
19
|
+
| master (5.4) | 3.8+ | main (2.x) |
|
|
19
20
|
|
|
20
21
|
`idf-build-apps` is following the semantic versioning. The major version of `idf-build-apps` is the same as the ESP-IDF version it supports. For example, `idf-build-apps` 1.x supports ESP-IDF 4.x, and `idf-build-apps` 2.x supports ESP-IDF 5.x.
|
|
21
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: idf-build-apps
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0rc0
|
|
4
4
|
Summary: Tools for building ESP-IDF related apps.
|
|
5
5
|
Author-email: Fu Hanxi <fuhanxi@espressif.com>
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -19,7 +19,7 @@ Requires-Dist: packaging
|
|
|
19
19
|
Requires-Dist: toml; python_version < '3.11'
|
|
20
20
|
Requires-Dist: pydantic~=2.0
|
|
21
21
|
Requires-Dist: argcomplete>=3
|
|
22
|
-
Requires-Dist: typing-extensions
|
|
22
|
+
Requires-Dist: typing-extensions; python_version < '3.11'
|
|
23
23
|
Requires-Dist: sphinx ; extra == "doc"
|
|
24
24
|
Requires-Dist: sphinx-rtd-theme ; extra == "doc"
|
|
25
25
|
Requires-Dist: sphinx_copybutton ; extra == "doc"
|
|
@@ -32,7 +32,6 @@ Project-URL: changelog, https://github.com/espressif/idf-build-apps/blob/master/
|
|
|
32
32
|
Project-URL: documentation, https://docs.espressif.com/projects/idf-build-apps
|
|
33
33
|
Project-URL: homepage, https://github.com/espressif/idf-build-apps
|
|
34
34
|
Project-URL: repository, https://github.com/espressif/idf-build-apps
|
|
35
|
-
Provides-Extra: dev
|
|
36
35
|
Provides-Extra: doc
|
|
37
36
|
Provides-Extra: test
|
|
38
37
|
|
|
@@ -113,5 +112,5 @@ Thanks for your contribution! Please refer to our [Contributing Guide](CONTRIBUT
|
|
|
113
112
|
[hello-world]: https://github.com/espressif/esp-idf/tree/master/examples/get-started/hello_world
|
|
114
113
|
[supported-targets]: https://github.com/espressif/esp-idf/tree/v5.0#esp-idf-release-and-soc-compatibility
|
|
115
114
|
[doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/
|
|
116
|
-
[api-doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/api/modules.html
|
|
115
|
+
[api-doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/references/api/modules.html
|
|
117
116
|
|
|
@@ -75,4 +75,4 @@ Thanks for your contribution! Please refer to our [Contributing Guide](CONTRIBUT
|
|
|
75
75
|
[hello-world]: https://github.com/espressif/esp-idf/tree/master/examples/get-started/hello_world
|
|
76
76
|
[supported-targets]: https://github.com/espressif/esp-idf/tree/v5.0#esp-idf-release-and-soc-compatibility
|
|
77
77
|
[doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/
|
|
78
|
-
[api-doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/api/modules.html
|
|
78
|
+
[api-doc]: https://docs.espressif.com/projects/idf-build-apps/en/latest/references/api/modules.html
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import shutil
|
|
6
|
+
import subprocess
|
|
7
|
+
|
|
8
|
+
# Configuration file for the Sphinx documentation builder.
|
|
9
|
+
#
|
|
10
|
+
# For the full list of built-in configuration values, see the documentation:
|
|
11
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
12
|
+
from datetime import datetime
|
|
13
|
+
|
|
14
|
+
# -- Project information -----------------------------------------------------
|
|
15
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
16
|
+
|
|
17
|
+
project = 'idf-build-apps'
|
|
18
|
+
project_homepage = 'https://github.com/espressif/idf-build-apps'
|
|
19
|
+
copyright = f'2023-{datetime.now().year}, Espressif Systems (Shanghai) Co., Ltd.' # noqa: A001
|
|
20
|
+
author = 'Fu Hanxi'
|
|
21
|
+
languages = ['en']
|
|
22
|
+
version = '2.x'
|
|
23
|
+
|
|
24
|
+
# -- General configuration ---------------------------------------------------
|
|
25
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
26
|
+
|
|
27
|
+
extensions = [
|
|
28
|
+
'sphinx.ext.autodoc',
|
|
29
|
+
'sphinx_copybutton',
|
|
30
|
+
'myst_parser',
|
|
31
|
+
'sphinxcontrib.mermaid',
|
|
32
|
+
'sphinxarg.ext',
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
templates_path = ['_templates']
|
|
36
|
+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
37
|
+
|
|
38
|
+
# -- Options for HTML output -------------------------------------------------
|
|
39
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
40
|
+
|
|
41
|
+
html_css_files = ['theme_overrides.css']
|
|
42
|
+
html_logo = '../_static/espressif-logo.svg'
|
|
43
|
+
html_static_path = ['../_static']
|
|
44
|
+
html_theme = 'sphinx_rtd_theme'
|
|
45
|
+
|
|
46
|
+
# mermaid 10.2.0 will show syntax error
|
|
47
|
+
# use fixed version instead
|
|
48
|
+
mermaid_version = '10.6.1'
|
|
49
|
+
|
|
50
|
+
autodoc_default_options = {
|
|
51
|
+
'members': True,
|
|
52
|
+
'member-order': 'bysource',
|
|
53
|
+
'show-inheritance': True,
|
|
54
|
+
'exclude-members': 'model_computed_fields,model_config,model_fields',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def generate_api_docs(language):
|
|
59
|
+
from idf_build_apps.args import (
|
|
60
|
+
BuildArguments,
|
|
61
|
+
FindArguments,
|
|
62
|
+
add_arguments_to_obj_doc_as_params,
|
|
63
|
+
)
|
|
64
|
+
from idf_build_apps.main import build_apps, find_apps
|
|
65
|
+
|
|
66
|
+
docs_dir = os.path.dirname(__file__)
|
|
67
|
+
api_dir = os.path.join(docs_dir, language, 'references', 'api')
|
|
68
|
+
if os.path.isdir(api_dir):
|
|
69
|
+
shutil.rmtree(api_dir)
|
|
70
|
+
|
|
71
|
+
# --- MOCK DOCSTRINGS By Arguments ---
|
|
72
|
+
add_arguments_to_obj_doc_as_params(FindArguments)
|
|
73
|
+
add_arguments_to_obj_doc_as_params(BuildArguments)
|
|
74
|
+
add_arguments_to_obj_doc_as_params(FindArguments, find_apps)
|
|
75
|
+
add_arguments_to_obj_doc_as_params(BuildArguments, build_apps)
|
|
76
|
+
# --- MOCK DOCSTRINGS FINISHED ---
|
|
77
|
+
|
|
78
|
+
subprocess.run(
|
|
79
|
+
[
|
|
80
|
+
'sphinx-apidoc',
|
|
81
|
+
os.path.join(docs_dir, '..', 'idf_build_apps'),
|
|
82
|
+
'-f',
|
|
83
|
+
'-H',
|
|
84
|
+
'API Reference',
|
|
85
|
+
'--no-headings',
|
|
86
|
+
'-t',
|
|
87
|
+
'_apidoc_templates',
|
|
88
|
+
'-o',
|
|
89
|
+
api_dir,
|
|
90
|
+
]
|
|
91
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
language = 'en'
|
|
8
|
+
|
|
9
|
+
sys.path.insert(0, os.path.abspath('../'))
|
|
10
|
+
|
|
11
|
+
from conf_common import * # noqa
|
|
12
|
+
|
|
13
|
+
generate_api_docs(language) # noqa
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
###############
|
|
2
|
+
Build Command
|
|
3
|
+
###############
|
|
4
|
+
|
|
5
|
+
.. note::
|
|
6
|
+
|
|
7
|
+
If you are unfamiliar with the the find command yet, please read the :doc:`find` first.
|
|
8
|
+
|
|
9
|
+
This page explains the process of build apps, and how to use the ``idf-build-apps build`` command to build apps in the projects.
|
|
10
|
+
|
|
11
|
+
.. note::
|
|
12
|
+
|
|
13
|
+
For detailed list of arguments, please refer to the :class:`~idf_build_apps.args.FindArguments` reference.
|
|
14
|
+
|
|
15
|
+
*************************
|
|
16
|
+
Basic ``build`` Command
|
|
17
|
+
*************************
|
|
18
|
+
|
|
19
|
+
.. code:: shell
|
|
20
|
+
|
|
21
|
+
idf-build-apps build
|
|
22
|
+
|
|
23
|
+
*****************************
|
|
24
|
+
``build`` With Placeholders
|
|
25
|
+
*****************************
|
|
26
|
+
|
|
27
|
+
Besides of the :ref:`placeholders supported in find command <find-placeholders>`, the build command also supports the following placeholders:
|
|
28
|
+
|
|
29
|
+
- ``@i``: Would be replaced by the build index.
|
|
30
|
+
- ``@p``: Would be replaced by the parallel build index.
|
|
31
|
+
|
|
32
|
+
*******************************
|
|
33
|
+
``build`` With Warnings Check
|
|
34
|
+
*******************************
|
|
35
|
+
|
|
36
|
+
You may use `--check-warnings` to enable this check. If any warning is captured while the building process, the exit code would turn to a non-zero value. Besides, `idf-build-apps` provides CLI options `--ignore-warnings-str` and `--ignore-warnings-file` to let you bypass some false alarms.
|
|
37
|
+
|
|
38
|
+
***************************
|
|
39
|
+
``build`` With Debug Mode
|
|
40
|
+
***************************
|
|
41
|
+
|
|
42
|
+
It's useful to call `--dry-run` with verbose mode `-vv` to know the whole build process in detail before the build actually happens. For example:
|
|
43
|
+
|
|
44
|
+
.. code:: shell
|
|
45
|
+
|
|
46
|
+
idf-build-apps build -p . --recursive --target esp32 --dry-run -vv --config "sdkconfig.ci.*="
|
|
47
|
+
|
|
48
|
+
The output would be:
|
|
49
|
+
|
|
50
|
+
.. code:: text
|
|
51
|
+
|
|
52
|
+
2024-08-12 15:48:01 DEBUG Looking for CMakeApp apps in . recursively with target esp32
|
|
53
|
+
2024-08-12 15:48:01 DEBUG Entering .
|
|
54
|
+
2024-08-12 15:48:01 DEBUG Skipping. . is not an app
|
|
55
|
+
2024-08-12 15:48:01 DEBUG Entering ./test-1
|
|
56
|
+
2024-08-12 15:48:01 DEBUG sdkconfig file sdkconfig.defaults not found, checking under app_dir...
|
|
57
|
+
2024-08-12 15:48:01 DEBUG Use sdkconfig file ./test-1/sdkconfig.defaults
|
|
58
|
+
2024-08-12 15:48:01 DEBUG Use sdkconfig file /tmp/test/examples/test-1/sdkconfig.ci.bar
|
|
59
|
+
2024-08-12 15:48:01 DEBUG Found app: (cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.bar, build in ./test-1/build
|
|
60
|
+
2024-08-12 15:48:01 DEBUG
|
|
61
|
+
2024-08-12 15:48:01 DEBUG sdkconfig file sdkconfig.defaults not found, checking under app_dir...
|
|
62
|
+
2024-08-12 15:48:01 DEBUG Use sdkconfig file ./test-1/sdkconfig.defaults
|
|
63
|
+
2024-08-12 15:48:01 DEBUG Use sdkconfig file /tmp/test/examples/test-1/sdkconfig.ci.foo
|
|
64
|
+
2024-08-12 15:48:01 DEBUG Found app: (cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.foo, build in ./test-1/build
|
|
65
|
+
2024-08-12 15:48:01 DEBUG
|
|
66
|
+
2024-08-12 15:48:01 DEBUG => Stop iteration sub dirs of ./test-1 since it has apps
|
|
67
|
+
2024-08-12 15:48:01 DEBUG Entering ./test-2
|
|
68
|
+
2024-08-12 15:48:01 DEBUG sdkconfig file sdkconfig.defaults not found, checking under app_dir...
|
|
69
|
+
2024-08-12 15:48:01 DEBUG sdkconfig file ./test-2/sdkconfig.defaults not found, skipping...
|
|
70
|
+
2024-08-12 15:48:01 DEBUG Found app: (cmake) App ./test-2, target esp32, sdkconfig (default), build in ./test-2/build
|
|
71
|
+
2024-08-12 15:48:01 DEBUG
|
|
72
|
+
2024-08-12 15:48:01 DEBUG => Stop iteration sub dirs of ./test-2 since it has apps
|
|
73
|
+
2024-08-12 15:48:01 INFO Found 3 apps in total
|
|
74
|
+
2024-08-12 15:48:01 INFO Total 3 apps. running build for app 1-3
|
|
75
|
+
2024-08-12 15:48:01 INFO (1/3) Building app: (cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.bar, build in ./test-1/build
|
|
76
|
+
2024-08-12 15:48:01 INFO [ Dry Run] Writing build log to ./test-1/build/.temp.build.-4727026790408965348.log
|
|
77
|
+
2024-08-12 15:48:01 INFO skipped (dry run)
|
|
78
|
+
2024-08-12 15:48:01 INFO
|
|
79
|
+
2024-08-12 15:48:01 INFO (2/3) Building app: (cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.foo, build in ./test-1/build
|
|
80
|
+
2024-08-12 15:48:01 INFO [ Dry Run] Writing build log to ./test-1/build/.temp.build.4508471977171905517.log
|
|
81
|
+
2024-08-12 15:48:01 INFO skipped (dry run)
|
|
82
|
+
2024-08-12 15:48:01 INFO
|
|
83
|
+
2024-08-12 15:48:01 INFO (3/3) Building app: (cmake) App ./test-2, target esp32, sdkconfig (default), build in ./test-2/build
|
|
84
|
+
2024-08-12 15:48:01 INFO [ Dry Run] Writing build log to ./test-2/build/.temp.build.4188038822526638365.log
|
|
85
|
+
2024-08-12 15:48:01 INFO skipped (dry run)
|
|
86
|
+
2024-08-12 15:48:01 INFO
|
|
87
|
+
Skipped building the following apps:
|
|
88
|
+
(cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.bar, build in ./test-1/build, skipped in 0.000635s: dry run
|
|
89
|
+
(cmake) App ./test-1, target esp32, sdkconfig /tmp/test/examples/test-1/sdkconfig.ci.foo, build in ./test-1/build, skipped in 0.000309s: dry run
|
|
90
|
+
(cmake) App ./test-2, target esp32, sdkconfig (default), build in ./test-2/build, skipped in 0.000265s: dry run
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
##########################
|
|
2
|
+
Sdkconfig & Config Rules
|
|
3
|
+
##########################
|
|
4
|
+
|
|
5
|
+
This page explains the concept of `Sdkconfig Files`_ and `Config Rules`_. All examples are based on the following demo project, with the folder structure:
|
|
6
|
+
|
|
7
|
+
.. code:: text
|
|
8
|
+
|
|
9
|
+
test-1/
|
|
10
|
+
├── CMakeLists.txt
|
|
11
|
+
├── main/
|
|
12
|
+
│ ├── CMakeLists.txt
|
|
13
|
+
│ └── test-1.c
|
|
14
|
+
├── sdkconfig.ci.bar
|
|
15
|
+
├── sdkconfig.ci.foo
|
|
16
|
+
├── sdkconfig.ci.foo.esp32
|
|
17
|
+
├── sdkconfig.defaults
|
|
18
|
+
└── sdkconfig.defaults.esp32
|
|
19
|
+
|
|
20
|
+
*****************
|
|
21
|
+
Sdkconfig Files
|
|
22
|
+
*****************
|
|
23
|
+
|
|
24
|
+
In general, `sdkconfig files`_ are text files that contains the Kconfig items in the form of ``key=value`` pairs.
|
|
25
|
+
|
|
26
|
+
Specifically, in ESP-IDF, the ``sdkconfig`` file is the file that contains all the Kconfig items used by the ESP-IDF build system to configure the build process. The ``sdkconfig`` file is generated by the ESP-IDF build system based on the default Kconfig settings, and the `pre-set configurations`_ values.
|
|
27
|
+
|
|
28
|
+
Pre-set Configurations
|
|
29
|
+
======================
|
|
30
|
+
|
|
31
|
+
`Pre-set configurations`_ are the Kconfig items that are set in `sdkconfig files`_ before the real build process starts.
|
|
32
|
+
|
|
33
|
+
By default, ESP-IDF uses the ``sdkconfig.defaults`` file to set the pre-set configurations.
|
|
34
|
+
|
|
35
|
+
In ESP-IDF, the target-specific sdkconfig files are used to override the pre-set configurations, when building the project for a specific target. Target-specific sdkconfig files are always endswith the target name. For example, when building the project for the ESP32 target, the ESP-IDF build system will consider the `sdkconfig files`_ with the ``.esp32`` suffix. The values in these target-specific sdkconfig files will override the pre-set values in the ``sdkconfig.defaults`` file. The `override order`_ is explained in more detail in a later section.
|
|
36
|
+
|
|
37
|
+
.. _config-rules:
|
|
38
|
+
|
|
39
|
+
**************
|
|
40
|
+
Config Rules
|
|
41
|
+
**************
|
|
42
|
+
|
|
43
|
+
In most common CI workflows, the project is built with different configurations. Different combinations of configuration options are tested to ensure the project's robustness.
|
|
44
|
+
|
|
45
|
+
The `idf-build-apps` tool uses the concept of `config rules`_ to define the way how the project is built with different pre-set configurations. Each matched `sdkconfig file <#sdkconfig-files>`_ will be built into a separate application, which can be used for testing individually at a later stage.
|
|
46
|
+
|
|
47
|
+
Definition
|
|
48
|
+
==========
|
|
49
|
+
|
|
50
|
+
To define a Config Rule, use the following format: ``[SDKCONFIG_FILEPATTERN]=[CONFIG_NAME]``.
|
|
51
|
+
|
|
52
|
+
- ``SDKCONFIG_FILEPATTERN``: This can be a file name to match a `sdkconfig file <#sdkconfig-files>`_ or a pattern with one wildcard (``*``) character to match multiple `sdkconfig files`_.
|
|
53
|
+
- ``CONFIG_NAME``: The name of the corresponding build configuration. This value can be skipped if the wildcard value is to be used.
|
|
54
|
+
|
|
55
|
+
The config rules and the corresponding matched `sdkconfig files`_ for the example project are as follows:
|
|
56
|
+
|
|
57
|
+
.. list-table:: Config Rules
|
|
58
|
+
:widths: 15 15 55 15
|
|
59
|
+
:header-rows: 1
|
|
60
|
+
|
|
61
|
+
- - Config Rule
|
|
62
|
+
- Config Name
|
|
63
|
+
- Explanation
|
|
64
|
+
- Matched sdkconfig file
|
|
65
|
+
|
|
66
|
+
- - ``=``
|
|
67
|
+
- ``default``
|
|
68
|
+
- The default value of the config name is ``default``.
|
|
69
|
+
-
|
|
70
|
+
|
|
71
|
+
- - ``sdkconfig.ci.foo=test``
|
|
72
|
+
- ``test``
|
|
73
|
+
-
|
|
74
|
+
- ``sdkconfig.ci.foo``
|
|
75
|
+
|
|
76
|
+
- - ``sdkconfig.not_exists=test``
|
|
77
|
+
- ``default``
|
|
78
|
+
- The config rule doesn't match any sdkconfig file. The default value is used instead.
|
|
79
|
+
-
|
|
80
|
+
|
|
81
|
+
- - ``sdkconfig.ci.*=``
|
|
82
|
+
- - ``foo``
|
|
83
|
+
- ``bar``
|
|
84
|
+
- The wildcard matches two files. Two apps are built based on each sdkconfig file.
|
|
85
|
+
- - ``sdkconfig.ci.foo``
|
|
86
|
+
- ``sdkconfig.ci.bar``
|
|
87
|
+
|
|
88
|
+
****************
|
|
89
|
+
Override Order
|
|
90
|
+
****************
|
|
91
|
+
|
|
92
|
+
The override order is explained using graphs to make it easier to understand.
|
|
93
|
+
|
|
94
|
+
Basic ``sdkconfig.defaults``
|
|
95
|
+
============================
|
|
96
|
+
|
|
97
|
+
The matched `sdkconfig files`_ override the pre-set configurations in the ``sdkconfig.defaults`` file. The priority order is as follows (the arrow points to the higher priority):
|
|
98
|
+
|
|
99
|
+
.. mermaid::
|
|
100
|
+
|
|
101
|
+
graph TD
|
|
102
|
+
A[sdkconfig.defaults]
|
|
103
|
+
B[sdkconfig.ci.foo]
|
|
104
|
+
C[sdkconfig.ci.bar]
|
|
105
|
+
D{{app foo}}
|
|
106
|
+
E{{app bar}}
|
|
107
|
+
|
|
108
|
+
subgraph pre-set configurations
|
|
109
|
+
A
|
|
110
|
+
B
|
|
111
|
+
C
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
A --> B -- "populates sdkconfig file, then build" --> D
|
|
115
|
+
A --> C -- "populates sdkconfig file, then build" --> E
|
|
116
|
+
|
|
117
|
+
Target-specific Sdkconfig Files
|
|
118
|
+
===============================
|
|
119
|
+
|
|
120
|
+
When building the project for the ESP32 target, `sdkconfig files`_ with the ``.esp32`` suffix are considered in addition to the following order (the arrow points to the higher priority):
|
|
121
|
+
|
|
122
|
+
.. mermaid::
|
|
123
|
+
|
|
124
|
+
graph TD
|
|
125
|
+
A[sdkconfig.defaults]
|
|
126
|
+
B[sdkconfig.defaults.esp32]
|
|
127
|
+
C[sdkconfig.ci.foo]
|
|
128
|
+
D[sdkconfig.ci.foo.esp32]
|
|
129
|
+
E[sdkconfig.ci.bar]
|
|
130
|
+
F{{app foo}}
|
|
131
|
+
G{{app bar}}
|
|
132
|
+
|
|
133
|
+
subgraph pre-set configurations
|
|
134
|
+
|
|
135
|
+
subgraph only apply when building esp32
|
|
136
|
+
B
|
|
137
|
+
D
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
A
|
|
141
|
+
C
|
|
142
|
+
E
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
A --> B
|
|
146
|
+
B --> C --> D -- "populates sdkconfig file, then build" --> F
|
|
147
|
+
B --> E -- "populates sdkconfig file, then build" --> G
|
|
148
|
+
|
|
149
|
+
Override In CLI
|
|
150
|
+
===============
|
|
151
|
+
|
|
152
|
+
``idf-build-apps`` also supports overriding the pre-set configurations using CLI options.
|
|
153
|
+
|
|
154
|
+
- ``--override-sdkconfig-items``
|
|
155
|
+
|
|
156
|
+
A comma-separated list of key-value pairs representing the configuration options.
|
|
157
|
+
|
|
158
|
+
- ``--override-sdkconfig-files``
|
|
159
|
+
|
|
160
|
+
A comma-separated list of file paths pointing to the `sdkconfig files`_.
|
|
161
|
+
|
|
162
|
+
To make the example more complex, assume that the following CLI options are used:
|
|
163
|
+
|
|
164
|
+
- ``--override-sdkconfig-items=CONFIG1=VALUE1,CONFIG2=VALUE2``
|
|
165
|
+
- ``--override-sdkconfig-files=temp1,temp2``
|
|
166
|
+
|
|
167
|
+
Now the priority order of the configuration options is as follows (the arrow points to the higher priority):
|
|
168
|
+
|
|
169
|
+
.. mermaid::
|
|
170
|
+
|
|
171
|
+
graph TD
|
|
172
|
+
A[sdkconfig.defaults]
|
|
173
|
+
B[sdkconfig.defaults.esp32]
|
|
174
|
+
C[sdkconfig.ci.foo]
|
|
175
|
+
D[sdkconfig.ci.foo.esp32]
|
|
176
|
+
E[sdkconfig.ci.bar]
|
|
177
|
+
F[temp1]
|
|
178
|
+
G[temp2]
|
|
179
|
+
H[A temp file, that contains the value of --override-sdkconfig-items
|
|
180
|
+
CONFIG1=VALUE1
|
|
181
|
+
CONFIG2=VALUE2]
|
|
182
|
+
|
|
183
|
+
I{{app foo}}
|
|
184
|
+
J{{app bar}}
|
|
185
|
+
|
|
186
|
+
subgraph pre-set configurations
|
|
187
|
+
|
|
188
|
+
subgraph only apply when building esp32
|
|
189
|
+
B
|
|
190
|
+
D
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
A
|
|
194
|
+
C
|
|
195
|
+
E
|
|
196
|
+
F
|
|
197
|
+
G
|
|
198
|
+
H
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
A --> B
|
|
202
|
+
B --> C --> D --> F --> G --> H -- "populates sdkconfig file, then build" --> I
|
|
203
|
+
B --> E --> F --> G --> H -- "populates sdkconfig file, then build" --> J
|