Skip to content

Creating external modules

Martine Lenders edited this page Feb 24, 2015 · 4 revisions

Sometimes, it may be desirable to develop a new module in a repository outside of the RIOT repository. This can be accomplished with external modules, which are created as follows:

In the Makefile of your application

You will have to add the following lines to the Makefile of each application using your external module:

EXTERNAL_MODULE_DIRS += /path/to/my/module

USEMODULE += my_module
INCLUDES += -I/path/to/the/include/folder/of/my/module

In the Makefile of your external module

If the directory your module resides in is called as your Makefile, as with all modules, should contain at least should contain at least

include $(RIOTBASE)/Makefile.base

There are no changes necessary. If the directory for whatever reason needs to bee called differently than the module you can always (and have to) define the module's name by setting the MODULE macro before including the Makefile.base:

MODULE = my_module
include $(RIOTBASE)/Makefile.base

Please note that this feature exists for convenient development only. It is discouraged to open pull requests containing Makefiles using external modules.

Clone this wiki locally