mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
docs: link to subfolders example in documentation
Co-authored-by: plmorange <pierre1.lemeur@orange.com>
This commit is contained in:
parent
66f1f3e093
commit
518f75f687
@ -92,6 +92,21 @@ USEMODULE += gnrc_udp
|
|||||||
|
|
||||||
Modules typically pull in all required dependencies.
|
Modules typically pull in all required dependencies.
|
||||||
|
|
||||||
|
## Including source files in subfolders
|
||||||
|
|
||||||
|
By default, all source files in an application's (or any RIOT module's) directory
|
||||||
|
are automatically compiled as part of the application. In order to organize source
|
||||||
|
code in a directory structure, two different approaches can be used:
|
||||||
|
|
||||||
|
1. Make each subdirectory a separate RIOT module with a unique name inside its
|
||||||
|
Makefile, either by adding the directory's path to `DIRS` or with the [out-of-tree
|
||||||
|
module support](#external-modules).
|
||||||
|
2. Add the source files within subdirectories to `SRC`, either explicitly or with
|
||||||
|
Makefile wildcards.
|
||||||
|
|
||||||
|
Both approaches are illustrated and explained in `examples/subfolders`.
|
||||||
|
|
||||||
|
|
||||||
# Helper tools
|
# Helper tools
|
||||||
|
|
||||||
To help you start writing an application within RIOT, the build system provides
|
To 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
|
|||||||
additional PWM outputs instead) a copy of the upstream board that is then
|
additional PWM outputs instead) a copy of the upstream board that is then
|
||||||
customized to the application needs is the best course of action.
|
customized to the application needs is the best course of action.
|
||||||
|
|
||||||
## External Modules
|
## External Modules {#external-modules}
|
||||||
|
|
||||||
Similar to the external boards, external modules can be written in a similar way
|
Similar to the external boards, external modules can be written in a similar way
|
||||||
as regular in-tree modules.
|
as regular in-tree modules.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# Application Example with Subfolders
|
# Application Example with Subfolders
|
||||||
|
|
||||||
This example demonstrates the usage of subfolders in a RIOT application
|
This example demonstrates the usage of subfolders in a RIOT application
|
||||||
show-casing two possible approaches: RIOT modules and simple subfolders.
|
(or in a RIOT module in general) show-casing two possible approaches: RIOT
|
||||||
|
modules and simple subfolders.
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user