/*\r
- * FreeRTOS Kernel V10.2.0\r
- * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
+ * FreeRTOS Kernel V10.3.0\r
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a copy of\r
* this software and associated documentation files (the "Software"), to deal in\r
#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
void BootNonSecure( uint32_t ulNonSecureStartAddress );\r
/*-----------------------------------------------------------*/\r
\r
-void BootNonSecure( uint32_t ulNonSecureStartAddress )\r
-{\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
+/*\r
+ * Instructions to Build and Run:\r
+ * - The Keil multi-project workspace FreeRTOSDemo.uvmpw contains projects for\r
+ * both the secure project, and non secure project.\r
+ * - Set the FreeRTOSDemo_s project as Active - Right click on\r
+ * "Project: FreeRTOSDemo_s" and select "Set as Active Project".\r
+ * - Build the FreeRTOSDemo_s project using "Project --> Build" or by pressing\r
+ * "F7".\r
+ * - Set the FreeRTOSDemo_ns project as Active - Right click on\r
+ * "Project: FreeRTOSDemo_ns" and select "Set as Active Project".\r
+ * - Build the FreeRTOSDemo_ns project using "Project --> Build" or by\r
+ * pressing "F7".\r
+ * - Start Debug Session using "Debug -> Start/Stop Debug Session" or by\r
+ * pressing "Ctrl+F5".\r
+ */\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
+/* Secure main() */\r
+int main( void )\r
+{\r
+ /* Boot the non-secure code. */\r
+ BootNonSecure( mainNONSECURE_APP_START_ADDRESS );\r
\r
- /* Start non-secure software application by jumping to the non-secure Reset\r
- * Handler. */\r
- pxNonSecureResetHandler();\r
+ /* Non-secure software does not return, this code is not executed. */\r
+ for( ; ; )\r
+ {\r
+ /* Should not reach here. */\r
+ }\r
}\r
/*-----------------------------------------------------------*/\r
\r
-/* Secure main() */\r
-int main( void )\r
+void BootNonSecure( uint32_t ulNonSecureStartAddress )\r
{\r
- /* Boot the non-secure code. */\r
- BootNonSecure( mainNONSECURE_APP_START_ADDRESS );\r
+ NonSecureResetHandler_t pxNonSecureResetHandler;\r
\r
- /* Non-secure software does not return, this code is not executed. */\r
- for( ; ; )\r
- {\r
- /* Should not reach here. */\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
+\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
}\r
/*-----------------------------------------------------------*/\r
+\r