mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
commit
4eeb015f77
7
Makefile
7
Makefile
@ -2,9 +2,6 @@ DIRS = $(RIOTCPU)/$(CPU) core drivers sys
|
||||
|
||||
.PHONY: all clean doc
|
||||
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
||||
|
||||
all:
|
||||
mkdir -p $(BINDIR)
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||
@ -16,5 +13,7 @@ clean:
|
||||
fi
|
||||
|
||||
doc:
|
||||
make -BC doc/doxygen
|
||||
"$(MAKE)" -BC doc/doxygen
|
||||
|
||||
docclean:
|
||||
"$(MAKE)" -BC doc/doxygen clean
|
||||
|
@ -83,9 +83,9 @@
|
||||
* example, you can easily specify the target platform, using the sample Makefile,
|
||||
* by invoking make like this:
|
||||
*
|
||||
* ```
|
||||
* \code
|
||||
* make BOARD=telosb
|
||||
* ```
|
||||
* \endcode
|
||||
*
|
||||
* Besides typical targets like `clean`, `all`, or `doc`, RIOT provides the special
|
||||
* targets `flash` and `term` to invoke the configured flashing and terminal tools
|
||||
@ -108,10 +108,10 @@
|
||||
* names to the USEMODULE variable. For example, to build a project using the SHT11
|
||||
* temperature sensor and 6LoWPAN network stack, your Makefile needs to contain
|
||||
* these lines:
|
||||
* ```
|
||||
* \code
|
||||
* USEMODULE += sht11
|
||||
* USEMODULE += sixlowpan
|
||||
* ```
|
||||
* \endcode
|
||||
* To contribute a new module to RIOT, your module's Makefile needs to set the
|
||||
* variable `MODULE` to a unique name. If the module depends on other modules, this
|
||||
* information needs to be added to RIOT's `Makefile.dep`.
|
||||
@ -126,6 +126,37 @@
|
||||
* priority - is the first thread that runs and calls the main function. This
|
||||
* function needs to be defined by the project.
|
||||
*
|
||||
* ####Choosing the right stack size
|
||||
*
|
||||
* Choosing the right stack size for a new thread is not an easy, but a very
|
||||
* crucial task. Since memory is usually a scarce resource in IoT scenarios,
|
||||
* one most be careful not to assign too much stack to a single thread.
|
||||
* However, if you allocate too little memory for a stack, your application
|
||||
* will probably crash. The minimum stack size depends also on some RIOT
|
||||
* internal structs and is hardware dependent. In order to help developers
|
||||
* finding the right stack size, RIOT defines some typical stack sizes in
|
||||
* `cpu-conf.` (which should be provided by the implementation for all
|
||||
* supported MCUs). The constants for these stack sizes are
|
||||
*
|
||||
* * `KERNEL_CONF_STACKSIZE_IDLE`
|
||||
* * `KERNEL_CONF_STACKSIZE_DEFAULT`
|
||||
* * `KERNEL_CONF_STACKSIZE_PRINTF`
|
||||
* * `KERNEL_CONF_STACKSIZE_MAIN`
|
||||
*
|
||||
* and can be used by including `kernel.h`. ARM based platforms additionally
|
||||
* define `KERNEL_CONF_STACKSIZE_PRINTF_FLOAT`, because newlibs printf
|
||||
* implementation uses more memory for printing floating point numbers.
|
||||
*
|
||||
* `KERNEL_CONF_STACKSIZE_IDLE` is the stack size for the idle thread and
|
||||
* probably the smallest sensible stack size. `KERNEL_CONF_STACKSIZE_DEFAULT`
|
||||
* is a default size for any typical thread, _not_ using printf.
|
||||
* `KERNEL_CONF_STACKSIZE_PRINTF` defines additional stack space needed if the
|
||||
* thread needs to call printf (which requires additional memory when using
|
||||
* newlib. `KERNEL_CONF_STACKSIZE_MAIN` is the stack size for the main thread
|
||||
* and probably a good size for your application. (Note, that on most
|
||||
* non-newlib dependent platforms this will probably equal
|
||||
* `KERNEL_CONF_STACKSIZE_DEFAULT`.
|
||||
*
|
||||
* ####The IPC
|
||||
*
|
||||
* Like any microkernel system, RIOT has an IPC API that enables data exchange
|
||||
|
Loading…
Reference in New Issue
Block a user