Skip to content
ejoerns edited this page Dec 14, 2013 · 5 revisions

This tutorial describes how to create a new project using contiki(-inga).

Prerequisites: Directory with a clone of Contiki

Basic Setup

  1. Create a directory for your project somewhere.

     mkdir myproject
    
  2. Create a Makefile with the following structure:

     CONTIKI_PROJECT = myproject
    
     all: $(CONTIKI_PROJECT)
    
     PROJECT_SOURCEFILES = file1.c file2.c
    
     CONTIKI = /path/to/contiki
     include $(CONTIKI)/Makefile.include
    
    1. Replace myproject with the main file of your project
    2. Add other sourcefiles to PROJECT_SOURCEFILES
    3. Set CONTIKI to the path where your Contiki is located
  3. Create a project configuration file

     touch project-conf.h
    
  4. Save your target platform

     make TARGET=inga savetarget
    

Fubar

Tell compiler to use project conf.h

-DPROJECT_CONF_H=project-conf.h

Using Apps

In your projects Makefile type

APPS = app-name1 app-name2