Commit 15efb75f authored by jdelange's avatar jdelange

* Introduce compcert compliance



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2652 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent ba948bdc
C_FILES = $(srcdir)/hello.c
AADL_FILES = $(srcdir)/rma.aadl \
$(srcdir)/rma-xenomai-posix.aadl \
$(srcdir)/rma-compcert.aadl \
$(srcdir)/rma-xenomai-native.aadl
SCENARIO_FILES = $(srcdir)/scenario.aadl \
$(srcdir)/scenario-compcert.aadl \
$(srcdir)/scenario-xenomai-native.aadl \
$(srcdir)/scenario-xenomai-posix.aadl
......
......@@ -2,8 +2,8 @@
#define _INC_1553_H
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:02
Date was: 6/5/2011
Time was: 14:44:03
*/
#include "asn1crt.h"
......
......@@ -2,8 +2,8 @@
#define _INC_IP_H
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:03
Date was: 6/5/2011
Time was: 14:44:05
*/
#include "asn1crt.h"
......
......@@ -2,8 +2,8 @@
#define _INC_SERIAL_H
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:04
Date was: 6/5/2011
Time was: 14:44:06
*/
#include "asn1crt.h"
......
......@@ -2,8 +2,8 @@
#define _INC_SPACEWIRE_H
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:04
Date was: 6/5/2011
Time was: 14:44:07
*/
#include "asn1crt.h"
......
......@@ -11,7 +11,7 @@
#ifndef __PO_HI_MAIN__
#define __PO_HI_MAIN__
int __po_hi_initialize ();
int __po_hi_initialize (void);
/*
* Invoke all functions to initialize tasks
* and network. Return __PO_HI_SUCCESS if there
......@@ -19,12 +19,12 @@ int __po_hi_initialize ();
* __PO_HI_ERROR_PTHREAD_BARRIER.
*/
void __po_hi_initialize_add_task ();
void __po_hi_initialize_add_task (void);
/*
* Declare that another task has to be initialized
*/
int __po_hi_wait_initialization ();
int __po_hi_wait_initialization (void);
/*
* Invoked by each node to wait initialization
* of other node. It is used by synchronize all
......@@ -35,7 +35,7 @@ int __po_hi_wait_initialization ();
*/
#ifdef __PO_HI_USE_GPROF
void __po_hi_wait_end_of_instrumentation ();
void __po_hi_wait_end_of_instrumentation (void);
/*
* Wait a certain amount of time to finish the
* execution of the system.
......@@ -43,7 +43,7 @@ void __po_hi_wait_end_of_instrumentation ();
#endif
int __po_hi_initialize_early ();
int __po_hi_initialize_early (void);
/*
* __po_hi_initialize_earlier() is used to perform
* some early initialization, before device
......
......@@ -36,7 +36,7 @@ int __po_hi_protected_unlock (__po_hi_protected_t protected_id);
* __PO_HI_ERROR_PTHREAD_MUTEX value
*/
int __po_hi_protected_init ();
int __po_hi_protected_init (void);
/*
* Initialize all variables to handle protected
* objects in PolyORB-HI-C
......
......@@ -80,7 +80,7 @@ typedef size_t __po_hi_stack_t;
* Initialize tasking entities
* Returns SUCCESS if there is no error.
*/
int __po_hi_initialize_tasking();
int __po_hi_initialize_tasking(void);
/*
* Create a periodic task.
......@@ -140,7 +140,7 @@ int __po_hi_create_generic_task (__po_hi_task_id id,
* are doing an infinite loop and never ends. It just
* used to avoid an infinite loop in the main thread.
*/
void __po_hi_wait_for_tasks ();
void __po_hi_wait_for_tasks (void);
/*
* Called by a periodic task, to wait for its next period
......@@ -167,7 +167,7 @@ int __po_hi_wait_for_next_period (__po_hi_task_id task);
/*
* Delete all the tasks that were created within the system.
*/
void __po_hi_tasks_killall ();
void __po_hi_tasks_killall (void);
#endif /* __PO_HI_TASK_H__ */
......@@ -6,6 +6,7 @@
* For more informations, please visit http://ocarina.enst.fr
*
* Copyright (C) 2007-2008, GET-Telecom Paris.
* Copyright (C) 2011, European Space Agency.
*/
#ifndef __PO_HI_TIME_H__
......
......@@ -5,6 +5,7 @@ EXTRA_DIST=$(srcdir)/Makefile.common \
$(srcdir)/Makefile.leon3-xm3 \
$(srcdir)/Makefile.leon3-xtratum \
$(srcdir)/Makefile.leon.rtems \
$(srcdir)/Makefile.compcert \
$(srcdir)/Makefile.linux32 \
$(srcdir)/Makefile.linux32-xenomai-native \
$(srcdir)/Makefile.linux32-xenomai-posix \
......
......@@ -7,7 +7,7 @@
CC = ucfront-gcc arm-linux-elf-gcc
CPP = ucfront-gcc arm-linux-elf-g++
TARGET_CFLAGS = -O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -mswp-byte-writes -DCONFIG_NDS_ROM8BIT -mcpu=arm946e-s -mfpu=fpe3 -DEMBED -D__PIC__ -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix -D__uClinux__ -DPOSIX=1
TARGET_CFLAGS = -O2 -g -fomit-frame-pointer -fno-common -fno-builtin -Wall -mswp-byte-writes -DCONFIG_NDS_ROM8BIT -mcpu=arm946e-s -mfpu=fpe3 -DEMBED -D__PIC__ -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix -D__uClinux__ -DPOSIX=1 $(GCC_GENERIC_FLAGS)
LD = arm-linux-elf-ld
TARGET_LDFLAGS = -Wl,-elf2flt -D__PIC__ -fpic -msingle-pic-base -mswp-byte-writes -lpthread -lrt
......
......@@ -8,7 +8,7 @@
CC = arm-linux-gcc
CPP = arm-linux-g++
TARGET_CFLAGS = -DPOSIX=1
TARGET_CFLAGS = -DPOSIX=1 $(GCC_GENERIC_FLAGS)
LD = arm-linux-ld
TARGET_LDFLAGS = -lpthread -lrt
......
......@@ -7,6 +7,7 @@
# Copyright (C) 2010-2011, European Space Agency (ESA).
#
GCC_GENERIC_CFLAGS=-Wall -g
all: build-node
......@@ -38,7 +39,7 @@ endif
GCC=$(CC)
CFLAGS=-Wall $(USER_CFLAGS) $(TARGET_CFLAGS) -g
CFLAGS=$(USER_CFLAGS) $(TARGET_CFLAGS)
CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS)
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS)
......@@ -265,6 +266,12 @@ $(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(U
$(make-exe)
endif
ifeq ($(TARGET), compcert)
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(GENERATED_OBJS) $(TARGET_OBJECTS)
for v in $(USER_OBJS); do mv ../../$$v . ; done
for v in $(PO_HI_OBJS); do mv $(RUNTIME_PATH)/src/$$v . ; done
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif
ifeq ($(TARGET), $(filter $(TARGET), native linux32 linux64 linux32-xenomai-posix linux32-xenomai-native))
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
......
TARGET_CFLAGS = -DPOSIX -D_POSIX_SOURCE -D_GNU_SOURCE -DCOMPCERT -flonglong -DHAVE_STDINT_H=1
TARGET_LDFLAGS = -lpthread -lrt
SIMULINK_LDFLAGS = -lm
CC = ccomp
LD = ccomp
GPROF = gprof
ifdef USE_GPROF
TARGET_LDFLAGS+=-pg
endif
target-clean:
target-objects:
......@@ -20,7 +20,7 @@ TARGET_SOURCES =
#TARGET_TRANSPORT_SOURCES = $(RUNTIME_PATH)/config/leon-rtems/config.c
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_POSIX -DGUMSTIX_RTEMS -mstructure-size-boundary=8 -mcpu=xscale -mfpu=vfp -mfloat-abi=soft
TARGET_CFLAGS = -DRTEMS_POSIX -DGUMSTIX_RTEMS -mstructure-size-boundary=8 -mcpu=xscale -mfpu=vfp -mfloat-abi=soft $(GCC_GENERIC_FLAGS)
TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
LD = arm-rtems4.10-ld
......
......@@ -25,7 +25,7 @@ TARGET_SOURCES =
#TARGET_TRANSPORT_SOURCES = $(RUNTIME_PATH)/config/leon-rtems/config.c
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_POSIX -DLEON_RTEMS
TARGET_CFLAGS = -DRTEMS_POSIX -DLEON_RTEMS $(GCC_GENERIC_FLAGS)
TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
LD = sparc-rtems-ld
......@@ -56,7 +56,9 @@ target-objects:
$(CC) $(INCLUDE) $(TARGET_INCLUDE) -D__PO_HI_USE_GPROF -Wall -c -o po_hi_gprof_rtems_leon.o $(RUNTIME_PATH)/src/po_hi_gprof_rtems_leon.c
else
target-objects:
endif
emulate-qemu: $(BINARY)
qemu-system-sparc -M at697 -nographic -kernel $(BINARY).exe
......@@ -21,7 +21,7 @@ GPROF = sparc-rtems-gprof
TARGET_SOURCES =
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_PURE -DSPARC_RTEMS -mcpu=v8 -I$(XTRATUM_PATH)/include -B$(RTEMS_PATH)/sparc-rtems/leon3xm3/lib --include xm_inc/config.h --include xm_inc/arch/arch_types.h -DXM_SRC -DXM3_RTEMS_MODE
TARGET_CFLAGS = -DRTEMS_PURE -DSPARC_RTEMS -mcpu=v8 -I$(XTRATUM_PATH)/include -B$(RTEMS_PATH)/sparc-rtems/leon3xm3/lib --include xm_inc/config.h --include xm_inc/arch/arch_types.h -DXM_SRC -DXM3_RTEMS_MODE $(GCC_GENERIC_FLAGS)
LD = sparc-rtems-gcc
TARGET_LDFLAGS = -lrtemsbsp -lc -lm -mcpu=v8 -msoft-float -qrtems -L$(XTRATUM_PATH)/lib -Wl,--defsym=PARTITION_START=$(call xpathstart,$(BINARY),../$(MAINAPP)_xtratum-conf.xml),--defsym=PARTITION_SIZE=$(call xpathsize,$(BINARY),../$(MAINAPP_xtratum-conf.xml)) -Ttext=$(call xpathstart,$(BINARY),../$(MAINAPP)_xtratum-conf.xml)
......
......@@ -3,7 +3,7 @@ RTEMS_COMMON_FLAGS = -mcpu=v8 -B$(RTEMS_PATH)/sparc-rtems/leon3xm3/lib -specs bs
RTEMS_PATH=$(RTEMS_MAKEFILE_PATH)/../../
EXTRA_CFLAGS += -DXM3_RTEMS_MODE
CFLAGS += $(CFLAGS_ARCH) $(RTEMS_COMMON_FLAGS) $(RTEMS_TESTS_FLAGS) -O2 $(EXTRA_CFLAGS)
CFLAGS += $(CFLAGS_ARCH) $(RTEMS_COMMON_FLAGS) $(RTEMS_TESTS_FLAGS) -O2 $(EXTRA_CFLAGS) $(GCC_GENERIC_FLAGS)
ASFLAGS += $(ASFLAGS_ARCH) $(RTEMS_COMMON_FLAGS) -O2
LDFLAGS += $(LDFLAGS_ARCH) $(RTEMS_COMMON_FLAGS) -msoft-float -qrtems -L$(XTRATUM_PATH)/lib
......
TARGET_CFLAGS = -DPOSIX -m32 -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_CFLAGS = -DPOSIX -m32 -D_POSIX_SOURCE -D_GNU_SOURCE $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = -lpthread -lrt -m32
SIMULINK_LDFLAGS = -lm
CC = gcc
......
XENOVER=$(shell xeno-config --version)
ifeq ($(XENOVER),2.4.4)
TARGET_CFLAGS = `xeno-config --xeno-cflags` -DXENO_NATIVE -D_POSIX_SOURCE -D_GNU_SOURCE -m32
TARGET_CFLAGS = `xeno-config --xeno-cflags` -DXENO_NATIVE -D_POSIX_SOURCE -D_GNU_SOURCE -m32 $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = `xeno-config --xeno-ldflags` -m32
else
TARGET_CFLAGS = `xeno-config --skin native --cflags` -DXENO_NATIVE -D_POSIX_SOURCE -D_GNU_SOURCE -m32
TARGET_CFLAGS = `xeno-config --skin native --cflags` -DXENO_NATIVE -D_POSIX_SOURCE -D_GNU_SOURCE -m32 $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = `xeno-config --skin native --ldflags` -m32
endif
......
XENOVER=$(shell xeno-config --version)
ifeq ($(XENOVER),2.4.4)
TARGET_CFLAGS = `xeno-config --posix-cflags` -DXENO_POSIX -D_POSIX_SOURCE -D_GNU_SOURCE -m32
TARGET_CFLAGS = `xeno-config --posix-cflags` -DXENO_POSIX -D_POSIX_SOURCE -D_GNU_SOURCE -m32 $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = `xeno-config --posix-ldflags` -m32
else
TARGET_CFLAGS = `xeno-config --skin posix --cflags` -DXENO_POSIX -D_POSIX_SOURCE -D_GNU_SOURCE -m32
TARGET_CFLAGS = `xeno-config --skin posix --cflags` -DXENO_POSIX -D_POSIX_SOURCE -D_GNU_SOURCE -m32 $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = `xeno-config --skin posix --ldflags` -m32
endif
......
TARGET_CFLAGS = -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_CFLAGS = -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE $(GCC_GENERIC_FLAGS)
TARGET_LDFLAGS = -lpthread -lrt -m64
SIMULINK_LDFLAGS = -lm
CC = gcc
......
......@@ -20,7 +20,7 @@ TARGET_SOURCES =
#TARGET_TRANSPORT_SOURCES = $(RUNTIME_PATH)/config/leon-rtems/config.c
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_POSIX -DNDS_RTEMS -mstructure-size-boundary=8 -mcpu=arm9tdmi -mfpu=vfp -mfloat-abi=soft
TARGET_CFLAGS = -DRTEMS_POSIX -DNDS_RTEMS -mstructure-size-boundary=8 -mcpu=arm9tdmi -mfpu=vfp -mfloat-abi=soft $(GCC_GENERIC_FLAGS)
TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/leon-rtems/
LD = arm-rtems4.10-ld
......
......@@ -13,7 +13,7 @@ TARGET_TRANSPORT_SOURCES = $(POLYORB_HI_PATH)/share/config/spif-rtems/config
TARGET_CFLAGS = --pipe -B$(RTEMS_MAKEFILE_PATH)/lib \
-specs bsp_specs -qrtems -g -Wall \
-O4 -mmultiple -mstring -mstrict-align \
-g -mcpu=860 -Dmpc860 -DRTEMS_POSIX
-g -mcpu=860 -Dmpc860 -DRTEMS_POSIX $(GCC_GENERIC_FLAGS)
LD =
TARGET_INCLUDE = -I $(RTEMS_MAKEFILE_PATH)/lib/include/ \
-I $(POLYORB_HI_PATH)/share/config/spif-rtems/
......
......@@ -12,7 +12,7 @@ GPROF =
TARGET_SOURCES =
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -I$(LINUXTASTE_PATH)/output/target/usr/local/include -DPOSIX -D_POSIX_SOURCE -D_GNU_SOURCE -D__PO_HI_PLATFORM_LINUXTASTE
TARGET_CFLAGS = -I$(LINUXTASTE_PATH)/output/target/usr/local/include -DPOSIX -D_POSIX_SOURCE -D_GNU_SOURCE -D__PO_HI_PLATFORM_LINUXTASTE $(GCC_GENERIC_FLAGS)
TARGET_INCLUDE =
......
......@@ -24,7 +24,7 @@ GPROF = i386-rtems4.8-gprof
TARGET_SOURCES =
TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -DRTEMS_PURE -DX86_RTEMS
TARGET_CFLAGS = -DRTEMS_PURE -DX86_RTEMS $(GCC_GENERIC_FLAGS)
TARGET_INCLUDE = -I $(RUNTIME_PATH)/config/
LD = i386-rtems4.8-ld
......
#if (defined (__PO_HI_NEED_DRIVER_1553_RASTA))\n
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:03
Date was: 6/5/2011
Time was: 14:44:04
*/
#include <string.h>
#include <math.h>
......
#if (defined (__PO_HI_NEED_DRIVER_SOCKETS) || defined (__PO_HI_NEED_DRIVER_RTEMS_NE2000_SOCKETS))\n
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:03
Date was: 6/5/2011
Time was: 14:44:05
*/
#include <string.h>
#include <math.h>
......
#if (defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_RECEIVER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_RASTA) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_RECEIVER))\n
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:04
Date was: 6/5/2011
Time was: 14:44:06
*/
#include <string.h>
#include <math.h>
......
#if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA))\n
/*
Code automatically generated by asn1scc tool
Date was: 5/9/2011
Time was: 12:43:04
Date was: 6/5/2011
Time was: 14:44:07
*/
#include <string.h>
#include <math.h>
......
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