Commit 621cfc70 authored by yoogx's avatar yoogx
Browse files

Merge branch 'master' of https://github.com/yoogx/polyorb-hi-c

parents 75a79b3f b26b4708
......@@ -182,6 +182,7 @@ AC_OUTPUT([
examples/aadlv1/rma/Makefile
examples/aadlv1/sunseeker/Makefile
examples/aadlv2/Makefile
examples/aadlv2/cpp/Makefile
examples/aadlv2/d3.1.3-1/Makefile
examples/aadlv2/import/Makefile
examples/aadlv2/ping/Makefile
......
SUBDIRS = d3.1.3-1 ping rma sunseeker producer-consumer some-types \
some-types-stdint flight-mgmt import monitor packet-store file-store lua
some-types-stdint flight-mgmt import monitor packet-store \
file-store lua cpp
SAMPLE_DIR = ${shell $(CYGPATH_U) '$(OCARINA_PREFIX)/examples/ocarina/polyorb-hi-c/aadlv2'}
......
C_FILES = $(srcdir)/hello.cc
AADL_FILES = $(srcdir)/cpp_test.aadl
SCENARIO_FILES = $(srcdir)/scenario.aadl
include $(srcdir)/../../Makefile.common
EXTRA_DIST = $(AADL_FILES) $(SCENARIO_FILES) $(C_FILES)
CLEANDIRS = cpp_test_impl
package CPP_Test
public
with Deployment;
-----------------
-- Subprograms --
-----------------
subprogram Hello_Spg_1
properties
source_language => (CPP);
source_name => "hello_world";
source_text => ("hello.cc");
end Hello_Spg_1;
-------------
-- Threads --
-------------
thread Task
end Task;
thread implementation Task.impl_1
calls
Mycalls: {
P_Spg : subprogram Hello_Spg_1;
};
properties
Dispatch_Protocol => periodic;
Period => 1000ms;
end Task.impl_1;
---------------
-- Processor --
---------------
processor cpurm
properties
Deployment::Execution_Platform => Native;
end cpurm;
processor implementation cpurm.impl
properties
Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol);
end cpurm.impl;
---------------
-- Processes --
---------------
process node_a
end node_a;
process implementation node_a.impl
subcomponents
Task1 : thread Task.impl_1;
end node_a.impl;
------------
-- System --
------------
system cpp_test
end cpp_test;
system implementation cpp_test.impl
subcomponents
node_a : process node_a.impl;
cpu_rm : processor cpurm.impl;
properties
Actual_Processor_Binding => (reference (cpu_rm)) applies to node_a;
end cpp_test.impl;
end CPP_Test;
#ifdef __cplusplus
extern "C" {
void hello_world (void);
}
#endif
#include<iostream>
void hello_world (void)
{
std::cout << "Hello, new world!\n";
}
system cpp
properties
Ocarina_Config::AADL_Files =>
("cpp_test.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end cpp;
system implementation cpp.Impl
end cpp.Impl;
......@@ -11,6 +11,12 @@ include $(RUNTIME_PATH)/make/Makefile.$(TARGET)
build-node: compile-node generate-doc
ifneq ($(USE_CPP_LINKER),)
LD=$(LD_CPP)
endif
################################################################################
# Configuration
#
......@@ -222,7 +228,7 @@ $(BINARY):
@if [ ! -d $$RTEMS_MAKEFILE_PATH/make ]; then \
echo "Please define the RTEMS_MAKEFILE_PATH variable, exiting" ; \
else \
$(MAKE) generate-asn1-deployment compile-c-files compile-ada-files target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) ; \
$(MAKE) generate-asn1-deployment compile-c-files compile-cpp-files compile-ada-files target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) ; \
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS) $(CFLAGS) ; \
fi
endif
......@@ -274,7 +280,7 @@ $(BINARY):
@if [ ! -f ccomp ]; then \
echo "Compcert not installed, exiting" ; \
else \
$(MAKE) generate-asn1-deployment compile-c-files compile-ada-files target-objects compile-po-hi $(GENERATED_OBJS) $(TARGET_OBJECTS); \
$(MAKE) generate-asn1-deployment compile-c-files compile-cpp-files compile-ada-files target-objects compile-po-hi $(GENERATED_OBJS) $(TARGET_OBJECTS); \
for v in $(USER_OBJS); do mv ../../$$v . ; done ; \
mkdir -p drivers; \
for v in $(PO_HI_OBJS); do mv $(RUNTIME_PATH)/src/$$v $$v ; done; \
......@@ -285,7 +291,7 @@ endif
ifeq ($(TARGET), $(filter $(TARGET), native bench linux32 linux64))
EXE=$(BINARY)
$(BINARY):
$(MAKE) generate-asn1-deployment target-objects compile-c-files compile-ada-files compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(MAKE) generate-asn1-deployment target-objects compile-c-files compile-cpp-files compile-ada-files compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(LD) -o $(EXE) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment