File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,21 @@ USEMODULE += gnrc_udp
9292
9393Modules typically pull in all required dependencies.
9494
95+ ## Including source files in subfolders
96+
97+ By default, all source files in an application's (or any RIOT module's) directory
98+ are automatically compiled as part of the application. In order to organize source
99+ code in a directory structure, two different approaches can be used:
100+
101+ 1 . Make each subdirectory a separate RIOT module with a unique name inside its
102+ Makefile, either by adding the directory's path to ` DIRS ` or with the [ out-of-tree
103+ module support] ( #external-modules ) .
104+ 2 . Add the source files within subdirectories to ` SRC ` , either explicitly or with
105+ Makefile wildcards.
106+
107+ Both approaches are illustrated and explained in ` examples/subfolders ` .
108+
109+
95110# Helper tools
96111
97112To help you start writing an application within RIOT, the build system provides
@@ -210,7 +225,7 @@ configuration (e.g. configuring some of the pins configured as ADC as
210225additional PWM outputs instead) a copy of the upstream board that is then
211226customized to the application needs is the best course of action.
212227
213- ## External Modules
228+ ## External Modules {#external-modules}
214229
215230Similar to the external boards, external modules can be written in a similar way
216231as regular in-tree modules.
Original file line number Diff line number Diff line change 11# Application Example with Subfolders
22
33This example demonstrates the usage of subfolders in a RIOT application
4- show-casing two possible approaches: RIOT modules and simple subfolders.
4+ (or in a RIOT module in general) show-casing two possible approaches: RIOT
5+ modules and simple subfolders.
56
67## Details
78
You can’t perform that action at this time.
0 commit comments