[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5886] added C++ support for omap programs
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5886] added C++ support for omap programs |
Date: |
Wed, 15 Sep 2010 13:02:05 +0000 |
Revision: 5886
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5886
Author: poine
Date: 2010-09-15 13:02:05 +0000 (Wed, 15 Sep 2010)
Log Message:
-----------
added C++ support for omap programs
Modified Paths:
--------------
paparazzi3/trunk/conf/Makefile.omap
Added Paths:
-----------
paparazzi3/trunk/conf/airframes/Poine/test_libeknav.xml
Modified: paparazzi3/trunk/conf/Makefile.omap
===================================================================
--- paparazzi3/trunk/conf/Makefile.omap 2010-09-15 05:02:56 UTC (rev 5885)
+++ paparazzi3/trunk/conf/Makefile.omap 2010-09-15 13:02:05 UTC (rev 5886)
@@ -1,7 +1,7 @@
# Hey Emacs, this is a -*- makefile -*-
#
# $Id$
-# Copyright (C) 2009 Antoine Drouin
+# Copyright (C) 2009-2010 The Paparazzi Team
#
# This file is part of paparazzi.
#
@@ -53,7 +53,6 @@
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
#CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
#CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-#CFLAGS += -mtune=geode # optimize for geode
# flags only for C
CFLAGS + = -Wstrict-prototypes -Wmissing-declarations
@@ -62,9 +61,19 @@
CFLAGS += $($(TARGET).CFLAGS)
-SRCOMAP = $($(TARGET).srcs)
-COBJOMAP = $(SRCOMAP:%.c=$(OBJDIR)/%.o)
+CXX =
/opt/paparazzi/omap/overo-oe/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++
+CXXFLAGS = -pipe -O3 -fshow-column -ffast-math -DEIGEN_DONT_VECTORIZE -fPIC
+CXXFLAGS += -DEIGEN_DONT_ALIGN -DNDEBUG -g -ffunction-sections -fdata-sections
-DTIME_OPS
+CXXFLAGS += -Wall -Wextra
+CXXFLAGS += $($(TARGET).CXXFLAGS)
+
+SRC_C_OMAP = $($(TARGET).srcs)
+OBJ_C_OMAP = $(SRC_C_OMAP:%.c=$(OBJDIR)/%.o)
+
+SRC_CPP_OMAP = $($(TARGET).cpp_srcs)
+OBJ_CPP_OMAP = $(SRC_CPP_OMAP:%.cpp=$(OBJDIR)/%.o)
+
all: build
build: elf
@@ -77,17 +86,25 @@
# Link: create ELF output file from object files.
.SECONDARY : $(OBJDIR)/$(TARGET).elf
-.PRECIOUS : $(COBJOMAP)
-%.elf: $(COBJOMAP)
+.PRECIOUS : $(OBJ_C_OMAP) $(OBJ_CPP_OMAP)
+%.elf: $(OBJ_C_OMAP) $(OBJ_CPP_OMAP)
@echo LD $@
- $(Q)$(CC) $(CFLAGS) $(COBJOMAP) --output $@ $(LDFLAGS)
$($(TARGET).LDFLAGS)
+ $(Q)if (expr "$($(TARGET).cpp_srcs)"); \
+ then $(CXX) $(CXXFLAGS) $(OBJ_CPP_OMAP) --output $@ $(LDFLAGS)
$($(TARGET).LDFLAGS) ; \
+ else $(CC) $(CFLAGS) $(OBJ_C_OMAP) --output $@ $(LDFLAGS)
$($(TARGET).LDFLAGS); fi
-# Compile: create object files from C source files. ARM-only
+# Compile: create object files from C source files
$(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac
@echo CC $@
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
$(Q)$(CC) -c $(CFLAGS) $< -o $@
+# Compile: create object files from C++ source files
+$(OBJDIR)/%.o : %.cpp $(OBJDIR)/../Makefile.ac
+ @echo CXX $@
+ $(Q)test -d $(dir $@) || mkdir -p $(dir $@)
+ $(Q)$(CXX) -c $(CXXFLAGS) $< -o $@
+
# Listing of phony targets.
.PHONY : all build elf clean clean_list
Added: paparazzi3/trunk/conf/airframes/Poine/test_libeknav.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/Poine/test_libeknav.xml
(rev 0)
+++ paparazzi3/trunk/conf/airframes/Poine/test_libeknav.xml 2010-09-15
13:02:05 UTC (rev 5886)
@@ -0,0 +1,27 @@
+<airframe name="FuckYou_1">
+
+
+ <makefile>
+
+ HOST=auto3
+
+ # test 1
+ test1.ARCHDIR = omap
+ test1.CXXFLAGS += -I
/opt/paparazzi/omap/overo-oe/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/eigen2
+ test1.cpp_srcs = fms/libeknav/hello_world.cpp
+
+ # test network based telemetry on overo (using udp_transport2/messages2)
+ overo_test_telemetry2.ARCHDIR = omap
+ overo_test_telemetry2.CFLAGS += -I$(ACINCLUDE) -I.
-I$(PAPARAZZI_HOME)/var/include
+ overo_test_telemetry2.srcs = fms/overo_test_telemetry2.c
+ overo_test_telemetry2.CFLAGS += -DDOWNLINK
-DDOWNLINK_TRANSPORT=UdpTransport
+ overo_test_telemetry2.srcs += fms/udp_transport2.c downlink.c
+ overo_test_telemetry2.srcs += fms/fms_network.c
+ overo_test_telemetry2.LDFLAGS += -levent
+
+ </makefile>
+
+
+</airframe>
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5886] added C++ support for omap programs,
antoine drouin <=