changeset 307:749ca89741fa

DAR: starting to compile
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 16 Mar 2014 07:39:29 +0000
parents 81bee6125882
children 3c5a17928fda
files gsm-fw/services/Makefile gsm-fw/services/dar/Makefile gsm-fw/services/dar/dar_api.c
diffstat 3 files changed, 332 insertions(+), 311 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/services/Makefile	Sun Mar 16 06:50:26 2014 +0000
+++ b/gsm-fw/services/Makefile	Sun Mar 16 07:39:29 2014 +0000
@@ -1,6 +1,6 @@
 sinclude ../include/config.mk
 
-ALL_SUBDIR=	etm ffs
+ALL_SUBDIR=	dar etm ffs
 
 BUILD_SUBDIR=	ffs
 ifeq (${RVM_ETM_SWE},1)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/services/dar/Makefile	Sun Mar 16 07:39:29 2014 +0000
@@ -0,0 +1,20 @@
+CC=	arm-elf-gcc
+CFLAGS=	-O2 -fno-builtin -mthumb-interwork -mthumb
+LD=	arm-elf-ld
+
+OBJS=	dar_api.o
+
+HDRS=	dar_api.h dar_const_i.h dar_diagnose_i.h dar_emergency.h dar_env.h \
+	dar_error_hdlr_i.h dar_gen.h dar_handle_message.h dar_macro_i.h \
+	dar_messages_i.h dar_msg_ft.h dar_pool_size.h dar_structs_i.h \
+	dar_watchdog.h
+
+all:	xipcode.o
+
+${OBJS}:	${HDRS}
+
+xipcode.o:	${OBJS}
+	${LD} -r -o $@ ${OBJS}
+
+clean:
+	rm -f *.[oa] *errs
--- a/gsm-fw/services/dar/dar_api.c	Sun Mar 16 06:50:26 2014 +0000
+++ b/gsm-fw/services/dar/dar_api.c	Sun Mar 16 07:39:29 2014 +0000
@@ -16,42 +16,35 @@
 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
 /****************************************************************************/
 
-#include "rv/rv_defined_swe.h"
+#include "../../riviera/rv/rv_defined_swe.h"
 
-  
+
 #ifdef RVM_DAR_SWE
-   #ifndef _WINDOWS
-      #include "swconfig.cfg"
-      #include "sys.cfg"
-      #include "l1sw.cfg"
-      #include "chipset.cfg"
-   #endif
+   #include "../../include/config.h"
 
-   #include "abb/abb.h"
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "dar/dar_api.h"
-   #include "dar/dar_env.h"    
-   #include "dar/dar_error_hdlr_i.h"
-   #include "dar/dar_messages_i.h"
-   #include "dar/dar_msg_ft.h"
-   #include "dar/dar_macro_i.h" 
-   #include "dar/dar_diagnose_i.h"
-   #include "dar/dar_const_i.h"
-   #include "dar/dar_emergency.h"
-
+   #include "../../bsp/abb+spi/abb.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "dar_api.h"
+   #include "dar_env.h"    
+   #include "dar_error_hdlr_i.h"
+   #include "dar_messages_i.h"
+   #include "dar_msg_ft.h"
+   #include "dar_macro_i.h" 
+   #include "dar_diagnose_i.h"
+   #include "dar_const_i.h"
+   #include "dar_emergency.h"
 
    #ifndef _WINDOWS
       /* enable the timer */
-      #include "memif/mem.h"
-      #include "timer/timer.h"
-      #include "inth/iq.h"
+      #include "../../bsp/mem.h"
+      #include "../../bsp/timer.h"
+      #include "../../bsp/iq.h"
       #if (CHIPSET == 12)
         #include "inth/sys_inth.h"
       #endif
    #endif
 
-
    /**** Global variable ****/
    /* Define load timer */
    static UINT16 dar_load_tim = 0x0;
@@ -78,31 +71,31 @@
    /* Define a pointer to the Global Environment Control block   */
    extern T_DAR_ENV_CTRL_BLK *dar_gbl_var_p;
 
-   /* **************************************************************************** */
-   /*                                RECOVERY                                      */
-   /* **************************************************************************** */
+   /* *********************************************************************** */
+   /*                                RECOVERY                                 */
+   /* *********************************************************************** */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_recovery_get_status                                  */
-   /*                                                                              */
-   /*    Purpose:  This function is called by the MMI at the beginning of the      */
-   /*              procedure, in order to get the status of the last reset of      */
-   /*              the system.                                                     */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Dar recovery status                                                   */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the function execution.                                */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_recovery_get_status                             */
+   /*                                                                         */
+   /*    Purpose:  This function is called by the MMI at the beginning of the */
+   /*              procedure, in order to get the status of the last reset of */
+   /*              the system.                                                */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        Dar recovery status                                              */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the function execution.                           */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_recovery_get_status(T_DAR_RECOVERY_STATUS* status)
    {
       /* Variable to know the status of th Omega VRPC register */
@@ -168,28 +161,28 @@
          }
          default:
          {
-            #if (_GSM==1) || (defined _WINDOWS)
+            #if 1 //(_GSM==1) || (defined _WINDOWS)
                dar_pwr_status = ABB_Read_Status();
 
-               #if ((ANLG_FAM == 1) || (ANLG_FAM == 2))
+               #if ((ANALOG == 1) || (ANALOG == 2))
                if (dar_pwr_status & ONBSTS)
-               #elif (ANLG_FAM == 3)
+               #elif (ANALOG == 3)
                if (dar_pwr_status & PWONBSTS)
                #endif
                {			    
-	               /* Switch on Condition on ON BUTTON Push */
-          	      DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = POWER ON/OFF",RV_TRACE_LEVEL_DEBUG_HIGH);
+                  /* Switch on Condition on ON BUTTON Push */
+                  DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = POWER ON/OFF",RV_TRACE_LEVEL_DEBUG_HIGH);
                   break;
                }
                else
                {
                   /* Branch to a reset at adress 0 */
-          	      DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = BRANCH to adress 0",RV_TRACE_LEVEL_DEBUG_HIGH);
+                  DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = BRANCH to adress 0",RV_TRACE_LEVEL_DEBUG_HIGH);
                   break;
                }
             #else
                /* the SPI is not available in BOARD_TEST configuration */
-        	      DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = POWER ON/OFF or BRANCH to adress 0",RV_TRACE_LEVEL_DEBUG_HIGH);
+               DAR_SEND_TRACE("Dar Entity: Status of the last reset of the system = POWER ON/OFF or BRANCH to adress 0",RV_TRACE_LEVEL_DEBUG_HIGH);
             #endif
          }
       }/* switch */
@@ -198,30 +191,30 @@
 
    } /* dar_recovery_get_status */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_recovery_config                                      */
-   /*                                                                              */
-   /*    Purpose:  This function is used to store a callback function that will be */
-   /*              called by the recovery system when a recovery procedure has     */
-   /*              been initiated                                                  */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        dar callback function                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_recovery_config                                 */
+   /*                                                                         */
+   /*    Purpose:  This function is used to store a callback function that    */
+   /*              will be called by the recovery system when a recovery      */
+   /*              procedure has been initiated                               */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        dar callback function                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_recovery_config(T_RV_RET (*dar_store_recovery_data)
-                                                      (T_DAR_BUFFER      buffer_p,
-                                                      UINT16            length))
+						(T_DAR_BUFFER     buffer_p,
+						UINT16            length))
    {   
       /* call the callback function */
       dar_gbl_var_p->entity_dar_callback = dar_store_recovery_data; 
@@ -229,33 +222,34 @@
       return(RV_OK);
    } /* dar_recovery_config */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_get_recovery_data                                    */
-   /*                                                                              */
-   /*    Purpose:  This function is used to retrieve data that have been stored    */
-   /*              in the buffer just before a reset.                              */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*       - the buffer in whom important data have been stored before the reset  */
-   /*       - the length of the buffer                                             */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
-   T_RV_RET dar_get_recovery_data( T_DAR_BUFFER buffer_p, UINT16   length )                                                                               
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_get_recovery_data                               */
+   /*                                                                         */
+   /*    Purpose:  This function is used to retrieve data that have been      */
+   /*              stored in the buffer just before a reset.                  */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*       - the buffer in whom important data have been stored before the   */
+   /*		reset                                                         */
+   /*       - the length of the buffer                                        */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
+   T_RV_RET dar_get_recovery_data( T_DAR_BUFFER buffer_p, UINT16   length )
    { 
       /* Local variables */
       UINT8 i; 
 
-	   if (buffer_p != NULL)
+      if (buffer_p != NULL)
       {
          if(length <= DAR_RECOVERY_DATA_MAX_BUFFER_SIZE)
          {
@@ -286,39 +280,39 @@
    } /* dar_get_recovery_data */
 
 
-   /* **************************************************************************** */
-   /*                                  WATCHDOG                                    */
-   /* **************************************************************************** */
+   /* *********************************************************************** */
+   /*                                  WATCHDOG                               */
+   /* *********************************************************************** */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_start_watchdog_timer                                 */
-   /*                                                                              */
-   /*    Purpose:  This function uses the timer as a general purpose timer instead */
-   /*              of Watchdog. It loads the timer , starts it and then unmasks    */
-   /*              the interrupt.                                                  */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        time's interval in milliseconds before the timer expires              */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_start_watchdog_timer                            */
+   /*                                                                         */
+   /*    Purpose:  This function uses the timer as a general purpose timer    */
+   /*              instead of Watchdog. It loads the timer, starts it and     */
+   /*              then unmasks the interrupt.                                */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        time's interval in milliseconds before the timer expires         */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET   dar_start_watchdog_timer(UINT16 timer_expiration_value)
    {
       DAR_SEND_TRACE("DAR Watchdog timer",RV_TRACE_LEVEL_DEBUG_LOW);
 
-      /* use Watchdog timer set as a general purpose timer                     */
-      /* Calculate the load value thanks to the formula:                       */
-      /*      timer_expiration_value * 1000 = Tclk * (DAR_LOAD_TIM+1)*2^(PTV+1)*/
-      /*      (in Watchdog mode, the value of PTV is fixed to 7)               */
+      /* use Watchdog timer set as a general purpose timer                    */
+      /* Calculate the load value thanks to the formula:                      */
+      /*     timer_expiration_value * 1000 = Tclk * (DAR_LOAD_TIM+1)*2^(PTV+1)*/
+      /*     (in Watchdog mode, the value of PTV is fixed to 7)               */
       dar_load_tim = ((timer_expiration_value * 1000)/(1.078*256))-1;
 
       #ifndef _WINDOWS
@@ -340,26 +334,26 @@
 
    } /* dar_start_watchdog_timer */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_reload_watchdog_timer                                */
-   /*                                                                              */
-   /*    Purpose:  This function is used to maintain the timer in reloading it     */
-   /*              periodically before it expires                                  */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_reload_watchdog_timer                           */
+   /*                                                                         */
+   /*    Purpose:  This function is used to maintain the timer in reloading   */
+   /*              it periodically before it expires.                         */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET   dar_reload_watchdog_timer()
    {
       #ifndef _WINDOWS
@@ -389,26 +383,26 @@
 
    } /* dar_reload_watchdog_timer */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_stop_watchdog_timer                                  */
-   /*                                                                              */
-   /*    Purpose:  This function stops the timer used as a general purpose timer   */
-   /*              instead of watchdog                                             */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_stop_watchdog_timer                             */
+   /*                                                                         */
+   /*    Purpose:  This function stops the timer used as a general purpose    */
+   /*              timer instead of watchdog.                                 */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET   dar_stop_watchdog_timer()
    {
       #ifndef _WINDOWS
@@ -428,29 +422,29 @@
    } /* dar_stop_watchdog_timer */
 
 
-   /* **************************************************************************** */
-   /*                                  RESET                                       */
-   /* **************************************************************************** */
+   /* *********************************************************************** */
+   /*                                  RESET                                  */
+   /* *********************************************************************** */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_reset_system                                         */
-   /*                                                                              */
-   /*    Purpose:  This function can be used to reset the system voluntarily       */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        None                                                                  */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.                                 */  
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_reset_system                                    */
+   /*                                                                         */
+   /*    Purpose:  This function can be used to reset the system voluntarily. */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        None                                                             */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.                            */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None.                                                            */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET   dar_reset_system(void)
    {
 
@@ -468,31 +462,31 @@
       return(RV_OK); 
    }
 
-   /* **************************************************************************** */
-   /*                                DIAGNOSE                                      */
-   /* **************************************************************************** */
+   /* *********************************************************************** */
+   /*                                DIAGNOSE                                 */
+   /* *********************************************************************** */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_diagnose_swe_filter  		    			                   */
-   /*                                                                              */
-   /*    Purpose: This function is called to configure the Diagnose filtering.     */
-   /*             It allows to determine what Software Entity ( dar_use_id )       */
-   /*             wants to use the Diagnose and allows to indicate the level       */
-   /*             threshold of the diagnose messages. (Warning or Debug)           */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*         - the dar use id                                                     */
-   /*         - the dar level                                                      */
-   /*											                                                         */
-   /*    Output Parameters:                                                        */
-   /*        Validation of the function execution.								                 */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Note:                                                                     */
-   /*        None                                                                  */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_diagnose_swe_filter			      */
+   /*                                                                         */
+   /*    Purpose: This function is called to configure the Diagnose filtering.*/
+   /*             It allows to determine what Software Entity ( dar_use_id )  */
+   /*             wants to use the Diagnose and allows to indicate the level  */
+   /*             threshold of the diagnose messages. (Warning or Debug)      */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*         - the dar use id                                                */
+   /*         - the dar level                                                 */
+   /*			                                                      */
+   /*    Output Parameters:                                                   */
+   /*        Validation of the function execution.	                      */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Note:                                                                */
+   /*        None                                                             */
+   /*                                                                         */
+   /***************************************************************************/
 
    T_RV_RET dar_diagnose_swe_filter ( T_RVM_USE_ID  dar_use_id, 
                                      T_DAR_LEVEL   dar_level)
@@ -501,7 +495,7 @@
       T_RVF_MB_STATUS       mb_status   = RVF_GREEN;
       T_DAR_FILTER_START   *use_id_p = NULL;
 
-      /************************** dar_diagnose_swe_filter function   ***************/
+      /*********************** dar_diagnose_swe_filter function   *************/
 
       if (dar_gbl_var_p == NULL )
       {
@@ -514,7 +508,7 @@
                                sizeof (T_DAR_FILTER_START),
                                (T_RVF_BUFFER **) (&use_id_p));
 
-      /* If insufficient resources, then report a memory error and abort.          */
+      /* If insufficient resources, then report a memory error and abort. */
       if (mb_status == RVF_YELLOW)
       {
          /* deallocate the memory */
@@ -546,31 +540,31 @@
 
       return (RV_OK);
 
-	 
+
    } /* dar_diagnose_swe_filter */
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_diagnose_write                                       */
-   /*                                                                              */
-   /*    Purpose:  This function is called to store diagnose data in RAM buffer    */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format, ( the Binary format is not supported)                    */
-   /*        Data level,                                                           */
-   /*        Data Use Id,                                                          */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_diagnose_write                                  */
+   /*                                                                         */
+   /*    Purpose:  This function is called to store diagnose data in RAM      */
+   /*              buffer.                                                    */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format, ( the Binary format is not supported)               */
+   /*        Data level,                                                      */
+   /*        Data Use Id,                                                     */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_diagnose_write(  T_DAR_INFO    *buffer_p,
                                  T_DAR_FORMAT  format,
                                  T_DAR_LEVEL   diagnose_info_level,
@@ -594,13 +588,16 @@
                       & ((dar_use_id)&0xFFFF)) !=0)
                {
                   /* The Warning messages must be diagnosed */
-                  dar_send_write_data( buffer_p, format, diagnose_info_level, dar_use_id);
+                  dar_send_write_data( buffer_p, format, diagnose_info_level,
+					dar_use_id);
                }
 
                else
                { 
-                  /* There is no mask_warning for this use_id in the dar_filter array   */
-                  /* The warning messages can't be diagnosed                            */
+		  /*
+                   * There is no mask_warning for this use_id in the dar_filter
+		   * array; the warning messages can't be diagnosed.
+		   */
                   DAR_TRACE_WARNING("The Warning messages can't be diagnosed");
                }
 
@@ -616,13 +613,16 @@
                       & ((dar_use_id)&0xFFFF)) !=0) 
                {
                   /* The Debug messages must be diagnosed */
-                  dar_send_write_data( buffer_p, format, diagnose_info_level, dar_use_id);
+                  dar_send_write_data( buffer_p, format, diagnose_info_level,
+					dar_use_id);
                }
-            
+
                else
                { 
-                  /* There is no mask_debug for this use_id in the dar_filter array    */
-                  /* The debug messages can't be diagnosed                             */
+		  /*
+                   * There is no mask_debug for this use_id in the dar_filter
+		   * array; the debug messages can't be diagnosed.
+                   */
                   DAR_TRACE_WARNING("The Debug messages can't be diagnosed");
                }
                break;
@@ -631,46 +631,46 @@
             default:
             {
                /* Unknow level has been received */
-               DAR_TRACE_WARNING("A DAR unknow level has been received ");
+               DAR_TRACE_WARNING("A DAR unknown level has been received");
                break; 
             }
          } /* switch(msg_p->use_msg_parameter.level) */
       } /* if (search_group(dar_use_id.group_nb,&index)== RV_OK) */
-      
+
       else
       {
         /* An unknow group message has been received */
-        DAR_TRACE_WARNING("A DAR unknow group level message has been received ");
+       DAR_TRACE_WARNING("A DAR unknown group level message has been received");
       }
       
       return (RV_OK);
    } /* dar_diagnose_write */
 
 
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_diagnose_generate_emergency                          */
-   /*                                                                              */
-   /*    Purpose:  This function is called to store diagnose data in RAM buffer    */
-   /*              when an emergency has been detected and goes to emergency       */
-   /*              (automatic reset)                                               */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format, ( the Binary format is not supported)                    */
-   /*        Data Use Id,                                                          */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_diagnose_generate_emergency                     */
+   /*                                                                         */
+   /*    Purpose:  This function is called to store diagnose data in RAM      */
+   /*              buffer when an emergency has been detected and goes to     */
+   /*              emergency (automatic reset)                                */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format, ( the Binary format is not supported)               */
+   /*        Data Use Id,                                                     */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_diagnose_generate_emergency(  T_DAR_INFO    *buffer_p,
                                               T_DAR_FORMAT  format,
                                               T_RVM_USE_ID  dar_use_id)
@@ -678,8 +678,9 @@
       if (dar_gbl_var_p != NULL)
       {
          /* Process the diagnose emergency */
-         dar_process_emergency(buffer_p, format, dar_use_id, DAR_EMERGENCY_RESET|DAR_NEW_ENTRY);
-           
+         dar_process_emergency(buffer_p, format, dar_use_id,
+				DAR_EMERGENCY_RESET|DAR_NEW_ENTRY);
+
          return (RV_OK);
       }
       else
@@ -689,33 +690,33 @@
 
    } /* dar_diagnose_write */
 
-    	   
-   /********************************************************************************/
-   /*                                                                              */
-   /*    Function Name:   dar_diagnose_write_emergency                             */
-   /*                                                                              */
-   /*    Purpose:  This function is called to store diagnose data in RAM buffer    */
-   /*              when an emergency has been detected. Data is written directly   */
-   /*              compared to dar_diagnode_write where data is sent to DAR        */
-   /*              via messages. Depending on the passed flags a RESET will be     */                                              
-   /*              done.                                                           */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Input Parameters:                                                         */
-   /*        Pointer to the message to store                                       */
-   /*        Data Format, ( the Binary format is not supported)                    */
-   /*        Data Use Id,                                                          */
-   /*        Flags                                                                 */
-   /*                                                                              */
-   /*    Output Parameters:                                                        */
-   /*         Validation of the diagnose execution.                                */
-   /*                                                                              */
-   /*                                                                              */
-   /*                                                                              */
-   /*    Revision History:                                                         */
-   /*        None.                                                                 */
-   /*                                                                              */
-   /********************************************************************************/
+ 	   
+   /***************************************************************************/
+   /*                                                                         */
+   /*    Function Name:   dar_diagnose_write_emergency                        */
+   /*                                                                         */
+   /*    Purpose:  This function is called to store diagnose data in RAM      */
+   /*              buffer when an emergency has been detected. Data is        */
+   /*              written directly compared to dar_diagnode_write where data */
+   /*              is sent to DAR via messages. Depending on the passed flags */
+   /*              a RESET will be done.                                      */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Input Parameters:                                                    */
+   /*        Pointer to the message to store                                  */
+   /*        Data Format, ( the Binary format is not supported)               */
+   /*        Data Use Id,                                                     */
+   /*        Flags                                                            */
+   /*                                                                         */
+   /*    Output Parameters:                                                   */
+   /*         Validation of the diagnose execution.                           */
+   /*                                                                         */
+   /*                                                                         */
+   /*                                                                         */
+   /*    Revision History:                                                    */
+   /*        None.                                                            */
+   /*                                                                         */
+   /***************************************************************************/
    T_RV_RET dar_diagnose_write_emergency(  T_DAR_INFO    *buffer_p,
                                            T_DAR_FORMAT  format,
                                            T_RVM_USE_ID  dar_use_id,
@@ -741,12 +742,12 @@
    /*            THE DAR ENTITY IS DISABLED            */
    /* ************************************************ */
 
-   #include "rv/rv_general.h"
-   #include "rvm/rvm_gen.h"
-   #include "rvm/rvm_priorities.h"
-   #include "rvf/rvf_target.h"
-   #include "rvf/rvf_i.h"
-   #include "dar/dar_gen.h"
+   #include "../../riviera/rv/rv_general.h"
+   #include "../../riviera/rvm/rvm_gen.h"
+   #include "../../riviera/rvm/rvm_priorities.h"
+   #include "../../riviera/rvf/rvf_target.h"
+   #include "../../riviera/rvf/rvf_i.h"
+   #include "dar_gen.h"
 
    T_RV_RET dar_diagnose_swe_filter ( T_RVM_USE_ID  dar_use_id, 
                                       T_DAR_LEVEL   dar_level)