@@ -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
215304Pull Requests and Issues
216305************************
0 commit comments