mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
always build and initialize hwtimer
Eliminates special treatment of the hwtimer module and makes it a mandatory part of the kernel.
This commit is contained in:
parent
9c0fc3b1e2
commit
93e32953b3
@ -44,9 +44,6 @@ ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
ifeq (,$(filter hwtimer,$(USEMODULE)))
|
||||
USEMODULE += hwtimer
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter cc2420,$(USEMODULE)))
|
||||
@ -101,9 +98,6 @@ ifneq (,$(filter sixlowpan,$(USEMODULE)))
|
||||
endif
|
||||
|
||||
ifneq (,$(filter vtimer,$(USEMODULE)))
|
||||
ifeq (,$(filter hwtimer,$(USEMODULE)))
|
||||
USEMODULE += hwtimer
|
||||
endif
|
||||
ifeq (,$(filter timex,$(USEMODULE)))
|
||||
USEMODULE += timex
|
||||
endif
|
||||
|
@ -6,10 +6,7 @@ INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBAS
|
||||
ED = $(USEMODULE:%=-DMODULE_%)
|
||||
ED += $(USEPKG:%=-DMODULE_%)
|
||||
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z')
|
||||
BL=$(USEMODULE:%= $(BINDIR)%.a)
|
||||
|
||||
# exclude hwtimer, because it is part of the kernel but the define is needed for auto_init
|
||||
export BASELIBS = $(shell echo $(BL)|sed 's/[^ ]*hwtimer.a//')
|
||||
export BASELIBS = $(USEMODULE:%= $(BINDIR)%.a)
|
||||
|
||||
CFLAGS += $(EXTDEFINES)
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
ifneq (,$(filter ltc4150,$(USEMODULE)))
|
||||
ifeq (,$(filter hwtimer,$(USEMODULE)))
|
||||
USEMODULE += hwtimer
|
||||
endif
|
||||
endif
|
@ -58,5 +58,3 @@ valgrind:
|
||||
# echo 0 > /proc/sys/kernel/yama/ptrace_scope
|
||||
# VALGRIND_FLAGS += --db-attach=yes
|
||||
$(VALGRIND) $(VALGRIND_FLAGS) $(ELF) $(PORT)
|
||||
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "cpu.h"
|
||||
#include "lpm.h"
|
||||
#include "thread.h"
|
||||
#include "hwtimer.h"
|
||||
|
||||
#ifdef MODULE_AUTO_INIT
|
||||
#include <auto_init.h>
|
||||
@ -70,6 +71,8 @@ void kernel_init(void)
|
||||
dINT();
|
||||
printf("kernel_init(): This is RIOT! (Version: %s)\n", VERSION);
|
||||
|
||||
hwtimer_init();
|
||||
|
||||
if (thread_create(idle_stack, sizeof(idle_stack), PRIORITY_IDLE, CREATE_WOUT_YIELD | CREATE_STACKTEST, idle_thread, idle_name) < 0) {
|
||||
printf("kernel_init(): error creating idle task.\n");
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ USEMODULE += shell_commands
|
||||
USEMODULE += posix
|
||||
USEMODULE += ps
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += hwtimer
|
||||
USEMODULE += random
|
||||
USEMODULE += transceiver
|
||||
ifeq ($(BOARD),msba2)
|
||||
|
@ -32,7 +32,6 @@ export QUIET ?= 1
|
||||
USEMODULE += config
|
||||
USEMODULE += posix
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += hwtimer
|
||||
|
||||
USEMODULE += auto_init
|
||||
|
||||
|
@ -19,10 +19,6 @@
|
||||
|
||||
#include "auto_init.h"
|
||||
|
||||
#ifdef MODULE_HWTIMER
|
||||
#include "hwtimer.h"
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_SHT11
|
||||
#include "sht11.h"
|
||||
#endif
|
||||
@ -66,10 +62,6 @@ extern int main(void);
|
||||
|
||||
void auto_init(void)
|
||||
{
|
||||
#ifdef MODULE_HWTIMER
|
||||
DEBUG("Auto init hwtimer module.\n");
|
||||
hwtimer_init();
|
||||
#endif
|
||||
#ifdef MODULE_VTIMER
|
||||
DEBUG("Auto init vtimer module.\n");
|
||||
vtimer_init();
|
||||
|
@ -1,8 +1,4 @@
|
||||
export PROJECT = test_hwtimer_spin
|
||||
include ../Makefile.tests_common
|
||||
|
||||
# modules to include
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += hwtimer
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
@ -6,7 +6,6 @@ include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += hwtimer
|
||||
USEMODULE += nativenet
|
||||
USEMODULE += transceiver
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user