From e528b527e65421b8a6aa68bbb9e2a3b235a9ea6e Mon Sep 17 00:00:00 2001 From: fros4943 Date: Mon, 23 Oct 2006 16:07:29 +0000 Subject: [PATCH] moved cooja cfs files from /dev to /cfs --- platform/cooja/Makefile.cooja | 9 +++++++-- platform/cooja/{dev => cfs}/cfs-cooja.c | 6 +++--- platform/cooja/{dev => cfs}/cfs-cooja.h | 2 +- tools/cooja/config/code_main_template | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) rename platform/cooja/{dev => cfs}/cfs-cooja.c (97%) rename platform/cooja/{dev => cfs}/cfs-cooja.h (96%) diff --git a/platform/cooja/Makefile.cooja b/platform/cooja/Makefile.cooja index cde612b53..04552c39a 100644 --- a/platform/cooja/Makefile.cooja +++ b/platform/cooja/Makefile.cooja @@ -1,4 +1,4 @@ -# $Id: Makefile.cooja,v 1.7 2006/10/11 14:14:41 fros4943 Exp $ +# $Id: Makefile.cooja,v 1.8 2006/10/23 16:07:29 fros4943 Exp $ ## The COOJA Simulator Contiki platform Makefile ## @@ -25,7 +25,7 @@ MAINFILE = $(OUTPUT_DIR)/$(TYPEID).co ### Define COOJA core interfaces COOJA = $(CONTIKI)/platform/$(TARGET) -CONTIKI_TARGET_DIRS = . dev lib sys +CONTIKI_TARGET_DIRS = . dev lib sys cfs COOJA_BASE = simEnvChange.c irq.c cooja_mt.c cooja_mtarch.c @@ -64,6 +64,11 @@ vpath %.c $(PROJECTDIRS) \ ### Define custom targets $(LIBFILE): $(MAINFILE) $(PROJECT_OBJECTFILES) $(DEPFILE) + ${CONTIKI}/tools/make-symbols-nm $(LIBFILE) + $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o + $(LD) -Map=$(MAPFILE) -shared $(LD_ARGS_1) -o $@ $^ $(LD_ARGS_2) + ${CONTIKI}/tools/make-symbols-nm $(LIBFILE) + $(CC) $(CFLAGS) -c symbols.c -o $(OBJECTDIR)/symbols.o $(LD) -Map=$(MAPFILE) -shared $(LD_ARGS_1) -o $@ $^ $(LD_ARGS_2) $(DEPFILE): ${addprefix $(OBJECTDIR)/, $(CONTIKI_SOURCEFILES:.c=.o)} diff --git a/platform/cooja/dev/cfs-cooja.c b/platform/cooja/cfs/cfs-cooja.c similarity index 97% rename from platform/cooja/dev/cfs-cooja.c rename to platform/cooja/cfs/cfs-cooja.c index 736af32e4..781020c87 100644 --- a/platform/cooja/dev/cfs-cooja.c +++ b/platform/cooja/cfs/cfs-cooja.c @@ -28,10 +28,10 @@ * * This file is part of the Contiki operating system. * - * $Id: cfs-cooja.c,v 1.1 2006/10/11 14:16:10 fros4943 Exp $ + * $Id: cfs-cooja.c,v 1.1 2006/10/23 16:07:29 fros4943 Exp $ */ #include -#include "dev/cfs-cooja.h" +#include "cfs/cfs-cooja.h" #include "lib/simEnvChange.h" #include "cfs/cfs.h" @@ -51,7 +51,7 @@ const struct simInterface cfs_interface; // COOJA variables #define CFS_BUF_SIZE 60*1024 -char simCFSData[CFS_BUF_SIZE]; +char simCFSData[CFS_BUF_SIZE] = { 0 }; char simCFSChanged = 0; int simCFSRead = 0; int simCFSWritten = 0; diff --git a/platform/cooja/dev/cfs-cooja.h b/platform/cooja/cfs/cfs-cooja.h similarity index 96% rename from platform/cooja/dev/cfs-cooja.h rename to platform/cooja/cfs/cfs-cooja.h index c437aa5ce..fa98d7d62 100644 --- a/platform/cooja/dev/cfs-cooja.h +++ b/platform/cooja/cfs/cfs-cooja.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cfs-cooja.h,v 1.1 2006/10/11 14:16:10 fros4943 Exp $ + * $Id: cfs-cooja.h,v 1.1 2006/10/23 16:07:29 fros4943 Exp $ */ #ifndef __CFS_COOJA_H__ #define __CFS_COOJA_H__ diff --git a/tools/cooja/config/code_main_template b/tools/cooja/config/code_main_template index ae6ec79f7..a42a115b6 100644 --- a/tools/cooja/config/code_main_template +++ b/tools/cooja/config/code_main_template @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: code_main_template,v 1.11 2006/10/11 14:16:47 fros4943 Exp $ + * $Id: code_main_template,v 1.12 2006/10/23 16:09:15 fros4943 Exp $ */ /** @@ -70,7 +70,7 @@ #include "lib/sensors.h" #include "net/uip.h" #include "dev/radio-arch.h" -#include "dev/cfs-cooja.h" +#include "cfs/cfs-cooja.h" #include "sys/etimer.h" #include "sys/cooja_mt.h"