Commit 14ff3ab3 authored by julien.delange's avatar julien.delange
Browse files

adapt the build system to integrate ASN1 generated files



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@695 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent d14473a3
......@@ -15,6 +15,7 @@
#if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA)) || \
(defined (__PO_HI_NEED_DRIVER_SERIAL_RASTA)) || \
(defined (__PO_HI_USE_GPROF)) || \
(defined (__PO_HI_NEED_DRIVER_1553_RASTA))
#define CONFIGURE_MAXIMUM_DRIVERS 16
#endif
......
......@@ -112,6 +112,17 @@ else
main.o
endif
ifdef USE_ASN1_DEPLOYMENT
generate-asn1-deployment:
asn1scc.exe ../asn1_deployment.asn1
GENERATED_OBJS += real.o asn1_deployment.o asn1crt.o
LDFLAGS += -lm
else
generate-asn1-deployment:
endif
################################################################################
# Simulink
......@@ -153,6 +164,7 @@ compile-po-hi:
ifdef SIMULINK_DIR
(cd $(SIMULINK_DIR) && $(MAKE) -f $(SIMULINK_NODE).mk && rm -f grt_main.o)
endif
ifdef SCADE_DIR
(cd $(SCADE_DIR) && for v in `ls *.c`; do $(CC) -c $$v; done)
endif
......@@ -171,10 +183,10 @@ compile-node: $(BINARY)
ifeq ($(TARGET), leon.rtems)
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(BINARY): generate-asn1-deployment target-objects check-rtems compile-po-hi $(USER_OBJS) $(GENERATED_OBJS)
$(make-exe)
else
$(BINARY): target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(BINARY): generate-asn1-deployment target-objects compile-po-hi $(USER_OBJS) $(GENERATED_OBJS) $(TARGET_OBJECTS)
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif
......
#ifdef __PO_HI_USE_GPROF
#include <po_hi_debug.h>
#include <drivers/po_hi_rtems_utils.h>
#include <pci.h>
#include <rasta.h>
#include <apbuart_rasta.h>
#define CONFIG_OS_PROFILE_OVER_SERIAL 1
#define SERIAL_VERBOSE_MODE 1
......@@ -307,7 +316,7 @@ static void _mcleanup()
#endif
}
fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , (unsigned int)sbuf , (unsigned int)ssiz );
// fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , (unsigned int)sbuf , (unsigned int)ssiz );
endfrom = s_textsize / (HASHFRACTION * sizeof(*froms));
for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) {
if ( froms[fromindex] == 0 ) {
......@@ -316,11 +325,13 @@ static void _mcleanup()
frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof(*froms));
for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link)
{
/*
fprintf( stderr ,
"[mcleanup] frompc 0x%x selfpc 0x%x count %d\n" ,
(unsigned int)frompc ,
(unsigned int)tos[toindex].selfpc ,
(unsigned int)tos[toindex].count );
*/
rawarc.raw_frompc = (unsigned long) frompc;
rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc;
rawarc.raw_count = tos[toindex].count;
......@@ -587,11 +598,22 @@ static int serialFD = -1;
int initialize_serial()
{
struct termios oldtio, newtio;
serialFD = open( "/dev/apbuart" , O_RDWR | O_NOCTTY);
__DEBUGMSG ("[RASTA SERIAL] Init\n");
init_pci();
__DEBUGMSG ("[RASTA SERIAL] Initializing RASTA ...\n");
if ( rasta_register() ){
__DEBUGMSG(" ERROR !\n");
return;
}
__DEBUGMSG(" OK !\n");
serialFD = open( "/dev/apburasta0" , O_RDWR | O_NOCTTY);
if( serialFD < 0 )
{
#if(SERIAL_VERBOSE_MODE == 1)
printk("can't open new device! error = %d" , serialFD);
printk("can't open new device! error = %d\n" , serialFD);
#endif
return -1;
}
......@@ -611,6 +633,14 @@ int initialize_serial()
tcflush(serialFD , TCIFLUSH);
tcsetattr(serialFD , TCSANOW , &newtio);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_SET_BAUDRATE, 57600); /* stream mode */
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_SET_BLOCKING, APBUART_BLK_RX | APBUART_BLK_TX | APBUART_BLK_FLUSH);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_SET_TXFIFO_LEN, 64); /* Transmitt buffer 64 chars */
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_SET_RXFIFO_LEN, 256); /* Receive buffer 256 chars */
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_SET_ASCII_MODE, 0); /* Make \n go \n\r or \r\n */
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_CLR_STATS, 0);
__PO_HI_DRIVERS_RTEMS_UTILS_IOCTL(serialFD, APBUART_START, 1);
#if(SERIAL_VERBOSE_MODE == 1)
printk("Serial init done = %d" , serialFD);
......
......@@ -95,7 +95,7 @@ procedure Headers_PO_HI is
Last := Range_Image'First + 3;
end if;
return "Copyright (C) " & Range_Image (Range_Image'First .. Last)
& ", GET-Telecom Paris.";
& ", European Space Agency (ESA).";
end Copyright_Line;
-----------------
......
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