Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test application for OpenWSN on RIOT #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions test_openwsn_pkg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
####
#### 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 = iot-lab_M3
endif

# this has to be the absolute path of the RIOT-base dir
export RIOTBASE = $(CURDIR)/../../RIOT

ifeq ($(BOARD),iot-lab_M3)
include Makefile.$(BOARD)
endif

# 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

USEPKG += openwsn

export INCLUDES += -I${RIOTBASE}/drivers/include/ \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-I${RIOTBASE}/drivers/include/ is already in the default includes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it does not build if I dismiss this include...

-I${RIOTBASE}/pkg/openwsn/RB-1.4/openwsn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom includes for modules were replaces by Makefile.includes through ${RIOTBASE}/Makefile.include:

-include $(USEPKG:%=$(RIOTBASE)/pkg/%/Makefile.include)


include $(RIOTBASE)/Makefile.include

distclean: clean
$(MAKE) -C $(RIOTBASE)/pkg/$(USEPKG) distclean
5 changes: 5 additions & 0 deletions test_openwsn_pkg/Makefile.iot-lab_M3
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export RIOTBOARD =$(CURDIR)/../../thirdparty_boards
export RIOTCPU =$(CURDIR)/../../thirdparty_cpu

reset:
$(RIOTCPU)/$(CPU)/tools/reset.sh
16 changes: 16 additions & 0 deletions test_openwsn_pkg/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* main.c - Test application for OpenWSN on RIOT
* Copyright (C) 2014 Thomas Eichinger
*
* Author : Thomas Eichinger <[email protected]>
*
* This file subject to the terms and conditions of the LGPLv2. See the file
* LICENSE in the top level directory for more details.
*/

#include "openwsn.h"

void main(void)
{
openwsn_start_thread();
}