Skip to content

Commit 6ec1e91

Browse files
author
Marek Fiala
committed
feat(tools): Move sample_project from examples to tools
Extended example readme.md by further development options.
1 parent 5a5c004 commit 6ec1e91

File tree

10 files changed

+19
-51
lines changed

10 files changed

+19
-51
lines changed

examples/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ The `IDF_PATH` environment variable is the only thing that connects the example
9696

9797
If you're looking for a more bare-bones project to start from, try [esp-idf-template](https://github.com/espressif/esp-idf-template).
9898

99+
## Further Development
100+
101+
For further steps on how to develop a project, see the following:
102+
103+
- Managing the project:
104+
- [IDF Frontend](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#start-a-new-project) document
105+
- ESP-IDF Getting Started video ([YouTube](https://youtu.be/J8zc8mMNKtc?t=340), [bilibili](https://www.bilibili.com/video/BV1114y1r7du/?t=336))
106+
- [Overview](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html#example-project) of an example project
107+
- [Build System](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/build-system.html) document
108+
- Writing code:
109+
- Write your own code following the [API references](https://docs.espressif.com/projects/esp-idf/en/stable/api-reference/index.html)
110+
99111
## Contributing Examples
100112

101113
If you have a new example you think we'd like, please consider sending it to us as a Pull Request.

examples/get-started/sample_project/README.md

-44
This file was deleted.

tools/ci/check_build_test_rules.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ def check_exist() -> None:
427427
check_dirs = {IDF_PATH}
428428
_exclude_dirs = [os.path.join(IDF_PATH, 'tools', 'unit-test-app'),
429429
os.path.join(IDF_PATH, 'tools', 'test_build_system', 'build_test_app'),
430-
os.path.join(IDF_PATH, 'examples', 'get-started', 'sample_project')]
430+
os.path.join(IDF_PATH, 'tools', 'templates', 'sample_project')]
431431
else:
432-
_exclude_dirs = [os.path.join(IDF_PATH, 'examples', 'get-started', 'sample_project')]
432+
_exclude_dirs = [os.path.join(IDF_PATH, 'tools', 'templates', 'sample_project')]
433433

434434
extra_default_build_targets_list: List[str] = []
435435
bypass_check_test_targets_list: List[str] = []

tools/ci/check_copyright_config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,4 @@ ignore:
242242
- components/protocomm/python/
243243
- components/wifi_provisioning/proto-c/
244244
- components/wifi_provisioning/python/
245+
- tools/templates/

tools/ci/check_copyright_ignore.txt

-3
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,6 @@ examples/ethernet/basic/main/ethernet_example_main.c
995995
examples/ethernet/enc28j60/components/eth_enc28j60/enc28j60.h
996996
examples/ethernet/enc28j60/main/enc28j60_example_main.c
997997
examples/get-started/blink/main/blink_example_main.c
998-
examples/get-started/sample_project/main/main.c
999998
examples/mesh/internal_communication/main/include/mesh_light.h
1000999
examples/mesh/internal_communication/main/mesh_light.c
10011000
examples/mesh/internal_communication/main/mesh_main.c
@@ -1146,8 +1145,6 @@ tools/ble/lib_gatt.py
11461145
tools/catch/catch.hpp
11471146
tools/ldgen/samples/template.ld
11481147
tools/ldgen/test/data/linker_script.ld
1149-
tools/templates/sample_component/include/main.h
1150-
tools/templates/sample_component/main.c
11511148
tools/test_apps/build_system/embed_test/main/test_main.c
11521149
tools/test_apps/build_system/ldgen_test/main/src1.c
11531150
tools/test_apps/build_system/ldgen_test/main/src2.c

tools/ci/exclude_check_tools_files.txt

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ tools/eclipse-code-style.xml
3232
tools/format.sh
3333
tools/mocks/**/*
3434
tools/set-submodules-to-github.sh
35+
tools/templates/sample_project/main/main.c
36+
tools/templates/sample_project/CMakeLists.txt
37+
tools/templates/sample_project/main/CMakeLists.txt
3538
tools/templates/sample_component/CMakeLists.txt
3639
tools/templates/sample_component/include/main.h
3740
tools/templates/sample_component/main.c

tools/idf_py_actions/create_ext.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def is_empty_and_create(path: str, action: str) -> None:
4040

4141
def create_project(target_path: str, name: str) -> None:
4242
copytree(
43-
os.path.join(os.environ['IDF_PATH'], 'examples', 'get-started', 'sample_project'),
43+
os.path.join(os.environ['IDF_PATH'], 'tools', 'templates', 'sample_project'),
4444
target_path,
4545
copy_function=copy,
4646
dirs_exist_ok=True,
@@ -49,7 +49,6 @@ def create_project(target_path: str, name: str) -> None:
4949
os.rename(os.path.join(main_folder, 'main.c'), os.path.join(main_folder, '.'.join((name, 'c'))))
5050
replace_in_file(os.path.join(main_folder, 'CMakeLists.txt'), 'main', name)
5151
replace_in_file(os.path.join(target_path, 'CMakeLists.txt'), 'main', name)
52-
os.remove(os.path.join(target_path, 'README.md'))
5352

5453

5554
def create_component(target_path: str, name: str) -> None:

0 commit comments

Comments
 (0)