#define FLASHRCHW_C
/******************************************************************************
*
*   Freescale(TM) and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
*   All other product or service names are the property of their respective owners.
*   (c) Copyright 2013 Freescale Semiconductor Inc.
*   All Rights Reserved.
*
*   You can use this example for any purpose on any computer system with the
*   following restrictions:
*
*   1. This example is provided "as is", without warranty.
*
*   2. You don't remove this copyright notice from this example or any direct
*      derivation thereof.
*
* Description:    BAF RCHW block for OS/MPC574xG
*
* Notes:
*
******************************************************************************/
#if defined(FLASH_START)
#include    <Os.h>

#define CPU2_ENABLE   0x00000001  /* CPU2 is enabled              */
#define CPU0_ENABLE   0x00000002  /* CPU0 is enabled              */
#define MPC574xx_ID   0x005A0000  /* RCHW boot ID for MPC574xx devices    */
#define RCHW_VAL (CPU0_ENABLE | MPC574xx_ID)

#if defined(OSCWPPC)
extern void __start(void);
#else
extern void _start(void);
#endif

/*#define RCHW_START_SEC_DATA
#include "MemMap.h"*/
#if defined(OSDIABPPC)
#pragma section CONST ".rchwdata"
#elif defined(OSGHSPPC)
#pragma ghs section const=".rchwdata"
#pragma ghs startdata
#endif


#if defined(OSDIABPPC)
#pragma option -Xsmall-const=0 /* to ensure placement of RCHW1,2 variables in the section .rchwdata */
#endif

#if defined(OSCWPPC)
#define RCHWDATA __declspec(section ".rchwdata")
#define ENTRY_POINT __start
#else	
#define RCHWDATA
#define ENTRY_POINT  _start
#endif

RCHWDATA const OSDWORD RCHW1=RCHW_VAL;
RCHWDATA const OSDWORD RCHW2=0x00;
RCHWDATA const OSDWORD RCHW3=0x00;
RCHWDATA const OSDWORD RCHW4=0x00;
RCHWDATA const OSDWORD RCHW5=(OSDWORD)ENTRY_POINT;
RCHWDATA const OSDWORD RCHW6=0x00;


#if defined(OSDIABPPC)
#pragma section CONST
#elif defined(OSGHSPPC)
#pragma ghs enddata
#pragma ghs section const=default
#endif


/*#define RCHW_STOP_SEC_DATA
#include "MemMap.h"*/

#endif /* defined(FLASH_START) */

