Skip to content

Commit ae3e29a

Browse files
committed
doc: Move the source tree description out of app development
It is quite confusing to describe Zephyr's source tree layout in the section for application development, given that applications do not need to follow the exact same layout as the main tree. Instead move this section to the contribution guidelines chapter. Signed-off-by: Carles Cufi <[email protected]>
1 parent ab6d3d3 commit ae3e29a

File tree

2 files changed

+97
-103
lines changed

2 files changed

+97
-103
lines changed

doc/contribute/guidelines.rst

Lines changed: 97 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,106 @@ on https://github.com and have Git tools available on your development system.
200200
details link near the end of the PR conversation list. See
201201
`Continuous Integration`_ for more information
202202

203-
Repository layout
204-
*****************
203+
.. _source_tree_v2:
204+
205+
Source Tree Structure
206+
*********************
205207

206-
To clone the main Zephyr Project repositories use the instructions in
208+
To clone the main Zephyr Project repository use the instructions in
207209
:ref:`get_the_code`.
208210

209-
The Zephyr project directory structure is described in :ref:`source_tree_v2`
210-
documentation. In addition to the Zephyr kernel itself, you'll also find the
211-
sources for technical documentation, sample code, supported board
212-
configurations, and a collection of subsystem tests. All of these are
213-
available for developers to contribute to and enhance.
211+
This section describes the main repository's source tree. In addition to the
212+
Zephyr kernel itself, you'll also find the sources for technical documentation,
213+
sample code, supported board configurations, and a collection of subsystem
214+
tests. All of these are available for developers to contribute to and enhance.
215+
216+
Understanding the Zephyr source tree can help locate the code
217+
associated with a particular Zephyr feature.
218+
219+
At the top of the tree, several files are of importance:
220+
221+
:file:`CMakeLists.txt`
222+
The top-level file for the CMake build system, containing a lot of the
223+
logic required to build Zephyr.
224+
225+
:file:`Kconfig`
226+
The top-level Kconfig file, which refers to the file :file:`Kconfig.zephyr`
227+
also found in the top-level directory.
228+
229+
See :ref:`the Kconfig section of the manual <kconfig>` for detailed Kconfig
230+
documentation.
231+
232+
:file:`west.yml`
233+
The :ref:`west` manifest, listing the external repositories managed by
234+
the west command-line tool.
235+
236+
The Zephyr source tree also contains the following top-level
237+
directories, each of which may have one or more additional levels of
238+
subdirectories not described here.
239+
240+
:file:`arch`
241+
Architecture-specific kernel and system-on-chip (SoC) code.
242+
Each supported architecture (for example, x86 and ARM)
243+
has its own subdirectory,
244+
which contains additional subdirectories for the following areas:
245+
246+
* architecture-specific kernel source files
247+
* architecture-specific kernel include files for private APIs
248+
249+
:file:`soc`
250+
SoC related code and configuration files.
251+
252+
:file:`boards`
253+
Board related code and configuration files.
254+
255+
:file:`doc`
256+
Zephyr technical documentation source files and tools used to
257+
generate the https://docs.zephyrproject.org web content.
258+
259+
:file:`drivers`
260+
Device driver code.
261+
262+
:file:`dts`
263+
:ref:`devicetree <dt-guide>` source files used to describe non-discoverable
264+
board-specific hardware details.
265+
266+
:file:`include`
267+
Include files for all public APIs, except those defined under :file:`lib`.
268+
269+
:file:`kernel`
270+
Architecture-independent kernel code.
271+
272+
:file:`lib`
273+
Library code, including the minimal standard C library.
274+
275+
:file:`misc`
276+
Miscellaneous code that doesn't belong to any of the other top-level
277+
directories.
278+
279+
:file:`samples`
280+
Sample applications that demonstrate the use of Zephyr features.
281+
282+
:file:`scripts`
283+
Various programs and other files used to build and test Zephyr
284+
applications.
285+
286+
:file:`cmake`
287+
Additional build scripts needed to build Zephyr.
288+
289+
:file:`subsys`
290+
Subsystems of Zephyr, including:
291+
292+
* USB device stack code
293+
* Networking code, including the Bluetooth stack and networking stacks
294+
* File system code
295+
* Bluetooth host and controller
296+
297+
:file:`tests`
298+
Test code and benchmarks for Zephyr features.
299+
300+
:file:`share`
301+
Additional architecture independent data. It currently contains Zephyr's CMake
302+
package.
214303

215304
Pull Requests and Issues
216305
************************

doc/develop/application/index.rst

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -67,101 +67,6 @@ generated in a build directory; Zephyr does not support "in-tree" builds.
6767
The following sections describe how to create, build, and run Zephyr
6868
applications, followed by more detailed reference material.
6969

70-
71-
.. _source_tree_v2:
72-
73-
Source Tree Structure
74-
*********************
75-
76-
Understanding the Zephyr source tree can be helpful in locating the code
77-
associated with a particular Zephyr feature.
78-
79-
At the top of the tree there are several files that are of importance:
80-
81-
:file:`CMakeLists.txt`
82-
The top-level file for the CMake build system, containing a lot of the
83-
logic required to build Zephyr.
84-
85-
:file:`Kconfig`
86-
The top-level Kconfig file, which refers to the file :file:`Kconfig.zephyr`
87-
also found at the top-level directory.
88-
89-
See :ref:`the Kconfig section of the manual <kconfig>` for detailed Kconfig
90-
documentation.
91-
92-
:file:`west.yml`
93-
The :ref:`west` manifest, listing the external repositories managed by
94-
the west command-line tool.
95-
96-
The Zephyr source tree also contains the following top-level
97-
directories, each of which may have one or more additional levels of
98-
subdirectories which are not described here.
99-
100-
:file:`arch`
101-
Architecture-specific kernel and system-on-chip (SoC) code.
102-
Each supported architecture (for example, x86 and ARM)
103-
has its own subdirectory,
104-
which contains additional subdirectories for the following areas:
105-
106-
* architecture-specific kernel source files
107-
* architecture-specific kernel include files for private APIs
108-
109-
:file:`soc`
110-
SoC related code and configuration files.
111-
112-
:file:`boards`
113-
Board related code and configuration files.
114-
115-
:file:`doc`
116-
Zephyr technical documentation source files and tools used to
117-
generate the https://docs.zephyrproject.org web content.
118-
119-
:file:`drivers`
120-
Device driver code.
121-
122-
:file:`dts`
123-
:ref:`devicetree <dt-guide>` source files used to describe non-discoverable
124-
board-specific hardware details.
125-
126-
:file:`include`
127-
Include files for all public APIs, except those defined under :file:`lib`.
128-
129-
:file:`kernel`
130-
Architecture-independent kernel code.
131-
132-
:file:`lib`
133-
Library code, including the minimal standard C library.
134-
135-
:file:`misc`
136-
Miscellaneous code that doesn't belong to any of the other top-level
137-
directories.
138-
139-
:file:`samples`
140-
Sample applications that demonstrate the use of Zephyr features.
141-
142-
:file:`scripts`
143-
Various programs and other files used to build and test Zephyr
144-
applications.
145-
146-
:file:`cmake`
147-
Additional build scripts needed to build Zephyr.
148-
149-
:file:`subsys`
150-
Subsystems of Zephyr, including:
151-
152-
* USB device stack code.
153-
* Networking code, including the Bluetooth stack and networking stacks.
154-
* File system code.
155-
* Bluetooth host and controller
156-
157-
:file:`tests`
158-
Test code and benchmarks for Zephyr features.
159-
160-
:file:`share`
161-
Additional architecture independent data. Currently containing Zephyr CMake
162-
package.
163-
164-
16570
Example standalone application
16671
******************************
16772

0 commit comments

Comments
 (0)