/******************************************************************************* * Outline : initializing Cortex-M3 settings * Function Name: init_cm3 * Description : Initialize Cortex-M3 settings of RZ/T1. Copy the Cortex-M3 code * Arguments : none * Return Value : none *******************************************************************************/ void init_cm3( void ) { volatile unsigned char *p_org; volatile unsigned int psize; unsigned char *p; /* Copy the Cortex-M3 program code */ p =(unsigned char *)( 0x04000000+0x0 );// M3 RAM start address for Cortex-R4 p_org = __section_begin("CM3_SECTION"); psize = __section_size("CM3_SECTION"); memcpy(p, (char *)p_org, psize); asm("dsb"); // Ensuring data-changing /* Release the Software reset 2 (Cortex-M3) */ R_RST_WriteEnable(); asm("isb"); // Ensuring instruction-changing SYSTEM.SWRR2.LONG = 0x00000000; // Release Software reset 2 asm("isb"); R_RST_WriteDisable(); }