From efc2935ddbf22b95f31d1c633143a6e1fea4c3b9 Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Wed, 15 Jan 2014 16:27:40 +0100 Subject: [PATCH 1/3] test project for openwsn stack as a pkg --- test_openwsn_pkg/Makefile | 50 +++++++++++++++++++++++++++++++++++++++ test_openwsn_pkg/main.c | 7 ++++++ 2 files changed, 57 insertions(+) create mode 100644 test_openwsn_pkg/Makefile create mode 100644 test_openwsn_pkg/main.c diff --git a/test_openwsn_pkg/Makefile b/test_openwsn_pkg/Makefile new file mode 100644 index 0000000..910cff9 --- /dev/null +++ b/test_openwsn_pkg/Makefile @@ -0,0 +1,50 @@ +#### +#### Sample Makefile for building apps with the RIOT OS +#### +#### The Sample Filesystem Layout is: +#### /this makefile +#### ../RIOT +#### ../../boards for board definitions (if you have one or more) +#### + +# name of your project +export PROJECT = test_openwsn_pkg + +# for easy switching of boards +ifeq ($(strip $(BOARD)),) + export BOARD = telosb +endif + +# this has to be the absolute path of the RIOT-base dir +export RIOTBASE = $(CURDIR)/../../RIOT + +# uncomment this to enable scheduler statistics for ps +#CFLAGS += -DSCHEDSTATISTICS + +# If you want to use valgrind, you should recompile native with either +# HAVE_VALGRIND_H or HAVE_VALGRIND_VALGRIND_H depending on the location +# of the valgrind header (i.e. or ) +# For more information about the valgrind support of RIOT read: +# RIOT/cpu/native/README +#CFLAGS += -DHAVE_VALGRIND_VALGRIND_H +#CFLAGS += -DHAVE_VALGRIND_H + +# Uncomment this to enable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +#CFLAGS += -DDEVELHELP + +# Uncomment this to hide compiler invocation lines: +#QUIET = 1 + +EXTERNAL_MODULES+=$(RIOTBASE)/pkg/openwsn +USEMODULE += openwsn + +export INCLUDES += -I${RIOTBASE}/core/include/ -I${RIOTBASE}/sys/include/ -I${RIOTBASE}/drivers/include/ -I${RIOTBASE}/pkg/openwsn/RB-1.4/openwsn + +build: fetch all + +fetch: + make -C $(RIOTBASE)/pkg/openwsn patch + +include $(RIOTBASE)/Makefile.include diff --git a/test_openwsn_pkg/main.c b/test_openwsn_pkg/main.c new file mode 100644 index 0000000..7febb40 --- /dev/null +++ b/test_openwsn_pkg/main.c @@ -0,0 +1,7 @@ +#include "openwsn.h" + + +void main(void) { + openwsn_start_thread(); + while (1); // this line should never be reached +} From ef765721633eca0b9e8cc1bd22eb7cedb84c6ada Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Thu, 16 Jan 2014 21:35:14 +0100 Subject: [PATCH 2/3] added openwsn header to PROJDEP --- test_openwsn_pkg/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test_openwsn_pkg/Makefile b/test_openwsn_pkg/Makefile index 910cff9..98f237e 100644 --- a/test_openwsn_pkg/Makefile +++ b/test_openwsn_pkg/Makefile @@ -42,9 +42,14 @@ USEMODULE += openwsn export INCLUDES += -I${RIOTBASE}/core/include/ -I${RIOTBASE}/sys/include/ -I${RIOTBASE}/drivers/include/ -I${RIOTBASE}/pkg/openwsn/RB-1.4/openwsn -build: fetch all - -fetch: - make -C $(RIOTBASE)/pkg/openwsn patch +# build: fetch all +# +# fetch: +# make -C $(RIOTBASE)/pkg/openwsn patch + +export PROJDEPS = openwsn.h include $(RIOTBASE)/Makefile.include + +openwsn.h: + $(MAKE) -C $(EXTERNAL_MODULES) patch From 8b0be988d42f9b2e90a3c6dcd936bcd75d4dca0d Mon Sep 17 00:00:00 2001 From: Thomas Eichinger Date: Mon, 20 Jan 2014 12:42:55 +0100 Subject: [PATCH 3/3] added distclean target --- test_openwsn_pkg/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_openwsn_pkg/Makefile b/test_openwsn_pkg/Makefile index 98f237e..9e2aeab 100644 --- a/test_openwsn_pkg/Makefile +++ b/test_openwsn_pkg/Makefile @@ -51,5 +51,8 @@ export PROJDEPS = openwsn.h include $(RIOTBASE)/Makefile.include +distclean: clean + $(MAKE) -C $(EXTERNAL_MODULES) distclean + openwsn.h: - $(MAKE) -C $(EXTERNAL_MODULES) patch + $(MAKE) -C $(EXTERNAL_MODULES) all