void BootstrapCode ()
{

#ifdef PLATFORM_ARM_SAM9RL64_ANY
	//disable watchdog timer
	
	AT91_WATCHDOG& g_WDT = AT91::WTDG();
	
	g_WDT.WDT_MR = AT91_WATCHDOG::WMR_WDDIS;
	//disable watchdog timer
	//*((volatile UINT32*) 0xFFFFFD44) = 0x8000;
#endif 

    AT91_SAM_ClockInit();

    CPU_ARM9_BootstrapCode();

#if !defined(TARGETLOCATION_RAM)
    AT91_SAM_SdramInit();
#endif

    BootstrapCode_MMU();    

    PrepareImageRegions();

    CPU_EnableCaches();
}
void __section(SectionForBootstrapOperations) BootstrapCode()
{
    // Clocks, Pins and Memory init done in board specefic bootstrap code
    // See LPC24XX_prestackinit.s
    
    // Implement bootstrap code
    PrepareImageRegions();
}
void __section(SectionForBootstrapOperations) BootstrapCode()
{
    STM32_BootstrapCode();
    
    BootstrapCode_GPIO();

    PrepareImageRegions();
}
__section("SectionForBootstrapOperations") void BootstrapCode()
{
    STM32F4_BootstrapCode();
    
    PrepareImageRegions();
    
    BootstrapCode_GPIO();

}
void __section(SectionForBootstrapOperations) BootstrapCode()
{
//    BootstrapCode_Clocks();
//    BootstrapCode_Pins();
//    BootstrapCode_Ext_SRAM();
//    BootstrapCode_Ext_Flash();
    
    // Implement bootstrap code
    PrepareImageRegions();
    PrepareImageRegions_IRAM(); // extra image copy for Internal RAM
    // Remap Interrupt vectors to internal RAM
    // Vector table is copied by PrepareImageRegions() (HAL\ARM\Configuration\tinyhal.cpp)
//    Initialize_SyncOn();
    
}
void BootstrapCode ()
{

#ifdef PLATFORM_ARM_SAM9RL64_ANY
    //disable watchdog timer

    AT91_WATCHDOG& g_WDT = AT91::WTDG();

    g_WDT.WDT_MR = AT91_WATCHDOG::WMR_WDDIS;
    //disable watchdog timer
    //*((volatile UINT32*) 0xFFFFFD44) = 0x8000;
#endif

    AT91_SAM_ClockInit();

    CPU_ARM9_BootstrapCode();

#if !defined(TARGETLOCATION_RAM)
    //AT91_SAM_SdramInit();
#endif

    BootstrapCode_MMU();

    PrepareImageRegions();
//*

    UINT32* RObase = (UINT32*)&IMAGE_RAM_RO_BASE;
    UINT32  ROlen = (UINT32)&IMAGE_RAM_RO_LENGTH;
    if(RObase != 0)
    {
        UINT32* src = (UINT32*)RObase; //0x20000000;
        UINT32* dst = (UINT32*)0x000000; //0x000000;
        UINT32  len =  44;

        GPrepare_Copy( src, dst, len );
    }
//*/

    CPU_EnableCaches();
}