... | ... | @@ -4,8 +4,8 @@ |
|
|
|
|
|
An application can be created for full-fledged or resource-limited devices.
|
|
|
|
|
|
Creating an application for full-fledged devices
|
|
|
================================================
|
|
|
# Creating an application for full-fledged devices
|
|
|
|
|
|
We recommend to use the [Eclipse IDE] (https://www.eclipse.org/) for C/C++ Developers for creating
|
|
|
own application. The simplest way to write your own application, is to put your *.c and *.h files under the
|
|
|
`src` directory. Another way is to create a directory containing the multiple C file(s) with your
|
... | ... | @@ -15,15 +15,15 @@ button to browse to the header-directory and the select the ''Apply'' and ''OK'' |
|
|
oriented to the main.c and the examples under the src-directory.
|
|
|
|
|
|
|
|
|
Creating an application for resource-limited devices
|
|
|
====================================================
|
|
|
# Creating an application for resource-limited devices
|
|
|
|
|
|
To create your own application for a resource limited device you need to create a directory
|
|
|
containing one or multiple C file(s) with your source code and a Makefile. An example Makefile is
|
|
|
available in the `src` folder of the [RcdMathLib repository]
|
|
|
(https://git.imp.fu-berlin.de/zkasmi/my_lib_full_fledged_devices/tree/master/RcdMathLib_app).
|
|
|
|
|
|
The main function
|
|
|
=================
|
|
|
# The main function
|
|
|
|
|
|
RIOT starts two threads the idle and main threads after the board is initialized.
|
|
|
The idle thread has the lowest priority while the main thread has a priority that
|
|
|
is in the middle between the lowest and the highest available priorities. The main
|
... | ... | @@ -51,10 +51,10 @@ int main(void) |
|
|
The above C code shows an application testing the basic operations sub-modules.
|
|
|
This application run operations of the vector and matrix sub-modules.
|
|
|
|
|
|
The application's Makefile
|
|
|
==========================
|
|
|
The minimal Makefile
|
|
|
--------------------
|
|
|
# The application's Makefile
|
|
|
|
|
|
## The minimal Makefile
|
|
|
|
|
|
At minimum the Makefile of an application (see @ref getting-started) needs to
|
|
|
define the following macros:
|
|
|
* `APPLICATION`: contains the name of your application
|
... | ... | @@ -87,8 +87,8 @@ include $(RCDMATHLIB)/Makefile.include |
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Including modules
|
|
|
-----------------
|
|
|
## Including modules
|
|
|
|
|
|
The modules of the RcdMathLib as well as of the RcdMathLib can be included.
|
|
|
In order to use additional modules, such as a particular driver or a system library, the modules'
|
|
|
names must be appended to the USEMODULE variable. For example, to build an application using the SHT11
|
... | ... | |