]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_M33F_Simulator_Keil_GCC/Secure/main_s.c
Add support for running FreeRTOS on Secure Side only in Cortex M33 port. Also, change...
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M33F_Simulator_Keil_GCC / Secure / main_s.c
index 0d7600a41b8b9fe96fa8271bf12fbbe5fdc68adf..b3e6c56760f0f9eb153adde3272dbdd9dc2a6683 100644 (file)
 #include "secure_port_macros.h"\r
 \r
 /* Start address of non-secure application. */\r
-#define mainNONSECURE_APP_START_ADDRESS     ( 0x200000U )\r
+#define mainNONSECURE_APP_START_ADDRESS                ( 0x200000U )\r
 \r
 /* typedef for non-secure Reset Handler. */\r
-typedef void ( *NonSecureResetHandler_t )   ( void ) __attribute__( ( cmse_nonsecure_call ) );\r
+typedef void ( *NonSecureResetHandler_t )      ( void ) __attribute__( ( cmse_nonsecure_call ) );\r
 /*-----------------------------------------------------------*/\r
 \r
 /* Boot into the non-secure code. */\r
@@ -46,34 +46,34 @@ void BootNonSecure( uint32_t ulNonSecureStartAddress );
 \r
 void BootNonSecure( uint32_t ulNonSecureStartAddress )\r
 {\r
-    NonSecureResetHandler_t pxNonSecureResetHandler;\r
+       NonSecureResetHandler_t pxNonSecureResetHandler;\r
 \r
-    /* Main Stack Pointer value for the non-secure side is the first entry in\r
-     * the non-secure vector table. Read the first entry and assign the same to\r
-     * the non-secure main stack pointer(MSP_NS). */\r
-    secureportSET_MSP_NS( *( ( uint32_t * )( ulNonSecureStartAddress ) ) );\r
+       /* Main Stack Pointer value for the non-secure side is the first entry in\r
+        * the non-secure vector table. Read the first entry and assign the same to\r
+        * the non-secure main stack pointer(MSP_NS). */\r
+       secureportSET_MSP_NS( *( ( uint32_t * )( ulNonSecureStartAddress ) ) );\r
 \r
-    /* Non secure Reset Handler is the second entry in the non-secure vector\r
-     * table. Read the non-secure reset handler.\r
-     */\r
-    pxNonSecureResetHandler = ( NonSecureResetHandler_t )( * ( ( uint32_t * ) ( ( ulNonSecureStartAddress ) + 4U ) ) );\r
+       /* Non secure Reset Handler is the second entry in the non-secure vector\r
+        * table. Read the non-secure reset handler.\r
+        */\r
+       pxNonSecureResetHandler = ( NonSecureResetHandler_t )( * ( ( uint32_t * ) ( ( ulNonSecureStartAddress ) + 4U ) ) );\r
 \r
-    /* Start non-secure software application by jumping to the non-secure Reset\r
-     * Handler. */\r
-    pxNonSecureResetHandler();\r
+       /* Start non-secure software application by jumping to the non-secure Reset\r
+        * Handler. */\r
+       pxNonSecureResetHandler();\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
 /* Secure main() */\r
 int main( void )\r
 {\r
-    /* Boot the non-secure code. */\r
-    BootNonSecure( mainNONSECURE_APP_START_ADDRESS );\r
+       /* Boot the non-secure code. */\r
+       BootNonSecure( mainNONSECURE_APP_START_ADDRESS );\r
 \r
-    /* Non-secure software does not return, this code is not executed. */\r
-    for( ; ; )\r
-    {\r
-        /* Should not reach here. */\r
-    }\r
+       /* Non-secure software does not return, this code is not executed. */\r
+       for( ; ; )\r
+       {\r
+               /* Should not reach here. */\r
+       }\r
 }\r
 /*-----------------------------------------------------------*/\r