Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doc/doxygen/src/creating-an-application.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,28 @@ Makefile wildcards.

Both approaches are illustrated and explained in `examples/basic/subfolders`.

## Setting Board-specific Dependencies

Required dependencies of applications may change depending on the
target board or architecture. This is especially
relevant for networking applications where multiple hardware implementations
exist and the appropriate one has to be chosen for the given board
or architecture.
Comment on lines +112 to +115
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
target board or architecture. This is especially
relevant for networking applications where multiple hardware implementations
exist and the appropriate one has to be chosen for the given board
or architecture.
target board or architecture. This is especially
relevant for networking applications where multiple hardware implementations
exist and the appropriate implementation has to be chosen for the given board
or architecture.

? Not 100% sure what "one" is referring to here, so better clarify.

To achieve this task elegantly, a `Makefile.board.dep` file can be
created in the application folder, which is automatically included and
evaluated by RIOT build system during the dependency resolution phase.
This ensures that all the relevant variables such as `FEATURES_USED` or the
`USEMODULE` list are fully populated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.mk}
ifneq (,$(filter arch_esp,$(FEATURES_USED)))
USEMODULE += esp_wifi
endif

ifneq (,$(filter native native32 native64,$(BOARD)))
USEMODULE += netdev_default
endif
~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Helper tools

Expand Down