// ---------------------------------------------------------
//   ATMEL Microcontroller Software Support  -  NANTES  -
// ---------------------------------------------------------
// The software is delivered "AS IS" without warranty or
// condition of any  kind, either express, implied or
// statutory. This includes without limitation any warranty
// or condition with respect to merchantability or fitness
// for any particular purpose, or against the infringements of
// intellectual property rights of others.
// ---------------------------------------------------------
//  File: Trace_SAMD21.dmac
//  User setup file for CSPY debugger.
// ---------------------------------------------------------

/*********************************************************************
*
*       execUserReset()
*  Called once after the target application is downloaded.
*  Implement this macro to set up the memory map, breakpoints,
*  interrupts, register macro files, etc.
*
*/
execUserReset()
{
    __message "------------------------------ execUserReset ---------------------------------";
    __message "-------------------------------Set PC Reset ----------------------------------";
    __writeMemory32(0x05FA0004,0xE000ED0C,"Memory");
    //__hwReset(0);
}

/*********************************************************************
*
*       execUserPreload()
* Called after communication with the target system is established
* but before downloading the target application.
* Implement this macro to initialize memory locations and/or
* registers which are vital for loading data properly.
*
*/
execUserPreload()
{
    __message "------------------------------ execUserPreload ---------------------------------";

}

/*********************************************************************
*
*       execUserFlashInit()
*
* Called once before the flash loader is downloaded to RAM.
* Implement this macro typically for setting up the memory map
* required by the flash loader. This macro is only called when you
* are programming flash, and it should only be used for flash loader
* functionality.
*
*/

execUserFlashInit()
{

    __message "------------------------------ execUserFlashInit ---------------------------------";

}


/*********************************************************************
*
*       execUserFlashExit()
* Called once when the debug session ends.
* Implement this macro to save status data etc. This macro is useful
* for flash loader functionality
*
*/
execUserFlashExit()
{
    __message "------------------------------ execUserFlashExit ---------------------------------";
    //__hwReset(0);
}
