Skip to content

Commit a1951c8

Browse files
committed
Update to use idf-component-manager instead of espp submodule, removing the need for a submodule. Update docs accordingly
1 parent 01473ad commit a1951c8

File tree

6 files changed

+61
-27
lines changed

6 files changed

+61
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333
build/
3434
sdkconfig
3535
sdkconfig.old
36+
managed_components/

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "components/espp"]
2-
path = components/espp
3-
url = git@github.com:esp-cpp/espp

CMakeLists.txt

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,32 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
77
# add the component directories that we want to use
88
set(EXTRA_COMPONENT_DIRS
99
"components/"
10-
"components/espp/components/"
10+
# NOTE: if we didn't use the idf-component-manager to get the espp
11+
# dependencies, we could instead have ESPP be a submodule within our
12+
# 'components' folder, which would mean we'd need to add it to the DIRS:
13+
#
14+
# "components/espp/components/"
15+
#
16+
# NOTE: alternatively, we could install espp system-wide, so we could just
17+
# point it to wherever we have espp installed.
18+
#
19+
# "/path/to/espp/components/"
1120
)
1221

1322
set(
1423
COMPONENTS
15-
# TODO: add additional esp-idf and espp components you want to use to the line below:
16-
"main esptool_py logger task"
24+
# NOTE: you can add additional esp-idf and espp components you want to use to
25+
# the line below.
26+
#
27+
# Alternatively, If they exist in the component registry, then you can ignore
28+
# adding them here, and instead use call
29+
#
30+
# `idf.py add-dependency "<namespace>/<component>^<version>"`
31+
#
32+
# e.g.
33+
#
34+
# `idf.py add-dependency "espp/task^0.21.0"`
35+
"main esptool_py"
1736
CACHE STRING
1837
"List of components to include"
1938
)

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,34 @@
33
Template repository for building an ESP app with ESP++ (espp) components and
44
ESP-IDF components.
55

6+
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
7+
**Table of Contents**
8+
9+
- [ESP++ Template](#esp-template)
10+
- [Development](#development)
11+
- [Build and Flash](#build-and-flash)
12+
- [Output](#output)
13+
- [Developing](#developing)
14+
- [Code style](#code-style)
15+
16+
<!-- markdown-toc end -->
17+
618
## Development
719

820
This repository is designed to be used as a template repository - so you can
921
sepcify this as the template repository type when creating a new repository on
1022
GitHub.
1123

1224
After setting this as the template, make sure to update the following:
13-
- [This README](./README.md) to contain the relevant description and images of your project
14-
- The [./CMakeLists.txt](./CMakeLists.txt) file to have the components that you
15-
want to use (and any you may have added to the [components
16-
folder](./components)) as well as to update the project name
25+
- [This README](./README.md) to contain the relevant description and images of
26+
your project
27+
- Add additional component dependencies you may want, e.g.:
28+
29+
```console
30+
idf.py add-dependency "espp/timer^0.21.0"
31+
```
32+
33+
- The [./CMakeLists.txt](./CMakeLists.txt) file to update the project name.
1734
- The [./main/main.cpp](./main/main.cpp) To run the main code for your app. The
1835
[main folder](./main) is also where you can put additional header and source
1936
files that you don't think belong in their own components but help keep the
@@ -27,22 +44,6 @@ After setting this as the template, make sure to update the following:
2744
analysis tool to put its results into a comment on any pull requests in your
2845
repository.
2946

30-
## Cloning
31-
32-
Since this repo contains a submodule, you need to make sure you clone it
33-
recursively, e.g. with:
34-
35-
``` sh
36-
git clone --recurse-submodules <your repo name>
37-
```
38-
39-
Alternatively, you can always ensure the submodules are up to date after cloning
40-
(or if you forgot to clone recursively) by running:
41-
42-
``` sh
43-
git submodule update --init --recursive
44-
```
45-
4647
## Build and Flash
4748

4849
Build the project and flash it to the board, then run monitor tool to view serial output:

components/espp

Lines changed: 0 additions & 1 deletion
This file was deleted.

main/idf_component.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## IDF Component Manager Manifest File
2+
dependencies:
3+
## Required IDF version
4+
idf:
5+
version: '>=4.1.0'
6+
# # Put list of dependencies here
7+
# # For components maintained by Espressif:
8+
# component: "~1.0.0"
9+
# # For 3rd party components:
10+
# username/component: ">=1.0.0,<2.0.0"
11+
# username2/component2:
12+
# version: "~1.0.0"
13+
# # For transient dependencies `public` flag can be set.
14+
# # `public` flag doesn't have an effect dependencies of the `main` component.
15+
# # All dependencies of `main` are public by default.
16+
# public: true
17+
espp/task: ^0.21.0

0 commit comments

Comments
 (0)