sbl/src/startup_saml21.c
void Reset_Handler(void)
{
        uint32_t *pSrc, *pDest;

        /* Initialize the relocate segment */
        pSrc = &_etext;
        pDest = &_srelocate;

        if (pSrc != pDest) {
            for (; pDest < &_erelocate;) {
                *pDest++ = *pSrc++;
            }
        }

        /* Clear the zero segment */
        for (pDest = &_szero; pDest < &_ezero;) {
                *pDest++ = 0;
        }

        /* Set the vector table base address */
        pSrc = (uint32_t *) & _sfixed;
        SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);

        /* Overwriting the default value of the NVMCTRL.CTRLB.MANW bit (errata reference 13134) */
		*(volatile uint32_t*)(NVMCTRL + 0x04u) = 0x80u;

        /* Branch to main function */
        main();
}
/**
 * \brief This is the code that gets called on processor reset.
 * To initialize the device, and call the main() routine.
 */
\brief This is the code that gets called on processor reset.
To initialize the device, and call the main() routine.
\ brief This is the code that gets called on processor reset . To initialize the device and call the main () routine .
void Reset_Handler(void)
{
        uint32_t *pSrc, *pDest;
        pSrc = &_etext;
        pDest = &_srelocate;
        if (pSrc != pDest) {
            for (; pDest < &_erelocate;) {
                *pDest++ = *pSrc++;
            }
        }
        for (pDest = &_szero; pDest < &_ezero;) {
                *pDest++ = 0;
        }
        pSrc = (uint32_t *) & _sfixed;
        SCB->VTOR = ((uint32_t) pSrc & SCB_VTOR_TBLOFF_Msk);
		*(volatile uint32_t*)(NVMCTRL + 0x04u) = 0x80u;
        main();
}
void Reset_Handler ( void ) { uint32_t * pSrc , * pDest ; pSrc = & _etext ; pDest = & _srelocate ; if ( pSrc != pDest ) { for ( ; pDest < & _erelocate ; ) { * pDest ++ = * pSrc ++ ; } } for ( pDest = & _szero ; pDest < & _ezero ; ) { * pDest ++ = 0 ; } pSrc = ( uint32_t * ) & _sfixed ; SCB -> VTOR = ( ( uint32_t ) pSrc & SCB_VTOR_TBLOFF_Msk ) ; * ( volatile uint32_t * ) ( NVMCTRL + 0x04u ) = 0x80u ; main ( ) ; }
\brief This is the code that gets called on processor reset.
\ brief This is the code that gets called on processor reset .
/* Initialize the relocate segment */ /* Clear the zero segment */ /* Set the vector table base address */ /* Overwriting the default value of the NVMCTRL.CTRLB.MANW bit (errata reference 13134) */ /* Branch to main function */