]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c
First Official Release of ARMV8M Support. This release removes Pre-Release from all...
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M33F_Simulator_Keil_GCC / Secure / RTE / Device / ARMCM33_DSP_FP_TZ / system_ARMCM33.c
diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c b/FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/RTE/Device/ARMCM33_DSP_FP_TZ/system_ARMCM33.c
new file mode 100644 (file)
index 0000000..9d13d54
--- /dev/null
@@ -0,0 +1,99 @@
+/**************************************************************************//**\r
+ * @file     system_ARMCM33.c\r
+ * @brief    CMSIS Device System Source File for\r
+ *           ARMCM33 Device Series\r
+ * @version  V5.00\r
+ * @date     02. November 2016\r
+ ******************************************************************************/\r
+/*\r
+ * Copyright (c) 2009-2016 ARM Limited. All rights reserved.\r
+ *\r
+ * SPDX-License-Identifier: Apache-2.0\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the License); you may\r
+ * not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT\r
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#if defined (ARMCM33)\r
+  #include "ARMCM33.h"\r
+#elif defined (ARMCM33_TZ)\r
+  #include "ARMCM33_TZ.h"\r
+\r
+  #if defined (__ARM_FEATURE_CMSE) &&  (__ARM_FEATURE_CMSE == 3U)\r
+    #include "partition_ARMCM33.h"\r
+  #endif\r
+#elif defined (ARMCM33_DSP_FP)\r
+  #include "ARMCM33_DSP_FP.h"\r
+#elif defined (ARMCM33_DSP_FP_TZ)\r
+  #include "ARMCM33_DSP_FP_TZ.h"\r
+\r
+  #if defined (__ARM_FEATURE_CMSE) &&  (__ARM_FEATURE_CMSE == 3U)\r
+    #include "partition_ARMCM33.h"\r
+  #endif\r
+#else\r
+  #error device not specified!\r
+#endif\r
+\r
+/*----------------------------------------------------------------------------\r
+  Define clocks\r
+ *----------------------------------------------------------------------------*/\r
+#define  XTAL            ( 5000000UL)      /* Oscillator frequency */\r
+\r
+#define  SYSTEM_CLOCK    (5U * XTAL)\r
+\r
+\r
+/*----------------------------------------------------------------------------\r
+  Externals\r
+ *----------------------------------------------------------------------------*/\r
+#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)\r
+  extern uint32_t __Vectors;\r
+#endif\r
+\r
+/*----------------------------------------------------------------------------\r
+  System Core Clock Variable\r
+ *----------------------------------------------------------------------------*/\r
+uint32_t SystemCoreClock = SYSTEM_CLOCK;\r
+\r
+\r
+/*----------------------------------------------------------------------------\r
+  System Core Clock update function\r
+ *----------------------------------------------------------------------------*/\r
+void SystemCoreClockUpdate (void)\r
+{\r
+  SystemCoreClock = SYSTEM_CLOCK;\r
+}\r
+\r
+/*----------------------------------------------------------------------------\r
+  System initialization function\r
+ *----------------------------------------------------------------------------*/\r
+void SystemInit (void)\r
+{\r
+\r
+#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)\r
+  SCB->VTOR = (uint32_t) &__Vectors;\r
+#endif\r
+\r
+#if defined (__FPU_USED) && (__FPU_USED == 1U)\r
+  SCB->CPACR |= ((3U << 10U*2U) |           /* set CP10 Full Access */\r
+                 (3U << 11U*2U)  );         /* set CP11 Full Access */\r
+#endif\r
+\r
+#ifdef UNALIGNED_SUPPORT_DISABLE\r
+  SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;\r
+#endif\r
+\r
+#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)\r
+  TZ_SAU_Setup();\r
+#endif\r
+\r
+  SystemCoreClock = SYSTEM_CLOCK;\r
+}\r