The `arm_common` syscalls implement `_gettimeofday()` for the benefit of
newlib. The syscall call only work if the `rtc` module or the `vtimer`
modules is transcluded. If neither module is used, a warning is printed
by means of `#warning`.
This warning is useless if the user does not invoke `gettimeofday()`.
Further this warning prevents the use of `-Werror`.
This PR puts the function in its own file, that will only be linked if
it was used. And if the function was used, then a link time error occur
if neither `rtc` nor `vtimer` was transcluded.
Closes#993.
We do not need to descend into the modules to know what to do on
`make clean BOARD=blub`. We can just invoke `rm -rf bin/blub`.
This PR only keeps the descending into the USEPKGs, since they might
want to delete cached/downloaded/extracted data.
Creating all object files in one directory is bound to produce name
clashes. RIOT developers may take care to use unique file names, but
external packages surely don't.
With this change all the objects of a module (e.g. `shell`) will be
created in `bin/$(BOARD)/$(MODULE)`.
I compared the final linker command before and after the change. The
`.o` files (e.g. `startup.o`, `syscall.o` ...) are included in the same
order. Neglecting the changed path name where the `.o` files reside, the
linker command stays exactly the same.
A major problem could be third party boards, because the location of the
`startup.o` needs to the specified now in
`boards/$(BOARD)/Makefile.include`, e.g.
```Makefile
export UNDEF += $(BINDIR)msp430_common/startup.o
```
TAIFG should count the overflows, instead of using the first CCR for this purpose.
Without this commit ARCH_MAXTIMERS returns the wrong number as
effectively one timer less can be used.
Additional fixed comment style and added timer debug.
Change from `void reboot(void)` to `int reboot(int mode)`.
Move reboot definition to core, rename architecture implementations
from reboot to reboot_arch.
Declare reboot mode(s) in kernel.h, reboot_arch in kernel_internal.h
Currently only one reboot mode is handled, its use is enforced.
Rationale:
A reboot function is already defined in <unistd.h> on BSD systems.
(See: http://www.openbsd.org/cgi-bin/man.cgi?query=reboot&sektion=2)
This patch not only allows native to build sensibly on these systems
but also streamlines RIOTs compatability with existing software.
native modules will never need the dynamic INCLUDES, so we define our
own NATIVEINCLUDES. Due to the current make structure, the only way to
not use INCLUDES is to redefine the build rules.