1 /*******************************************************************************
2  * (c) Copyright 2014 Microsemi SoC Products Group. All rights reserved.
3  *
4  *  Keil-MDK specific system initialization.
5  *
6  * SVN $Revision: 7375 $
7  * SVN $Date: 2015-05-01 14:57:40 +0100 (Fri, 01 May 2015) $
8  */
9 #ifdef MSCC_NO_RELATIVE_PATHS
10 #include "m2sxxx.h"
11 #else
12 #include "..\m2sxxx.h"
13 #endif
14 
15 #define ENVM_BASE_ADDRESS       0x60000000U
16 #define MDDR_BASE_ADDRESS       0xA0000000U
17 
18 //extern unsigned int Image$$ER_RW$$Base;
19 //extern unsigned int Image$$ER_RO$$Base;
20 
21 /*==============================================================================
22  * The __low_level_init() function is called after SystemInit. Therefore, the
23  * external RAM should be configured at this stage if it is used.
24  */
25 /* void low_level_init(void)
26 {
27     volatile unsigned int rw_region_base;
28     volatile unsigned int readonly_region_base;
29 
30     rw_region_base = (unsigned int)&Image$$ER_RW$$Base;
31     if (rw_region_base >= MDDR_BASE_ADDRESS)
32     {
33         / --------------------------------------------------------------------------
34          * Remap MDDR to address 0x00000000.
35          /
36         SYSREG->ESRAM_CR = 0u;
37         SYSREG->ENVM_REMAP_BASE_CR = 0u;
38         SYSREG->DDR_CR = 1u;
39     }
40 
41     readonly_region_base = (unsigned int)&Image$$ER_RO$$Base;
42     SCB->VTOR = readonly_region_base;
43 }  */
44 
45