diff --git a/Makefile.unsupported b/Makefile.unsupported new file mode 100644 index 0000000..fe71826 --- /dev/null +++ b/Makefile.unsupported @@ -0,0 +1,6 @@ +.PHONY: all clean + +all: + $(error Project $(PROJECT) currently not supported for $(BOARD)) + +clean: all diff --git a/default-native/Makefile b/default-native/Makefile index e5cf79b..dcb5273 100644 --- a/default-native/Makefile +++ b/default-native/Makefile @@ -11,6 +11,10 @@ export BOARD = native export RIOTBASE =$(CURDIR)/../../RIOT export RIOTBOARD =$(CURDIR)/../../boards +ifeq (,$(findstring native,$(BOARD))) +include $(CURDIR)/../Makefile.unsupported +else + ## Modules to include. USEMODULE += auto_init @@ -36,5 +40,5 @@ USEMODULE += uart0 export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTBASE)/cpu/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ include $(RIOTBASE)/Makefile.include - debug: all +endif diff --git a/default/Makefile b/default/Makefile index 5ce5f32..57cd22e 100644 --- a/default/Makefile +++ b/default/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -16,18 +16,16 @@ ifeq ($(strip $(BOARD)),) endif # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT -export RIOTCPU =$(CURDIR)/../../RIOT/cpu +export RIOTBASE =$(CURDIR)/../RIOT +export RIOTCPU =$(CURDIR)/../RIOT/cpu export RIOTBOARD =$(CURDIR)/../../boards -USEMODULE += config USEMODULE += posix USEMODULE += uart0 USEMODULE += shell USEMODULE += shell_commands USEMODULE += ps USEMODULE += vtimer -#USEMODULE += fat USEMODULE += auto_init ifneq (,$(findstring wsn430-v1_3b,$(BOARD))) USEMODULE += cc110x_ng @@ -44,8 +42,13 @@ ifneq (,$(findstring msba2,$(BOARD))) USEMODULE += rtc USEMODULE += mci USEMODULE += cc110x_ng + USEMODULE += config +endif +ifneq (,$(findstring native,$(BOARD))) + USEMODULE += nativenet + USEMODULE += transceiver endif -export INCLUDES = -I${RIOTBASE}/core/include/ -I${RIOTBASE}/sys/include/ -I${RIOTBASE}/drivers/include/ +export INCLUDES = -I${RIOTBASE}/core/include/ -I${RIOTBASE}/sys/include/ -I${RIOTBASE}/drivers/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include include $(RIOTBASE)/Makefile.include diff --git a/hello-world-blinker/Makefile b/hello-world-blinker/Makefile index 42f6676..54a2f6d 100644 --- a/hello-world-blinker/Makefile +++ b/hello-world-blinker/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -16,7 +16,7 @@ ifeq ($(strip $(BOARD)),) endif # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT +export RIOTBASE =$(CURDIR)/../RIOT export RIOTBOARD =$(CURDIR)/../../boards ifeq ($(BOARD),stm32f4discovery) @@ -25,15 +25,8 @@ endif ## Modules to include. -#USEMODULE += shell -#USEMODULE += uart0 -#USEMODULE += posix USEMODULE += vtimer USEMODULE += auto_init -#USEMODULE += sht11 -#USEMODULE += ltc4150 -#USEMODULE += cc110x -#USEMODULE += fat export INCLUDES=-I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ diff --git a/hello-world-blinker/main.c b/hello-world-blinker/main.c index f9e0ad5..0fb25ed 100644 --- a/hello-world-blinker/main.c +++ b/hello-world-blinker/main.c @@ -6,13 +6,15 @@ #define SEC (1000 * MSEC) int main(void) { - LED_RED_ON(); + LED_RED_ON; printf("Hello World!\n"); vtimer_usleep(5 * SEC); - LED_RED_OFF(); - LED_GREEN_ON(); + LED_RED_OFF; +#ifdef LED_GREEN_ON + LED_GREEN_ON; +#endif printf("done!\n"); return 0; diff --git a/hello-world-timer/main.c b/hello-world-timer/main.c index 57291c6..0a0f80d 100644 --- a/hello-world-timer/main.c +++ b/hello-world-timer/main.c @@ -13,15 +13,17 @@ char timer_over_buf[KERNEL_CONF_STACKSIZE_MAIN]; void blinker(void) { while(1) { - LED_RED_TOGGLE(); + LED_RED_TOGGLE; vtimer_usleep(SEC); } } int main(void) { - LED_RED_ON(); - LED_GREEN_OFF(); + LED_RED_ON; +#ifdef LED_GREEN_OFF + LED_GREEN_OFF; +#endif timer_over_pid = thread_create(timer_over_buf, KERNEL_CONF_STACKSIZE_MAIN, @@ -31,7 +33,9 @@ int main(void) { "blinker"); while(1) { - LED_GREEN_TOGGLE(); +#ifdef LED_GREEN_TOGGLE + LED_GREEN_TOGGLE; +#endif vtimer_usleep(SEC); } diff --git a/hello-world/Makefile b/hello-world/Makefile index fe800ec..6b69897 100644 --- a/hello-world/Makefile +++ b/hello-world/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -16,7 +16,7 @@ ifeq ($(strip $(BOARD)),) endif # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT +export RIOTBASE =$(CURDIR)/../RIOT export RIOTBOARD =$(CURDIR)/../../boards ifeq ($(BOARD),stm32f4discovery) diff --git a/hello-world/main.c b/hello-world/main.c index 7fb68d0..52f2a78 100644 --- a/hello-world/main.c +++ b/hello-world/main.c @@ -2,7 +2,7 @@ int main(void) { - puts("Hello foobar!\n"); + puts("Hello World!\n"); while(1); } diff --git a/libcppa/.gitignore b/libcppa/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/pingpong/Makefile b/pingpong/Makefile index f3985e5..9eebee1 100644 --- a/pingpong/Makefile +++ b/pingpong/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -16,21 +16,10 @@ ifeq ($(strip $(BOARD)),) endif # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT -export RIOTCPU =$(CURDIR)/../../RIOT/cpu +export RIOTBASE =$(CURDIR)/../RIOT +export RIOTCPU =$(CURDIR)/../RIOT/cpu export RIOTBOARD =$(CURDIR)/../../boards -## Modules to include. - -#USEMODULE += shell -#USEMODULE += uart0 -#USEMODULE += posix -#USEMODULE += vtimer -#USEMODULE += sht11 -#USEMODULE += ltc4150 -#USEMODULE += cc110x -#USEMODULE += fat - export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ include $(RIOTBASE)/Makefile.include diff --git a/pingpong_sync/Makefile b/pingpong_sync/Makefile index f3985e5..9eebee1 100644 --- a/pingpong_sync/Makefile +++ b/pingpong_sync/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -16,21 +16,10 @@ ifeq ($(strip $(BOARD)),) endif # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT -export RIOTCPU =$(CURDIR)/../../RIOT/cpu +export RIOTBASE =$(CURDIR)/../RIOT +export RIOTCPU =$(CURDIR)/../RIOT/cpu export RIOTBOARD =$(CURDIR)/../../boards -## Modules to include. - -#USEMODULE += shell -#USEMODULE += uart0 -#USEMODULE += posix -#USEMODULE += vtimer -#USEMODULE += sht11 -#USEMODULE += ltc4150 -#USEMODULE += cc110x -#USEMODULE += fat - export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ include $(RIOTBASE)/Makefile.include diff --git a/sixlowpan/Makefile b/sixlowpan/Makefile index 19fb0db..e6d713c 100644 --- a/sixlowpan/Makefile +++ b/sixlowpan/Makefile @@ -3,7 +3,7 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) #### @@ -15,8 +15,12 @@ ifeq ($(strip $(BOARD)),) export BOARD=msba2 endif +ifneq (,$(findstring msb-430,$(BOARD))) +include $(CURDIR)/../Makefile.unsupported +else + # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT +export RIOTBASE =$(CURDIR)/../RIOT export RIOTBOARD =$(CURDIR)/../../boards ifeq ($(BOARD),stm32f4discovery) @@ -31,10 +35,16 @@ USEMODULE += posix USEMODULE += vtimer USEMODULE += auto_init USEMODULE += timex -USEMODULE += cc110x_ng USEMOUDLE += net_help USEMODULE += sixlowpan +USEMODULE += transceiver +ifeq ($(BOARD),msba2) + USEMODULE += cc110x_ng +else ifeq ($(BOARD),native) + USEMODULE += nativenet +endif export INCLUDES=-I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ -I$(RIOTBASE)/drivers/cc110x_ng/include/ -I$(RIOTBASE)/sys/net/sixlowpan/include/ include $(RIOTBASE)/Makefile.include +endif diff --git a/sixlowpan/main.c b/sixlowpan/main.c index cf72c80..4bb26b3 100644 --- a/sixlowpan/main.c +++ b/sixlowpan/main.c @@ -112,20 +112,6 @@ void send_packet(char *str){ } } -void set_radio_chann(char *str){ - uint16_t chann; - int res = sscanf(str, "set_chann %hu", &chann); - if(res < 1){ - printf("Usage: set_chann [channel]\n"); - } - - cc110x_set_channel(chann); -} - -void get_r_address(char *str){ - printf("radio: %hu\n", cc110x_get_address()); -} - void ip(char *str){ ipv6_iface_print_addrs(); } @@ -146,8 +132,6 @@ void context(char *str){ const shell_command_t shell_commands[] = { {"send", "", send_packet}, {"init", "", init}, - {"addr", "", get_r_address}, - {"set_chann", "", set_radio_chann}, {"boot", "", bootstrapping}, {"ip", "", ip}, {"context", "", context}, @@ -159,12 +143,6 @@ int main(void) { vtimer_init(); posix_open(uart0_handler_pid, 0); - //struct tm now; - //rtc_get_localtime(&now); - - //srand((unsigned int)now.tm_sec); - //uint8_t random = rand() % 256; - //printf("address: %d\n", random); shell_t shell; shell_init(&shell, shell_commands, uart0_readc, uart0_putc); diff --git a/test_bloom/Makefile b/test_bloom/Makefile index fa0119e..f2c7bf7 100644 --- a/test_bloom/Makefile +++ b/test_bloom/Makefile @@ -15,6 +15,9 @@ ifeq ($(strip $(BOARD)),) export BOARD = msba2 endif +ifneq (,$(findstring msb-430,$(BOARD))) +include $(CURDIR)/../Makefile.unsupported +else # this has to be the absolute path of the RIOT-base dir export RIOTBASE =$(CURDIR)/../../RIOT export RIOTBOARD =$(CURDIR)/../../boards @@ -39,6 +42,7 @@ USEMODULE += bloom export INCLUDES = -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/core/include -I$(RIOTCPU)/$(CPU)/include -I$(RIOTBASE)/sys/lib -I$(RIOTBASE)/sys/include/ -I$(RIOTBASE)/drivers/include/ include $(RIOTBASE)/Makefile.include +endif sets: generate_sets.py words.txt.gz ./generate_sets.py 10000 20 diff --git a/test_cc110x_ng/Makefile b/test_cc110x_ng/Makefile index 3ccbd1f..b5f7881 100644 --- a/test_cc110x_ng/Makefile +++ b/test_cc110x_ng/Makefile @@ -15,6 +15,10 @@ ifeq ($(strip $(BOARD)),) export BOARD = msba2 endif +ifneq ($(BOARD),msba2) +include $(CURDIR)/../Makefile.unsupported +else + # this has to be the absolute path of the RIOT-base dir export RIOTBASE =$(CURDIR)/../../RIOT export RIOTCPU =$(CURDIR)/../../RIOT/cpu @@ -33,3 +37,4 @@ USEMODULE += auto_init export INCLUDES = -I${RIOTBASE}/core/include/ -I${RIOTBASE}/sys/include/ -I${RIOTBASE}/drivers/include/ -I${RIOTBASE}/drivers/cc110x_ng/include/ include $(RIOTBASE)/Makefile.include +endif diff --git a/test_thread_basic/main.c b/test_thread_basic/main.c index 02d7bbf..7e56005 100644 --- a/test_thread_basic/main.c +++ b/test_thread_basic/main.c @@ -3,7 +3,7 @@ #include #include -#define STACK_SIZE (8192) +#define STACK_SIZE (KERNEL_CONF_STACKSIZE_DEFAULT + KERNEL_CONF_STACKSIZE_PRINTF) char t2_stack[STACK_SIZE]; diff --git a/test_thread_exit/main.c b/test_thread_exit/main.c index aec8cf4..7584082 100644 --- a/test_thread_exit/main.c +++ b/test_thread_exit/main.c @@ -9,7 +9,7 @@ void second_thread(void) { puts("2nd: running..."); } -char second_thread_stack[8192]; +char second_thread_stack[KERNEL_CONF_STACKSIZE_DEFAULT + KERNEL_CONF_STACKSIZE_PRINTF]; int main(void) { diff --git a/tlayer/Makefile b/tlayer/Makefile index a83a3ab..9642d8e 100644 --- a/tlayer/Makefile +++ b/tlayer/Makefile @@ -3,9 +3,9 @@ #### #### The Sample Filesystem Layout is: #### /this makefile -#### ../../RIOT +#### ../RIOT #### ../../boards for board definitions (if you have one or more) -#### +#### # name of your project export PROJECT =tlayer @@ -15,9 +15,13 @@ ifeq ($(strip $(BOARD)),) export BOARD = msba2 endif +ifneq (,$(findstring msb-430,$(BOARD))) +include $(CURDIR)/../Makefile.unsupported +else + # this has to be the absolute path of the RIOT-base dir -export RIOTBASE =$(CURDIR)/../../RIOT -export RIOTCPU =$(CURDIR)/../../RIOT/cpu +export RIOTBASE =$(CURDIR)/../RIOT +export RIOTCPU =$(CURDIR)/../RIOT/cpu export RIOTBOARD =$(CURDIR)/../../boards ## Modules to include. @@ -28,7 +32,12 @@ USEMODULE += ps USEMODULE += shell USEMODULE += shell_commands USEMODULE += config +ifeq ($(BOARD),native) + USEMODULE += nativenet +else ifeq($(BOARD),msba2) USEMODULE += cc110x_ng +endif +USEMODULE += transceiver USEMODULE += net_help USEMODULE += sixlowpan USEMODULE += destiny @@ -39,3 +48,4 @@ USEMODULE += ltc4150 export INCLUDES += -I$(RIOTBASE)/sys/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/drivers/cc110x_ng/include -I$(RIOTBASE)/sys/net/destiny -I$(RIOTBASE)/sys/net/sixlowpan/include -I$(RIOTBASE)/sys/net/net_help include $(RIOTBASE)/Makefile.include +endif diff --git a/tlayer/tlayer.h b/tlayer/tlayer.h index fa3913a..549fd49 100644 --- a/tlayer/tlayer.h +++ b/tlayer/tlayer.h @@ -1,7 +1,7 @@ #ifndef TLAYER_H #define TLAYER_H -#include +#include "ipv6.h" #define SEND_TCP_THREAD_SIZE (4500) #define TCP_CLOSE_THREAD_STACK_SIZE (4500) diff --git a/tlayer/tlayer_shell.c b/tlayer/tlayer_shell.c index 513f80c..c57fe59 100644 --- a/tlayer/tlayer_shell.c +++ b/tlayer/tlayer_shell.c @@ -9,6 +9,7 @@ #include "sixlowpan.h" #include "ipv6.h" +#include "sixlowpan/ndp.h" #include "socket.h" @@ -165,7 +166,7 @@ void context(char *str) uint8_t i; lowpan_context_t *context; - for(i = 0; i < LOWPAN_CONTEXT_MAX; i++) { + for(i = 0; i < NDP_6LOWPAN_CONTEXT_MAX; i++) { context = lowpan_context_num_lookup(i); if(context != NULL) {